tag

package
v0.0.0-...-7a62f64 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagKeyMinLength = 1
	TagKeyMaxLength = 50
	TagKeyPattern   = "^[a-zA-Z0-9_]+( [a-zA-Z0-9_]+){0,127}$"
)
View Source
const (
	TagValueMinLength = 1
	TagValueMaxLength = 128
	TagValuePattern   = "^[a-zA-Z0-9_]+( [a-zA-Z0-9_]+){0,127}$"
)

Variables

View Source
var (
	ErrTagKeyInvalidLength   = fmt.Errorf("tag key must be between 1 and 50 characters")
	ErrTagKeyPatternMismatch = fmt.Errorf("tag key must match pattern %s", TagKeyPattern)
)
View Source
var (
	ErrTagValueInvalidLength   = fmt.Errorf("tag value must be between 1 and 128 characters")
	ErrTagValuePatternMismatch = fmt.Errorf("tag value must match pattern %s", TagValuePattern)
)

Functions

This section is empty.

Types

type ResourceType

type ResourceType int
const (
	ResourceTypeMachine ResourceType = iota
	ResourceTypeUnknown
)

func ResourceTypeFromString

func ResourceTypeFromString(s string) ResourceType

func (ResourceType) String

func (r ResourceType) String() string

type Tag

type Tag struct {
	Key   TagKey
	Value TagValue
}

type TagKey

type TagKey string

func TagKeyFromString

func TagKeyFromString(s string) (TagKey, error)

func (TagKey) String

func (t TagKey) String() string

type TagValue

type TagValue string

func TagValueFromString

func TagValueFromString(s string) (TagValue, error)

func (TagValue) String

func (t TagValue) String() string

Jump to

Keyboard shortcuts

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