Documentation
¶
Index ¶
- Variables
- func FindVaultRoot(start string, fs ports.FileSystem) (string, error)
- type CheckResult
- type CheckStatus
- type ConflictResolver
- type DoctorReport
- type DoctorService
- type ImportOptions
- type ImportReport
- type InitOptions
- type InitService
- type KeysService
- type ListingService
- func (s ListingService) FindKeys(root, pattern string) ([]string, error)
- func (s ListingService) ListAllKeys(root string) ([]domain.KeyInfo, error)
- func (s ListingService) ListEnvs(root, project string) ([]string, error)
- func (s ListingService) ListKeys(root, project, env string) ([]domain.KeyInfo, error)
- func (s ListingService) ListProjects(root string) ([]string, error)
- type MergeStrategy
- type RotateReport
- type SecretService
- func (s SecretService) ExportEnv(ctx context.Context, root, project, env string) ([]byte, error)
- func (s SecretService) ImportEnv(ctx context.Context, root, project, env string, input []byte, ...) (ImportReport, error)
- func (s SecretService) Set(ctx context.Context, root, project, env, key, value string) error
- func (s SecretService) Unset(ctx context.Context, root, project, env, key string) error
- type SyncService
- type VaultStore
- func (s VaultStore) ConfigPath(root string) string
- func (s VaultStore) EnsureLayout(root string) error
- func (s VaultStore) IndexPath(root string) string
- func (s VaultStore) ListSecretFiles(root string) ([]string, error)
- func (s VaultStore) LoadConfig(root string) (domain.Config, error)
- func (s VaultStore) LoadIndex(root string) (domain.Index, error)
- func (s VaultStore) SaveConfig(root string, cfg domain.Config) error
- func (s VaultStore) SaveIndex(root string, idx domain.Index) error
- func (s VaultStore) SecretFilePath(root, project, env string) string
- func (s VaultStore) SecretsDir(root string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrVaultNotFound = errors.New("vault config not found")
Functions ¶
func FindVaultRoot ¶
func FindVaultRoot(start string, fs ports.FileSystem) (string, error)
Types ¶
type CheckResult ¶
type CheckResult struct {
Name string
Status CheckStatus
Message string
}
type CheckStatus ¶
type CheckStatus string
const ( CheckOK CheckStatus = "ok" CheckWarn CheckStatus = "warn" CheckFail CheckStatus = "fail" )
type ConflictResolver ¶
type DoctorReport ¶
type DoctorReport struct {
Checks []CheckResult
}
func (DoctorReport) HasFailures ¶
func (r DoctorReport) HasFailures() bool
type DoctorService ¶
type DoctorService struct {
Store VaultStore
Encrypter ports.Encrypter
FS ports.FileSystem
}
func (DoctorService) Run ¶
func (s DoctorService) Run(ctx context.Context, root string) (DoctorReport, error)
type ImportOptions ¶
type ImportOptions struct {
Strategy MergeStrategy
Resolver ConflictResolver
}
type ImportReport ¶
type InitOptions ¶
type InitService ¶
type InitService struct {
Store VaultStore
Git ports.Git
Clock ports.Clock
}
func (InitService) Init ¶
func (s InitService) Init(ctx context.Context, opts InitOptions) error
type KeysService ¶
type KeysService struct {
Store VaultStore
Encrypter ports.Encrypter
}
func (KeysService) Add ¶
func (s KeysService) Add(root, recipient string) error
func (KeysService) Remove ¶
func (s KeysService) Remove(root, recipient string) error
func (KeysService) Rotate ¶
func (s KeysService) Rotate(ctx context.Context, root string) (RotateReport, error)
type ListingService ¶
type ListingService struct {
Store VaultStore
}
func (ListingService) FindKeys ¶
func (s ListingService) FindKeys(root, pattern string) ([]string, error)
func (ListingService) ListAllKeys ¶
func (s ListingService) ListAllKeys(root string) ([]domain.KeyInfo, error)
func (ListingService) ListEnvs ¶
func (s ListingService) ListEnvs(root, project string) ([]string, error)
func (ListingService) ListKeys ¶
func (s ListingService) ListKeys(root, project, env string) ([]domain.KeyInfo, error)
func (ListingService) ListProjects ¶
func (s ListingService) ListProjects(root string) ([]string, error)
type MergeStrategy ¶
type MergeStrategy string
const ( MergePreferVault MergeStrategy = "prefer-vault" MergePreferFile MergeStrategy = "prefer-file" MergeInteractive MergeStrategy = "interactive" )
type SecretService ¶
type SecretService struct {
Store VaultStore
Encrypter ports.Encrypter
Clock ports.Clock
}
func (SecretService) ImportEnv ¶
func (s SecretService) ImportEnv(ctx context.Context, root, project, env string, input []byte, options ImportOptions) (ImportReport, error)
type SyncService ¶
type VaultStore ¶
type VaultStore struct {
FS ports.FileSystem
}
func (VaultStore) ConfigPath ¶
func (s VaultStore) ConfigPath(root string) string
func (VaultStore) EnsureLayout ¶
func (s VaultStore) EnsureLayout(root string) error
func (VaultStore) IndexPath ¶
func (s VaultStore) IndexPath(root string) string
func (VaultStore) ListSecretFiles ¶
func (s VaultStore) ListSecretFiles(root string) ([]string, error)
func (VaultStore) LoadConfig ¶
func (s VaultStore) LoadConfig(root string) (domain.Config, error)
func (VaultStore) SaveConfig ¶
func (s VaultStore) SaveConfig(root string, cfg domain.Config) error
func (VaultStore) SecretFilePath ¶
func (s VaultStore) SecretFilePath(root, project, env string) string
func (VaultStore) SecretsDir ¶
func (s VaultStore) SecretsDir(root string) string
Click to show internal directories.
Click to hide internal directories.