Documentation ¶
Index ¶
- func NewList(items []list.Item) list.Model
- type Accepting
- type AcceptingFunc
- type Back
- type Cmd
- func (c *Cmd) AfterApply(kongCtx *kong.Context) error
- func (c *Cmd) Run(ctx context.Context, kongCtx *kong.Context, upCtx *upbound.Context) error
- func (c *Cmd) RunInteractive(ctx context.Context, kongCtx *kong.Context, upCtx *upbound.Context, ...) error
- func (c *Cmd) RunRelative(ctx context.Context, upCtx *upbound.Context, initialState NavigationState) error
- func (c *Cmd) RunSwap(ctx context.Context, upCtx *upbound.Context) error
- type ControlPlane
- func (ctp *ControlPlane) Accept(writer kubeContextWriter) (msg string, err error)
- func (ctp *ControlPlane) Back(m model) (model, error)
- func (ctp *ControlPlane) Breadcrumbs() string
- func (ctp *ControlPlane) CanBack() bool
- func (ctp *ControlPlane) Items(ctx context.Context, upCtx *upbound.Context) ([]list.Item, error)
- func (ctp *ControlPlane) NamespacedName() types.NamespacedName
- type Group
- type KeyFunc
- type NavigationState
- func DeriveCloudState(upCtx *upbound.Context, conf *clientcmdapi.Config) (NavigationState, error)
- func DeriveSelfHostedState(conf *clientcmdapi.Config, ingress string, ca []byte, ctp types.NamespacedName) (NavigationState, error)
- func DeriveState(ctx context.Context, upCtx *upbound.Context, conf *clientcmdapi.Config) (NavigationState, error)
- type Organization
- type Root
- type Space
- func (s *Space) Accept(writer kubeContextWriter) (msg string, err error)
- func (s *Space) Back(m model) (model, error)
- func (s *Space) Breadcrumbs() string
- func (s *Space) CanBack() bool
- func (s *Space) GetClient() (client.Client, error)
- func (s *Space) IsCloud() bool
- func (s *Space) Items(ctx context.Context, upCtx *upbound.Context) ([]list.Item, error)
- type Termination
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Accepting ¶
type Accepting interface { NavigationState Accept(writer kubeContextWriter) (string, error) }
Accepting is a model state that provides a method to accept a navigation node.
type AcceptingFunc ¶
type Back ¶
type Back interface { NavigationState Back(m model) (model, error) CanBack() bool }
Back is a model state that provides a method to go back to the parent navigation node.
type Cmd ¶
type Cmd struct { // Common Upbound API configuration Flags upbound.Flags `embed:""` Argument string `` /* 132-byte string literal not displayed */ Short bool `short:"s" env:"UP_SHORT" name:"short" help:"Short output."` KubeContext string `env:"UP_CONTEXT" default:"upbound" name:"context" help:"Kubernetes context to operate on."` File string `short:"f" name:"kubeconfig" help:"Kubeconfig to modify when saving a new context"` }
func (*Cmd) RunInteractive ¶
func (*Cmd) RunRelative ¶
type ControlPlane ¶
ControlPlane provides the navigation node for a concrete controlplane.
func (*ControlPlane) Accept ¶
func (ctp *ControlPlane) Accept(writer kubeContextWriter) (msg string, err error)
Accept upserts a controlplane context and cluster to the chosen kubeconfig.
func (*ControlPlane) Back ¶
func (ctp *ControlPlane) Back(m model) (model, error)
func (*ControlPlane) Breadcrumbs ¶
func (ctp *ControlPlane) Breadcrumbs() string
func (*ControlPlane) CanBack ¶
func (ctp *ControlPlane) CanBack() bool
func (*ControlPlane) NamespacedName ¶
func (ctp *ControlPlane) NamespacedName() types.NamespacedName
type Group ¶
Group provides the navigation node for a concrete group aka namespace.
func (*Group) Accept ¶
Accept upserts the "upbound" kubeconfig context and cluster to the chosen kubeconfig, pointing to the group.
func (*Group) Breadcrumbs ¶
type NavigationState ¶
type NavigationState interface {}
NavigationState is a model state that provides a list of items for a navigation node.
func DeriveCloudState ¶
func DeriveCloudState(upCtx *upbound.Context, conf *clientcmdapi.Config) (NavigationState, error)
func DeriveSelfHostedState ¶
func DeriveSelfHostedState(conf *clientcmdapi.Config, ingress string, ca []byte, ctp types.NamespacedName) (NavigationState, error)
func DeriveState ¶
func DeriveState(ctx context.Context, upCtx *upbound.Context, conf *clientcmdapi.Config) (NavigationState, error)
type Organization ¶
type Organization struct {
Name string
}
func (*Organization) Back ¶
func (o *Organization) Back(m model) (model, error)
func (*Organization) Breadcrumbs ¶
func (o *Organization) Breadcrumbs() string
func (*Organization) CanBack ¶
func (o *Organization) CanBack() bool
type Space ¶
type Space struct { Org Organization Name string Ingress string CA []byte AuthInfo *clientcmdapi.AuthInfo }
Space provides the navigation node for a space.
func (*Space) Accept ¶
Accept upserts the "upbound" kubeconfig context and cluster to the chosen kubeconfig, pointing to the space.
func (*Space) Breadcrumbs ¶
type Termination ¶
Termination is a model state that indicates the command should be terminated, optionally with a message and an error.