utils

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractCloudDescription added in v0.6.0

func ExtractCloudDescription(description *string) (*cloudresource.CloudRuleDescription, bool)

ExtractCloudDescription converts a string to a CloudRuleDescription object.

func FindResourcesBasedOnKind added in v0.6.0

func FindResourcesBasedOnKind(cloudResources []*cloudresource.CloudResource) (map[string]struct{}, map[string]struct{})

func GenerateCloudDescription added in v0.6.0

func GenerateCloudDescription(namespacedName string) (string, error)

GenerateCloudDescription generates a CloudRuleDescription object and converts to string.

func GenerateShortResourceIdentifier

func GenerateShortResourceIdentifier(id string, prefixToAdd string) string

func GetCloudResourceCRName

func GetCloudResourceCRName(providerType, name string) string

GetCloudResourceCRName gets corresponding cr name from cloud resource id based on cloud type.

func IsNepheControllerCreatedSG added in v0.6.0

func IsNepheControllerCreatedSG(cloudSgName string) (string, bool, bool)

IsNepheControllerCreatedSG checks an SG is created by nephe and returns if it's an AppliedToGroup/AddressGroup sg and the sg name.

func SplitCloudRulesByDirection added in v0.6.0

func SplitCloudRulesByDirection(rules []*cloudresource.CloudRule) ([]*cloudresource.CloudRule, []*cloudresource.CloudRule)

SplitCloudRulesByDirection splits the given CloudRule slice into two, one for ingress rules and one for egress rules.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL