Documentation
¶
Overview ¶
Package appsetup defines the host contract for first-party app setup. Provider-specific setup policy belongs to the plugin that implements Runner.
Index ¶
Constants ¶
const ( MutationUpdated = "updated" MutationUnchanged = "unchanged" MutationPartial = "partial" MutationDurabilityUncertain = "durability_uncertain" )
Variables ¶
var ErrSecretNotFound = errors.New("app setup secret not found")
ErrSecretNotFound lets the host hide its secret-store implementation.
Functions ¶
Types ¶
type ConfigResult ¶
ConfigResult is the provider-independent result of replacing app configuration.
type Configuration ¶
type Configuration struct {
Config []byte
Secrets map[string]string
Policies map[string]presentation.PolicyConfig
LaunchAction string
LaunchActionProvided bool
}
Configuration is the validated app configuration envelope supplied by the CLI.
type Host ¶
type Host interface {
ReadConfiguration(string, io.Reader) (Configuration, error)
LoadDocument() (config.Document, error)
DaemonStatus(context.Context) (Status, error)
ResolveSecret(context.Context, string) (string, error)
StoreSecret(context.Context, string, string) error
ReplaceConfiguration(context.Context, ReplaceConfigRequest) Mutation
}
Host provides setup implementations with generic configuration and secret operations. It contains no provider policy.
type Kind ¶
type Kind uint8
Kind classifies a setup failure without coupling plugins to CLI exit codes.
type Mutation ¶
type Mutation struct {
Result ConfigResult
Outcome MutationOutcome
CloseWarning bool
Err error
}
Mutation is the host's observation of one configuration transaction.
type MutationOutcome ¶
type MutationOutcome uint8
MutationOutcome records whether a missing daemon response can still have committed the requested configuration.
const ( MutationKnown MutationOutcome = iota MutationUnknown )
type ReplaceConfigRequest ¶
type ReplaceConfigRequest struct {
AppID string
ExpectedGeneration uint64
Config []byte
Secrets map[string]string
Policies map[string]presentation.PolicyConfig
LaunchAction string
}
ReplaceConfigRequest contains the complete generic app transaction.