Skip to content

package backends

import "github.com/cloudboss/unobin/pkg/backends"

Package backends holds the fixed set of state backends a factory can use. An operator selects one by bare name in a stack state declaration, and the resolver looks the name up here. The encrypter set lives in pkg/encrypters the same way.

Constants

const (
    LocalName = "local"
    S3Name    = "s3"
)

Backend names, the registry keys an operator selects in stack state.

Functions

func Backends

func Backends() map[string]sdkstate.BackendType

Backends returns the state backends keyed by the bare name an operator selects in stack state. Names are unique by construction: this is one map literal, so a duplicate is a compile error.

Types

type LocalBackendConfig

type LocalBackendConfig struct {
    Path cfg.String
}

LocalBackendConfig is the operator-facing body under `state: local { ... }`.

type S3BackendConfig

type S3BackendConfig struct {
    Bucket       cfg.String
    Prefix       *cfg.String
    KMSKeyID     *cfg.String
    UsePathStyle *cfg.Boolean
    AWS          *awscfg.Configuration
}

S3BackendConfig is the operator-facing body under `state: s3 { ... }`. The aws object holds the shared AWS connection settings from pkg/awscfg; bucket, prefix, kms-key-id, and use-path-style are the backend's own.