Documentation ¶
Index ¶
- Constants
- func ConfigFlag(target *string) *flags.String
- func ContextFlag(target *string) *flags.String
- func OutputFlag(target *string, supported []printer.Format, defaultFormat printer.Format) *flags.String
- func SidecarFlag(target *string) *flags.String
- func SystemFlag(target *string) *flags.String
- func WatchFlag(target *bool) *flags.Bool
- type AuthContext
- type Config
- type ConfigFile
- func (c *ConfigFile) Config() (*Config, error)
- func (c *ConfigFile) Context(name string) (*Context, error)
- func (c *ConfigFile) Contexts() (map[string]Context, error)
- func (c *ConfigFile) CreateContext(name string, context *Context) error
- func (c *ConfigFile) CurrentContext() (string, error)
- func (c *ConfigFile) DeleteContext(name string) error
- func (c *ConfigFile) SetCurrentContext(context string) error
- func (c *ConfigFile) UnsetCurrentContext() error
- func (c *ConfigFile) UpdateContext(name string, context *Context) error
- type Context
- type ContextAlreadyExistsError
- type InvalidContextError
- type LatticeCommand
- type LatticeCommandContext
- type NoContextSetError
- type SystemCommand
- type SystemCommandContext
Constants ¶
View Source
const ( Latticectl = "latticectl" DefaultConfigFile = "config.json" )
View Source
const ( ConfigFlagName = "config" ContextFlagName = "context" OutputFlagName = "output" SidecarFlagName = "sidecar" SystemFlagName = "system" WatchFlagName = "watch" )
Variables ¶
This section is empty.
Functions ¶
func ConfigFlag ¶
func ContextFlag ¶
func OutputFlag ¶
func SidecarFlag ¶
func SystemFlag ¶
Types ¶
type AuthContext ¶
type AuthContext struct {
BearerToken *string `json:"bearerToken"`
}
type ConfigFile ¶
type ConfigFile struct { Path string // contains filtered or unexported fields }
func (*ConfigFile) Config ¶
func (c *ConfigFile) Config() (*Config, error)
func (*ConfigFile) CreateContext ¶
func (c *ConfigFile) CreateContext(name string, context *Context) error
func (*ConfigFile) CurrentContext ¶
func (c *ConfigFile) CurrentContext() (string, error)
func (*ConfigFile) DeleteContext ¶
func (c *ConfigFile) DeleteContext(name string) error
func (*ConfigFile) SetCurrentContext ¶
func (c *ConfigFile) SetCurrentContext(context string) error
func (*ConfigFile) UnsetCurrentContext ¶
func (c *ConfigFile) UnsetCurrentContext() error
func (*ConfigFile) UpdateContext ¶
func (c *ConfigFile) UpdateContext(name string, context *Context) error
type Context ¶
type Context struct { URL string `json:"lattice"` System v1.SystemID `json:"system,omitempty"` Auth *AuthContext `json:"auth"` }
type ContextAlreadyExistsError ¶
type ContextAlreadyExistsError struct {
Context string
}
func NewContextAlreadyExistsError ¶
func NewContextAlreadyExistsError(context string) *ContextAlreadyExistsError
func (*ContextAlreadyExistsError) Error ¶
func (e *ContextAlreadyExistsError) Error() string
type InvalidContextError ¶
type InvalidContextError struct {
Context string
}
func NewInvalidContextError ¶
func NewInvalidContextError(context string) *InvalidContextError
func (*InvalidContextError) Error ¶
func (e *InvalidContextError) Error() string
type LatticeCommand ¶
type LatticeCommand struct { Short string Args cli.Args Flags cli.Flags Run func(ctx *LatticeCommandContext, args []string, flags cli.Flags) error MutuallyExclusiveFlags [][]string RequiredFlagSet [][]string Subcommands map[string]*cli.Command }
func (*LatticeCommand) Command ¶
func (c *LatticeCommand) Command() *cli.Command
type LatticeCommandContext ¶
type NoContextSetError ¶
type NoContextSetError struct{}
func NewNoContextSetError ¶
func NewNoContextSetError() *NoContextSetError
func (*NoContextSetError) Error ¶
func (e *NoContextSetError) Error() string
type SystemCommand ¶
type SystemCommand struct { Name string Short string Args cli.Args Flags cli.Flags Run func(ctx *SystemCommandContext, args []string, flags cli.Flags) error MutuallyExclusiveFlags [][]string RequiredFlagSet [][]string Subcommands map[string]*cli.Command }
func (*SystemCommand) Command ¶
func (c *SystemCommand) Command() *cli.Command
type SystemCommandContext ¶
type SystemCommandContext struct { *LatticeCommandContext System v1.SystemID }
Click to show internal directories.
Click to hide internal directories.