Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetYamlFiles

func GetYamlFiles(directory string, fileRegex *string) []string

GetYamlFiles gets all YAML files in a directory

Types

type Branch

type Branch struct {
	Name string
	// contains filtered or unexported fields
}

Branch represents a git branch and its local folder

func NewBranch

func NewBranch(name string, branchType BranchType) *Branch

NewBranch creates a new Branch instance

func (*Branch) FolderName

func (b *Branch) FolderName() string

FolderName returns the folder name for the branch

func (*Branch) Type

func (b *Branch) Type() BranchType

type BranchType

type BranchType string
const (
	Base   BranchType = "base"
	Target BranchType = "target"
)

type K8sResource

type K8sResource struct {
	FileName string
	Yaml     yaml.Node
}

K8sResource represents a Kubernetes resource from a YAML file

func ParseYaml

func ParseYaml(dir string, files []string) []K8sResource

ParseYaml parses YAML files into K8sResources

type Operator

type Operator int

Operator represents the comparison operator for selectors

const (
	Eq Operator = iota // Equal
	Ne                 // Not Equal
)

func (Operator) String

func (o Operator) String() string

String returns the string representation of the Operator

type Selector

type Selector struct {
	Key      string
	Value    string
	Operator Operator
}

Selector represents a key-value selector with an operator

func FromString

func FromString(s string) (*Selector, error)

FromString creates a new Selector from a string representation

func (*Selector) String

func (s *Selector) String() string

String returns the string representation of the Selector

Jump to

Keyboard shortcuts

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