internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelManagedBy   = "app.kubernetes.io/managed-by"
	LabelYokeRelease = "app.kubernetes.io/yoke-release"
)
View Source
const (
	LabelKind                = "internal.yoke/kind"
	LabelRelease             = "internal.yoke/release"
	AnnotationSourceURL      = "internal.yoke/source-url"
	AnnotationSourceChecksum = "internal.yoke/source-checksum"
	AnnotationCreatedAt      = "internal.yoke/created-at"
	AnnotationActiveAt       = "internal.yoke/active-at"
	AnnotationResourceCount  = "internal.yoke/resources"
	KeyResources             = "resources"
)

Variables

This section is empty.

Functions

func AddYokeMetadata

func AddYokeMetadata(resources []*unstructured.Unstructured, release string)

func Canonical

func Canonical(resource *unstructured.Unstructured) string

func CanonicalMap

func CanonicalMap(resources []*unstructured.Unstructured) map[string]*unstructured.Unstructured

func CanonicalNameList

func CanonicalNameList(resources []*unstructured.Unstructured) []string

func CanonicalObjectMap

func CanonicalObjectMap(resources []*unstructured.Unstructured) map[string]any

func Colorize

func Colorize(value string) string

func CutArgs

func CutArgs(args []string) ([]string, []string)

func Debug

func Debug(ctx context.Context) ansi.Terminal

func DebugTimer

func DebugTimer(ctx context.Context, msg string) func()

func Find

func Find[S ~[]E, E any](slice S, fn func(E) bool) (E, bool)

func IsWarning

func IsWarning(err error) bool

func MustParseInt

func MustParseInt(value string) int

func MustParseTime

func MustParseTime(value string) time.Time

func Namespace

func Namespace(resource *unstructured.Unstructured) string

func RandomString

func RandomString() string

func Stderr

func Stderr(ctx context.Context) io.Writer

func Stdin

func Stdin(ctx context.Context) io.Reader

func Stdout

func Stdout(ctx context.Context) io.Writer

func WithDebugFlag

func WithDebugFlag(ctx context.Context, debug *bool) context.Context

func WithStderr

func WithStderr(ctx context.Context, w io.Writer) context.Context

func WithStdin

func WithStdin(ctx context.Context, r io.Reader) context.Context

func WithStdio

func WithStdio(ctx context.Context, out, err io.Writer, in io.Reader) context.Context

func WithStdout

func WithStdout(ctx context.Context, w io.Writer) context.Context

func WriteYAML

func WriteYAML(filename string, value any) (err error)

Types

type List

type List[T any] []T

func (*List[T]) UnmarshalJSON

func (value *List[T]) UnmarshalJSON(data []byte) error

type Revision

type Revision struct {
	Name      string    `json:"-"`
	Source    Source    `json:"source"`
	CreatedAt time.Time `json:"createdAt"`
	ActiveAt  time.Time `json:"-"`
	Resources int       `json:"resources"`
}

type Revisions

type Revisions struct {
	Release string     `json:"release"`
	History []Revision `json:"history"`
}

func (Revisions) Active

func (revisions Revisions) Active() Revision

func (Revisions) ActiveIndex

func (revisions Revisions) ActiveIndex() int

func (*Revisions) Add

func (revisions *Revisions) Add(revision Revision)

type Source

type Source struct {
	Ref      string `json:"ref"`
	Checksum string `json:"checksum"`
}

func SourceFrom

func SourceFrom(ref string, wasm []byte) (src Source)

type Warning

type Warning string

func (Warning) Error

func (warning Warning) Error() string

func (Warning) Is

func (Warning) Is(err error) bool

Directories

Path Synopsis
atc
k8s
x

Jump to

Keyboard shortcuts

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