identifier

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: BSD-3-Clause-Clear Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidFQNFormat   = errors.New("error: invalid FQN format")
	ErrUnsupportedFQNType = errors.New("error: unsupported FQN type")
)

Functions

func Parse

func Parse[T FullyQualified](identifier string) (T, error)

Parse parses an identifier (FQN) string into a specific type of FullyQualified object and validates the overall structure along with each name/value of the object fields.

Types

type FullyQualified

type FullyQualified interface {
	// FQN builds the FQN identifier string with the object names/values.
	FQN() string
	// Validate checks if the names/values are valid according to the regex rules.
	Validate() error
}

FullyQualified is an interface for all fully qualified objects.

type FullyQualifiedAttribute

type FullyQualifiedAttribute struct {
	Namespace string
	Name      string
	Value     string
}

Structs and regexes for attribute FQNs

func (*FullyQualifiedAttribute) FQN

func (attr *FullyQualifiedAttribute) FQN() string

Implementing FullyQualified interface for FullyQualifiedAttribute

func (*FullyQualifiedAttribute) Validate

func (attr *FullyQualifiedAttribute) Validate() error

type FullyQualifiedRegisteredResourceValue

type FullyQualifiedRegisteredResourceValue struct {
	Name  string
	Value string
}

func (*FullyQualifiedRegisteredResourceValue) FQN

Implementing FullyQualified interface for FullyQualifiedRegisteredResourceValue

func (*FullyQualifiedRegisteredResourceValue) Validate

type FullyQualifiedResourceMappingGroup

type FullyQualifiedResourceMappingGroup struct {
	Namespace string
	GroupName string
}

func (*FullyQualifiedResourceMappingGroup) FQN

Implementing FullyQualified interface for FullyQualifiedResourceMappingGroup

func (*FullyQualifiedResourceMappingGroup) Validate

func (rmg *FullyQualifiedResourceMappingGroup) Validate() error

Jump to

Keyboard shortcuts

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