Documentation
¶
Index ¶
- Constants
- func IsNotFoundError(err error) bool
- func IsNotInitializedError(err error) bool
- func IsSnapshotTag(env, tag string) bool
- func IsUserRecipientTag(tag string) bool
- func LoadIdentitiesForRepo(ks KeyStore, owner, repo string) ([]agecrypto.Identity, error)
- func PullAllRecipients(ctx context.Context, reg Registry, ref string, token string) ([]string, error)
- func PullSecretsWithDigest(ctx context.Context, reg Registry, ref, token string, ...) (map[string]string, string, error)
- func RecipientTagPrefix() string
- func RepoKeystoreKey(owner, repo string) string
- func SecretsExists(ctx context.Context, reg Registry, ref, token string) bool
- type App
- func (a *App) AddSecret(ctx context.Context, env, key, value string) (err error)
- func (a *App) CreateEnvironment(name string) (err error)
- func (a *App) CurrentEnvironment() (name string, err error)
- func (a *App) DeleteEnvironment(name string) (err error)
- func (a *App) DeleteSecret(ctx context.Context, env, key string) (err error)
- func (a *App) DiffHistory(ctx context.Context, env string, fromIdx, toIdx int) (diff *Diff, err error)
- func (a *App) EditSecret(ctx context.Context, env, key, value string) (err error)
- func (a *App) InitializeRepository(ctx context.Context) (result *InitResult, err error)
- func (a *App) ListEnvironments() (envs []EnvInfo, err error)
- func (a *App) ListHistory(ctx context.Context, env string) (history []HistoryEntry, err error)
- func (a *App) ListRecipients(ctx context.Context) (recipients []RecipientInfo, err error)
- func (a *App) ListSecrets(ctx context.Context, env string) (result map[string]string, err error)
- func (a *App) PullSecrets(ctx context.Context, env string) (data []byte, output string, count int, err error)
- func (a *App) PullSecretsData(ctx context.Context, env string) (result *PulledSecrets, err error)
- func (a *App) PullSecretsToFile(ctx context.Context, env string) (err error)
- func (a *App) ReadConfig() (content string, err error)
- func (a *App) RenameEnvironment(oldName, newName string) (err error)
- func (a *App) RestoreHistory(ctx context.Context, env string, idx int) (err error)
- func (a *App) SetRepositoryDir(dir string)
- func (a *App) SwitchEnvironment(name string) (err error)
- func (a *App) SwitchPrevious() (name string, err error)
- func (a *App) SyncSecrets(ctx context.Context, env string) (err error)
- func (a *App) WriteConfig(content string) (err error)
- type Diff
- type EnvInfo
- type EventHandler
- type HistoryEntry
- type InitResult
- type KeyStore
- type PlatformClient
- type ProgressStep
- type PulledSecrets
- type RecipientInfo
- type Registry
- type RepoDetector
- type ResolvedEnvironment
- type TokenProvider
Constants ¶
View Source
const ( KeystoreService = "enbu" DefaultEnvironment = "default" )
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundError ¶
func IsNotInitializedError ¶
func IsSnapshotTag ¶
func IsUserRecipientTag ¶
func LoadIdentitiesForRepo ¶
func PullAllRecipients ¶
func PullSecretsWithDigest ¶
func RecipientTagPrefix ¶
func RecipientTagPrefix() string
func RepoKeystoreKey ¶
Types ¶
type App ¶
type App struct {
Registry Registry
TokenProvider TokenProvider
KeyStore KeyStore
RepoDetector RepoDetector
Git gitprovider.Client
Platform PlatformClient
Events EventHandler
RegistryHost string
RepositoryDir string
}
func (*App) CreateEnvironment ¶
func (*App) CurrentEnvironment ¶
func (*App) DeleteEnvironment ¶
func (*App) DeleteSecret ¶
func (*App) DiffHistory ¶
func (*App) EditSecret ¶
func (*App) InitializeRepository ¶
func (a *App) InitializeRepository(ctx context.Context) (result *InitResult, err error)
func (*App) ListEnvironments ¶
func (*App) ListHistory ¶
func (*App) ListRecipients ¶
func (a *App) ListRecipients(ctx context.Context) (recipients []RecipientInfo, err error)
func (*App) ListSecrets ¶
func (*App) PullSecrets ¶
func (*App) PullSecretsData ¶ added in v0.8.0
func (*App) PullSecretsToFile ¶
func (*App) ReadConfig ¶
func (*App) RenameEnvironment ¶
func (*App) RestoreHistory ¶
func (*App) SetRepositoryDir ¶
func (*App) SwitchEnvironment ¶
func (*App) SwitchPrevious ¶
func (*App) WriteConfig ¶
type EventHandler ¶
type EventHandler interface {
OnProgress(msg string)
OnStepProgress(step ProgressStep)
OnConflictRetry(attempt, maxAttempts int)
}
type HistoryEntry ¶
type InitResult ¶
type PlatformClient ¶
type ProgressStep ¶ added in v0.7.4
type PulledSecrets ¶ added in v0.8.0
type RecipientInfo ¶
type Registry ¶
type Registry interface {
Push(ctx context.Context, ref string, mediaType string, data []byte, token string, opts *oci.PushOptions) error
Pull(ctx context.Context, ref string, token string) ([]byte, error)
ListTags(ctx context.Context, ref string, token string) ([]string, error)
GetDigest(ctx context.Context, ref string, token string) (string, error)
}
type RepoDetector ¶
type ResolvedEnvironment ¶
func ResolveEnvironment ¶
func ResolveEnvironment(name string) (*ResolvedEnvironment, error)
type TokenProvider ¶
Click to show internal directories.
Click to hide internal directories.