urn

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prefixes is the list of prefixes.
	VcloudPrefix      = "urn:vcloud:"
	CloudAvenuePrefix = "urn:cloudavenue:"

	// * VCD.
	Org                        = URN(VcloudPrefix + "org:")
	VM                         = URN(VcloudPrefix + "vm:")
	User                       = URN(VcloudPrefix + "user:")
	Group                      = URN(VcloudPrefix + "group:")
	Gateway                    = URN(VcloudPrefix + "gateway:")
	VDC                        = URN(VcloudPrefix + "vdc:")
	VDCGroup                   = URN(VcloudPrefix + "vdcGroup:")
	VDCComputePolicy           = URN(VcloudPrefix + "vdcComputePolicy:")
	Network                    = URN(VcloudPrefix + "network:")
	LoadBalancerPool           = URN(VcloudPrefix + "loadBalancerPool:")
	VDCStorageProfile          = URN(VcloudPrefix + "vdcstorageProfile:")
	VAPP                       = URN(VcloudPrefix + "vapp:")
	VAPPTemplate               = URN(VcloudPrefix + "vappTemplate:")
	Disk                       = URN(VcloudPrefix + "disk:")
	SecurityGroup              = URN(VcloudPrefix + "firewallGroup:")
	Catalog                    = URN(VcloudPrefix + "catalog:")
	Token                      = URN(VcloudPrefix + "token:")
	AppPortProfile             = URN(VcloudPrefix + "applicationPortProfile:")
	CertificateLibraryItem     = URN(VcloudPrefix + "certificateLibraryItem:")
	LoadBalancerVirtualService = URN(VcloudPrefix + "loadBalancerVirtualService:")
	ServiceEngineGroup         = URN(VcloudPrefix + "serviceEngineGroup:")

	// * CLOUDAVENUE.
	VCDA = URN(CloudAvenuePrefix + "vcda:")
)

Variables

Functions

func ExtractUUID

func ExtractUUID(input string) string

ExtractUUID finds an UUID in the input string Returns an empty string if no UUID was found.

func IsAppPortProfile

func IsAppPortProfile(urn string) bool

IsAppPortProfile returns true if the URN is a AppPortProfile URN.

func IsCatalog

func IsCatalog(urn string) bool

IsCatalog returns true if the URN is a Catalog URN.

func IsCertificateLibraryItem added in v0.15.0

func IsCertificateLibraryItem(urn string) bool

IsCertificateLibraryItem returns true if the URN is a CertificateLibraryItem URN.

func IsDisk

func IsDisk(urn string) bool

IsDisk returns true if the URN is a Disk URN.

func IsEdgeGateway

func IsEdgeGateway(urn string) bool

IsEdgeGateway returns true if the URN is a EdgeGateway URN.

func IsGroup

func IsGroup(urn string) bool

IsGroup returns true if the URN is a Group URN.

func IsLoadBalancerPool

func IsLoadBalancerPool(urn string) bool

IsLoadBalancerPool returns true if the URN is a LoadBalancerPool URN.

func IsLoadBalancerVirtualService added in v0.15.0

func IsLoadBalancerVirtualService(urn string) bool

IsLoadBalancerVirtualService returns true if the URN is a LoadBalancerVirtualService URN.

func IsNetwork

func IsNetwork(urn string) bool

IsNetwork returns true if the URN is a Network URN.

func IsOrg

func IsOrg(urn string) bool

IsOrg returns true if the URN is an Org URN.

func IsSecurityGroup

func IsSecurityGroup(urn string) bool

IsSecurityGroup returns true if the URN is a SecurityGroup URN.

func IsServiceEngineGroup added in v0.15.0

func IsServiceEngineGroup(urn string) bool

IsServiceEngineGroup returns true if the URN is a ServiceEngineGroup URN.

func IsToken

func IsToken(urn string) bool

IsToken returns true if the URN is a Token URN.

func IsUUIDV4

func IsUUIDV4(urn string) bool

func IsUser

func IsUser(urn string) bool

IsUser returns true if the URN is a User URN.

func IsVAPP

func IsVAPP(urn string) bool

IsVAPP returns true if the URN is a VAPP URN.

func IsVAPPTemplate

func IsVAPPTemplate(urn string) bool

IsVAPPTemplate returns true if the URN is a VAPPTemplate URN.

func IsVCDA

func IsVCDA(urn string) bool

IsVCDA returns true if the URN is a VCDA URN.

func IsVDC

func IsVDC(urn string) bool

IsVDC returns true if the URN is a VDC URN.

func IsVDCComputePolicy

