Documentation
¶
Index ¶
- Constants
- type AppContext
- func (a *AppContext) Client() (*client.Client, error)
- func (a *AppContext) Config() *types.Config
- func (a *AppContext) EnvID() string
- func (a *AppContext) Environments(ctx context.Context) ([]environment.Environment, error)
- func (a *AppContext) IsJSON() bool
- func (a *AppContext) PreviewEnabled() bool
- func (a *AppContext) SelectEnvironment(id string)
- func (a *AppContext) UnauthClient() (*client.Client, error)
- type Options
- type OutputMode
Constants ¶
View Source
const ( // AppContextKey is the context key under which the CLI's AppContext is stored; // set it with context.WithValue and read it back with From. AppContextKey contextKey = "arcane_app_context" OutputModeText OutputMode = "text" OutputModeJSON OutputMode = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
func New ¶
func New(opts Options) (*AppContext, error)
func (*AppContext) Config ¶
func (a *AppContext) Config() *types.Config
func (*AppContext) EnvID ¶
func (a *AppContext) EnvID() string
func (*AppContext) Environments ¶ added in v2.16.0
func (a *AppContext) Environments(ctx context.Context) ([]environment.Environment, error)
Environments loads the complete visible, enabled environment list once per invocation.
func (*AppContext) IsJSON ¶
func (a *AppContext) IsJSON() bool
func (*AppContext) PreviewEnabled ¶ added in v2.16.0
func (a *AppContext) PreviewEnabled() bool
PreviewEnabled reports whether this command still needs an environment scope.
func (*AppContext) SelectEnvironment ¶ added in v2.16.0
func (a *AppContext) SelectEnvironment(id string)
SelectEnvironment pins subsequent requests without changing persisted configuration.
func (*AppContext) UnauthClient ¶
func (a *AppContext) UnauthClient() (*client.Client, error)
type OutputMode ¶
type OutputMode string
Click to show internal directories.
Click to hide internal directories.