internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

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 added in v0.0.7

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

func Canonical

func Canonical(resource *unstructured.Unstructured) string

func CanonicalMap added in v0.0.6

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

func CanonicalNameList

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

func CanonicalObjectMap added in v0.0.6

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 added in v0.0.2

func Debug(ctx context.Context) ansi.Terminal

func DebugTimer added in v0.0.2

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 added in v0.1.0

func MustParseInt(value string) int

func MustParseTime added in v0.1.0

func MustParseTime(value string) time.Time

func Namespace

func Namespace(resource *unstructured.Unstructured) string

func RandomString added in v0.1.0

func RandomString() string

func Stderr added in v0.0.6

func Stderr(ctx context.Context) io.Writer

func Stdin added in v0.0.6

func Stdin(ctx context.Context) io.Reader

func Stdout added in v0.0.6

func Stdout(ctx context.Context) io.Writer

func WithDebugFlag added in v0.0.2

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

func WithStderr added in v0.0.6

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

func WithStdin added in v0.0.6

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

func WithStdio added in v0.0.6

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

func WithStdout added in v0.0.6

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 added in v0.1.0

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

Jump to

Keyboard shortcuts

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