cli

package
v1.0.0-cli.0...-209fe76 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorReset  = "\033[0m"
	ColorRed    = "\033[31m"
	ColorGreen  = "\033[32m"
	ColorYellow = "\033[33m"
	ColorCyan   = "\033[36m"
)

Functions

func Find

func Find[T any](s []*T, filter func(i *T) bool) *T

func Prompt

func Prompt(label string) bool

func ReadYAMLFile

func ReadYAMLFile[T any](path string) (T, error)

func Section

func Section() table.Table

Section is a table with no column headers. the main purpose of this is to align values when printing, so they are on the same level. here's an example: what we don't want:

ID: 0198fb5f-e59e-7794-87f9-e34bd32a0e1b
Name: TestChunk
Description: this is a description
Tags: tag1,tag2

what we want:

ID:            0198fb5f-e59e-7794-87f9-e34bd32a0e1b
Name:          TestChunk
Description:   this is a description
Tags:          tag1,tag2

func WriteYAMLFile

func WriteYAMLFile[T any](content T, path string) error

Types

type Context

type Context struct {
	Logger         *slog.Logger
	Config         state.Config
	State          state.Data
	Client         chunkv1alpha1.ChunkServiceClient
	InstanceClient instancev1alpha1.InstanceServiceClient
	UserClient     userv1alpha1.UserServiceClient
	Auth           auth.Service
}

Directories

Path Synopsis
cmd
run

Jump to

Keyboard shortcuts

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