Documentation
¶
Index ¶
- Constants
- func Execute()
- type Context
- type ContextConfig
- type DeploymentResult
- type ResourceInfo
- type ResourceTable
- func (t *ResourceTable) RenderConfigmaps(configmaps []*types.Configmap) error
- func (t *ResourceTable) RenderDeletionOperations(operations []*generated.DeletionOperation) error
- func (t *ResourceTable) RenderInstances(instances []*types.Instance) error
- func (t *ResourceTable) RenderNamespaces(namespaces []*types.Namespace) error
- func (t *ResourceTable) RenderSecrets(secrets []*types.Secret) error
- func (t *ResourceTable) RenderServices(services []*types.Service) error
- func (t *ResourceTable) SetHeaders(headers []string)
- func (t *ResourceTable) SetStripAnsiFunc(fn func(string) string)
Constants ¶
const ( OutputFormatText = "text" OutputFormatJSON = "json" OutputFormatRaw = "raw" )
Valid output formats
Variables ¶
This section is empty.
Functions ¶
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