cmd

package
v0.0.1-dev.12 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputFormatText = "text"
	OutputFormatJSON = "json"
	OutputFormatRaw  = "raw"
)

Valid output formats

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Context

type Context struct {
	Server           string `yaml:"server"`
	Token            string `yaml:"token"`
	DefaultNamespace string `yaml:"defaultNamespace,omitempty"`
}

Context represents a single context configuration

type ContextConfig

type ContextConfig struct {
	CurrentContext string             `yaml:"current-context"`
	Contexts       map[string]Context `yaml:"contexts"`
}

ContextConfig represents the structure of the Rune config file

type DeploymentResult

type DeploymentResult struct {
	SuccessfulResources map[string][]string
	FailedResources     map[string]string
}

DeploymentResult holds results of a deployment

type ResourceInfo

type ResourceInfo struct {
	FilesByType      map[string][]string
	ServicesByFile   map[string][]*types.Service
	SecretsByFile    map[string][]*types.Secret
	ConfigmapsByFile map[string][]*types.Configmap
	TotalResources   int
	SourceArguments  []string
}

ResourceInfo holds information about resources to be deployed

type ResourceTable

type ResourceTable struct {
	// Configuration
	Headers       []string
	ShowHeaders   bool
	AllNamespaces bool
	ShowLabels    bool
	MaxWidth      int
	// contains filtered or unexported fields
}

ResourceTable provides a generic interface for rendering tables of different resources

func NewResourceTable

func NewResourceTable() *ResourceTable

NewResourceTable creates a new resource table with default configuration

func (*ResourceTable) RenderConfigmaps

func (t *ResourceTable) RenderConfigmaps(configmaps []*types.Configmap) error

RenderConfigmaps renders a table of configmaps

func (*ResourceTable) RenderDeletionOperations

func (t *ResourceTable) RenderDeletionOperations(operations []*generated.DeletionOperation) error

RenderDeletionOperations renders a table of deletion operations

func (*ResourceTable) RenderInstances

func (t *ResourceTable) RenderInstances(instances []*types.Instance) error

RenderInstances renders a table of instances

func (*ResourceTable) RenderNamespaces

func (t *ResourceTable) RenderNamespaces(namespaces []*types.Namespace) error

RenderNamespaces renders a table of namespaces

func (*ResourceTable) RenderSecrets

func (t *ResourceTable) RenderSecrets(secrets []*types.Secret) error

RenderSecrets renders a table of secrets

func (*ResourceTable) RenderServices

func (t *ResourceTable) RenderServices(services []*types.Service) error

RenderServices renders a table of services

func (*ResourceTable) SetHeaders

func (t *ResourceTable) SetHeaders(headers []string)

SetHeaders sets the headers for the table

func (*ResourceTable) SetStripAnsiFunc

func (t *ResourceTable) SetStripAnsiFunc(fn func(string) string)

SetStripAnsiFunc sets a custom function for stripping ANSI codes

Jump to

Keyboard shortcuts

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