func IsVDCComputePolicy(urn string) bool

IsVDCComputePolicy returns true if the URN is a VDCComputePolicy URN.

func IsVDCGroup

func IsVDCGroup(urn string) bool

IsVDCGroup returns true if the URN is a VDCGroup URN.

func IsVDCStorageProfile

func IsVDCStorageProfile(urn string) bool

IsVDCStorageProfile returns true if the URN is a VDCStorageProfile URN.

func IsVM

func IsVM(urn string) bool

IsVM returns true if the URN is a VM URN.

func IsValid

func IsValid(urn string) bool

IsValid returns true if the URN is valid. Checks if the URN is of the specified type and if it is a valid UUIDv4.

func TestIsType

func TestIsType(urnType URN) resource.CheckResourceAttrWithFunc

Special functions for the terraform provider test. TestIsType returns true if the URN is of the specified type.

Types

type URN

type URN string

func Normalize

func Normalize(prefix URN, uuid string) URN

Normalize returns the URN with the prefix if prefix is missing.

func (URN) ContainsPrefix

func (urn URN) ContainsPrefix() bool

ContainsPrefix returns true if the URN contains any prefix.

func (URN) IsAppPortProfile

func (urn URN) IsAppPortProfile() bool

IsAppPortProfile returns true if the URN is a AppPortProfile URN.

func (URN) IsCatalog

func (urn URN) IsCatalog() bool

IsCatalog returns true if the URN is a Catalog URN.

func (URN) IsCertificateLibraryItem added in v0.15.0

func (urn URN) IsCertificateLibraryItem() bool

IsCertificateLibraryItem returns true if the URN is a CertificateLibraryItem URN.

func (URN) IsDisk

func (urn URN) IsDisk() bool

IsDisk returns true if the URN is a Disk URN.

func (URN) IsGateway

func (urn URN) IsGateway() bool

IsGateway returns true if the URN is a Gateway URN.

func (URN) IsGroup

func (urn URN) IsGroup() bool

IsGroup returns true if the URN is a Group URN.

func (URN) IsLoadBalancerPool

func (urn URN) IsLoadBalancerPool() bool

IsLoadBalancerPool returns true if the URN is a LoadBalancerPool URN.

func (URN) IsLoadBalancerVirtualService added in v0.15.0

func (urn URN) IsLoadBalancerVirtualService() bool

IsLoadBalancerVirtualService returns true if the URN is a LoadBalancerVirtualService URN.

func (URN) IsNetwork

func (urn URN) IsNetwork() bool

IsNetwork returns true if the URN is a Network URN.

func (URN) IsOrg

func (urn URN) IsOrg() bool

IsOrg returns true if the URN is an Org URN.

func (URN) IsSecurityGroup

func (urn URN) IsSecurityGroup() bool

IsSecurityGroup returns true if the URN is a SecurityGroup URN.

func (URN) IsServiceEngineGroup added in v0.15.0

func (urn URN) IsServiceEngineGroup() bool

IsServiceEngineGroup returns true if the URN is a ServiceEngineGroup URN.

func (URN) IsToken

func (urn URN) IsToken() bool

IsToken returns true if the URN is a Token URN.

func (URN) IsType

func (urn URN) IsType(prefix URN) bool

IsType returns true if the URN is of the specified type.

func (URN) IsUser

func (urn URN) IsUser() bool

IsUser returns true if the URN is a User URN.

func (URN) IsVAPP

func (urn URN) IsVAPP() bool

IsVAPP returns true if the URN is a VAPP URN.

func (URN) IsVAPPTemplate

func (urn URN) IsVAPPTemplate() bool

IsVAPPTemplate returns true if the URN is a VAPPTemplate URN.

func (URN) IsVDC

func (urn URN) IsVDC() bool

IsVDC returns true if the URN is a VDC URN.

func (URN) IsVDCComputePolicy

func (urn URN) IsVDCComputePolicy() bool

IsVDCComputePolicy returns true if the URN is a VDCComputePolicy URN.

func (URN) IsVDCGroup

func (urn URN) IsVDCGroup() bool

IsVDCGroup returns true if the URN is a VDCGroup URN.

func (URN) IsVDCStorageProfile

func (urn URN) IsVDCStorageProfile() bool

IsVDCStorageProfile returns true if the URN is a VDCStorageProfile URN.

func (URN) IsVM

func (urn URN) IsVM() bool

IsVM returns true if the URN is a VM URN.

func (URN) String

func (urn URN) String() string

String returns the string representation of the URN.

Jump to

Keyboard shortcuts

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