Versions in this module Expand all Collapse all v5 v5.0.0 Dec 15, 2023 Changes in this version + const ActionSnippet + const ActionTagKind + const ApplicationOfferTagKind + const ApplicationSnippet + const ApplicationTagKind + const CAASModelTagKind + const CharmTagKind + const CloudCredentialTagKind + const CloudTagKind + const ContainerSnippet + const ContainerTypeSnippet + const ControllerAgentTagKind + const ControllerTagKind + const EnvironTagKind + const FilesystemTagKind + const IPAddressTagKind + const LocalUserDomain + const MachineSnippet + const MachineTagKind + const ModelTagKind + const NumberSnippet + const OperationSnippet + const OperationTagKind + const PayloadTagKind + const RelationSnippet + const RelationTagKind + const SpaceSnippet + const SpaceTagKind + const StorageNameSnippet + const StorageTagKind + const SubnetTagKind + const UnitSnippet + const UnitTagKind + const UppercaseSnippet + const UserTagKind + const VolumeTagKind + var CharmNameSnippet = "[a-z][a-z0-9]*(-[a-z0-9]*[a-z][a-z0-9]*)*" + var SeriesSnippet = "[a-z]+([a-z0-9]+)?" + func IsContainerMachine(id string) bool + func IsValidAction(id string) bool + func IsValidApplication(name string) bool + func IsValidApplicationOffer(uuid string) bool + func IsValidCAASModel(id string) bool + func IsValidCAASModelName(name string) bool + func IsValidCharm(url string) bool + func IsValidCloud(id string) bool + func IsValidCloudCredential(id string) bool + func IsValidCloudCredentialName(name string) bool + func IsValidController(id string) bool + func IsValidControllerAgent(id string) bool + func IsValidControllerName(name string) bool + func IsValidEnvironment(id string) bool + func IsValidFilesystem(id string) bool + func IsValidIPAddress(id string) bool + func IsValidMachine(id string) bool + func IsValidModel(id string) bool + func IsValidModelName(name string) bool + func IsValidOperation(id string) bool + func IsValidPayload(id string) bool + func IsValidRelation(key string) bool + func IsValidSpace(name string) bool + func IsValidStorage(id string) bool + func IsValidSubnet(id string) bool + func IsValidUnit(name string) bool + func IsValidUser(id string) bool + func IsValidUserDomain(domain string) bool + func IsValidUserName(name string) bool + func IsValidVolume(id string) bool + func ReadableString(tag Tag) string + func StorageName(id string) (string, error) + func TagKind(tag string) (string, error) + func UnitApplication(unitName string) (string, error) + func UnitNumber(unitName string) (int, error) + func ValidateApplicationName(name string) error + type ActionTag struct + ID string + func NewActionTag(id string) ActionTag + func ParseActionTag(actionTag string) (ActionTag, error) + func (t ActionTag) Id() string + func (t ActionTag) Kind() string + func (t ActionTag) String() string + type ApplicationOfferTag struct + Name string + func NewApplicationOfferTag(applicationOfferName string) ApplicationOfferTag + func ParseApplicationOfferTag(applicationOfferTag string) (ApplicationOfferTag, error) + func (t ApplicationOfferTag) Id() string + func (t ApplicationOfferTag) Kind() string + func (t ApplicationOfferTag) String() string + type ApplicationTag struct + Name string + func NewApplicationTag(applicationName string) ApplicationTag + func ParseApplicationTag(applicationTag string) (ApplicationTag, error) + func (t ApplicationTag) Id() string + func (t ApplicationTag) Kind() string + func (t ApplicationTag) String() string + type CAASModelTag struct + func NewCAASModelTag(uuid string) CAASModelTag + func ParseCAASModelTag(caasModelTag string) (CAASModelTag, error) + func (t CAASModelTag) Id() string + func (t CAASModelTag) Kind() string + func (t CAASModelTag) String() string + type CharmTag struct + func NewCharmTag(charmURL string) CharmTag + func ParseCharmTag(charmTag string) (CharmTag, error) + func (t CharmTag) Id() string + func (t CharmTag) Kind() string + func (t CharmTag) String() string + type CloudCredentialTag struct + func NewCloudCredentialTag(id string) CloudCredentialTag + func ParseCloudCredentialTag(s string) (CloudCredentialTag, error) + func (t CloudCredentialTag) Cloud() CloudTag + func (t CloudCredentialTag) Id() string + func (t CloudCredentialTag) IsZero() bool + func (t CloudCredentialTag) Kind() string + func (t CloudCredentialTag) Name() string + func (t CloudCredentialTag) Owner() UserTag + func (t CloudCredentialTag) String() string + type CloudTag struct + func NewCloudTag(id string) CloudTag + func ParseCloudTag(cloudTag string) (CloudTag, error) + func (t CloudTag) Id() string + func (t CloudTag) Kind() string + func (t CloudTag) String() string + type ControllerAgentTag struct + func NewControllerAgentTag(id string) ControllerAgentTag + func ParseControllerAgentTag(controllerAgentTag string) (ControllerAgentTag, error) + func (t ControllerAgentTag) Id() string + func (t ControllerAgentTag) Kind() string + func (t ControllerAgentTag) Number() int + func (t ControllerAgentTag) String() string + type ControllerTag struct + func NewControllerTag(uuid string) ControllerTag + func ParseControllerTag(controllerTag string) (ControllerTag, error) + func (t ControllerTag) Id() string + func (t ControllerTag) Kind() string + func (t ControllerTag) String() string + type EnvironTag struct + func NewEnvironTag(uuid string) EnvironTag + func ParseEnvironTag(environTag string) (EnvironTag, error) + func (t EnvironTag) Id() string + func (t EnvironTag) Kind() string + func (t EnvironTag) String() string + type FilesystemTag struct + func NewFilesystemTag(id string) FilesystemTag + func ParseFilesystemTag(filesystemTag string) (FilesystemTag, error) + func (t FilesystemTag) Id() string + func (t FilesystemTag) Kind() string + func (t FilesystemTag) String() string + type IPAddressTag struct + func NewIPAddressTag(id string) IPAddressTag + func ParseIPAddressTag(ipAddressTag string) (IPAddressTag, error) + func (t IPAddressTag) Id() string + func (t IPAddressTag) Kind() string + func (t IPAddressTag) String() string + type MachineTag struct + func FilesystemMachine(tag FilesystemTag) (MachineTag, bool) + func NewMachineTag(id string) MachineTag + func ParseMachineTag(machineTag string) (MachineTag, error) + func VolumeMachine(tag VolumeTag) (MachineTag, bool) + func (t MachineTag) ChildId() string + func (t MachineTag) ContainerType() string + func (t MachineTag) Id() string + func (t MachineTag) Kind() string + func (t MachineTag) Parent() Tag + func (t MachineTag) String() string + type ModelTag struct + func NewModelTag(uuid string) ModelTag + func ParseModelTag(modelTag string) (ModelTag, error) + func (t ModelTag) Id() string + func (t ModelTag) Kind() string + func (t ModelTag) ShortId() string + func (t ModelTag) String() string + type OperationTag struct + ID string + func NewOperationTag(id string) OperationTag + func ParseOperationTag(operationTag string) (OperationTag, error) + func (t OperationTag) Id() string + func (t OperationTag) Kind() string + func (t OperationTag) String() string + type PayloadTag struct + func NewPayloadTag(id string) PayloadTag + func ParsePayloadTag(tag string) (PayloadTag, error) + func (t PayloadTag) Id() string + func (t PayloadTag) Kind() string + func (t PayloadTag) String() string + type RelationTag struct + func NewRelationTag(relationKey string) RelationTag + func ParseRelationTag(relationTag string) (RelationTag, error) + func (t RelationTag) Id() string + func (t RelationTag) Kind() string + func (t RelationTag) String() string + type Set map[Tag]bool + func NewSet(initial ...Tag) Set + func NewSetFromStrings(initial ...string) (Set, error) + func (t Set) Add(value Tag) + func (t Set) Contains(value Tag) bool + func (t Set) Difference(other Set) Set + func (t Set) Intersection(other Set) Set + func (t Set) IsEmpty() bool + func (t Set) Remove(value Tag) + func (t Set) Size() int + func (t Set) SortedValues() []Tag + func (t Set) Union(other Set) Set + func (t Set) Values() []Tag + type SpaceTag struct + func NewSpaceTag(name string) SpaceTag + func ParseSpaceTag(spaceTag string) (SpaceTag, error) + func (t SpaceTag) Id() string + func (t SpaceTag) Kind() string + func (t SpaceTag) String() string + type StorageTag struct + func NewStorageTag(id string) StorageTag + func ParseStorageTag(s string) (StorageTag, error) + func (t StorageTag) Id() string + func (t StorageTag) Kind() string + func (t StorageTag) String() string + type SubnetTag struct + func NewSubnetTag(id string) SubnetTag + func ParseSubnetTag(subnetTag string) (SubnetTag, error) + func (t SubnetTag) Id() string + func (t SubnetTag) Kind() string + func (t SubnetTag) String() string + type Tag interface + Id func() string + Kind func() string + func ActionReceiverFromTag(tag string) (Tag, error) + func ActionReceiverTag(name string) (Tag, error) + func ParseTag(tag string) (Tag, error) + type UnitTag struct + func FilesystemUnit(tag FilesystemTag) (UnitTag, bool) + func NewUnitTag(unitName string) UnitTag + func ParseUnitTag(unitTag string) (UnitTag, error) + func VolumeUnit(tag VolumeTag) (UnitTag, bool) + func (t UnitTag) Id() string + func (t UnitTag) Kind() string + func (t UnitTag) Number() int + func (t UnitTag) ShortenedString(maxLength int) (string, error) + func (t UnitTag) String() string + type UserTag struct + func NewLocalUserTag(name string) UserTag + func NewUserTag(userName string) UserTag + func ParseUserTag(tag string) (UserTag, error) + func (t UserTag) Domain() string + func (t UserTag) Id() string + func (t UserTag) IsLocal() bool + func (t UserTag) Kind() string + func (t UserTag) Name() string + func (t UserTag) String() string + func (t UserTag) WithDomain(domain string) UserTag + type VolumeTag struct + func NewVolumeTag(id string) VolumeTag + func ParseVolumeTag(volumeTag string) (VolumeTag, error) + func (t VolumeTag) Id() string + func (t VolumeTag) Kind() string + func (t VolumeTag) String() string Other modules containing this package github.com/juju/names/v4