Documentation
¶
Index ¶
- func FormatResourcePath(project, target, environment string) string
- func ValidateResourcePath(path string) error
- type ResourcePath
- func (rp *ResourcePath) Contains(other *ResourcePath) bool
- func (rp *ResourcePath) Equals(other *ResourcePath) bool
- func (rp *ResourcePath) IsComplete() bool
- func (rp *ResourcePath) Level() int
- func (rp *ResourcePath) MatchesPattern(pattern string) bool
- func (rp *ResourcePath) Parent() *ResourcePath
- func (rp *ResourcePath) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatResourcePath ¶
FormatResourcePath formats components into a path string Empty components are ignored
func ValidateResourcePath ¶
ValidateResourcePath checks if a path string is valid
Types ¶
type ResourcePath ¶
ResourcePath represents a parsed resource path with its components
func ParseResourcePath ¶
func ParseResourcePath(path string) (*ResourcePath, error)
ParseResourcePath parses a path string like "project/target/environment" into its components Returns an error if the path format is invalid
func (*ResourcePath) Contains ¶
func (rp *ResourcePath) Contains(other *ResourcePath) bool
Contains checks if this path contains the other path e.g., "project/target" contains "project"
func (*ResourcePath) Equals ¶
func (rp *ResourcePath) Equals(other *ResourcePath) bool
Equals compares two resource paths for equality
func (*ResourcePath) IsComplete ¶
func (rp *ResourcePath) IsComplete() bool
IsComplete returns true if all components are present (project/target/environment)
func (*ResourcePath) Level ¶
func (rp *ResourcePath) Level() int
Level returns the depth level of the path 0 = empty, 1 = project only, 2 = project/target, 3 = project/target/environment
func (*ResourcePath) MatchesPattern ¶
func (rp *ResourcePath) MatchesPattern(pattern string) bool
MatchesPattern checks if the path matches a pattern using case-insensitive substring matching
func (*ResourcePath) Parent ¶
func (rp *ResourcePath) Parent() *ResourcePath
Parent returns the parent path (one level up) Returns nil if already at root level
func (*ResourcePath) String ¶
func (rp *ResourcePath) String() string
String returns the formatted path string