Documentation
¶
Index ¶
Constants ¶
const ( CommandApply = "apply" CommandBuild = "build" CommandCompletion = "completion" CommandConfigure = "configure" CommandDB = "db" CommandDelete = "delete" CommandGet = "get" CommandHelp = "help" CommandInit = "init" CommandPull = "pull" CommandRun = "run" CommandVersion = "version" CommandWait = "wait" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthProvider ¶
AuthProvider resolves a bearer token when one is available. A provider should return ("", nil) when auth is simply not configured or no token is stored; commands that need authenticated endpoints can rely on the server response.
type Config ¶
type Config struct {
Env Env
Auth AuthProvider
RegistryURL *string
RegistryToken *string
OnTokenResolved func(token string) error
}
Config contains the shared runtime dependencies used by command constructors.
func (Config) WithDefaults ¶
type Deps ¶
type Deps struct {
Runtime Runtime
Auth AuthProvider
Kinds *scheme.Registry
}
Deps is passed to every new-style command constructor.
It is intentionally concrete and uniform. Local commands can ignore the fields they do not need. Registry/auth are lazy capabilities: passing this value to a command must not perform network or token work by itself.
type Env ¶
Env abstracts environment lookup so tests and embedded CLIs can avoid process-global os.Getenv state.
type NoopAuthProvider ¶
type NoopAuthProvider struct{}
NoopAuthProvider is the default until an embedding application supplies auth.
type RegistryTarget ¶
RegistryTarget is the resolved registry address and bearer token for a command invocation.