Documentation ¶
Index ¶
- func New(opts ...Option) (wtypes.Store, error)
- type Option
- func WithID(t []byte) Option
- func WithPassphrase(passphrase []byte) Option
- func WithVaultAddr(t string) Option
- func WithVaultAuth(t string) Option
- func WithVaultKubernetesAuth(t string) Option
- func WithVaultKubernetesAuthRole(t string) Option
- func WithVaultKubernetesAuthSATokenPath(t string) Option
- func WithVaultSecretMountPath(t string) Option
- func WithVaultToken(t string) Option
- type Store
- func (s *Store) Location() string
- func (s *Store) Name() string
- func (s *Store) RetrieveAccount(walletID uuid.UUID, accountID uuid.UUID) ([]byte, error)
- func (s *Store) RetrieveAccounts(walletID uuid.UUID) <-chan []byte
- func (s *Store) RetrieveAccountsIndex(walletID uuid.UUID) ([]byte, error)
- func (s *Store) RetrieveWallet(walletName string) ([]byte, error)
- func (s *Store) RetrieveWalletByID(walletID uuid.UUID) ([]byte, error)
- func (s *Store) RetrieveWallets() <-chan []byte
- func (s *Store) StoreAccount(walletID uuid.UUID, accountID uuid.UUID, data []byte) error
- func (s *Store) StoreAccountsIndex(walletID uuid.UUID, data []byte) error
- func (s *Store) StoreWallet(id uuid.UUID, name string, data []byte) error
- type WalletIndexSecret
- type WalletListSecret
- type WalletSecret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new Amazon S3 store. This takes the following options:
- region: a string specifying the Amazon S3 region, defaults to "us-east-1", set with WithRegion()
- id: a byte array specifying an identifying key for the store, defaults to nil, set with WithID()
This expects the access credentials to be in a standard place, e.g. ~/.aws/credentials
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option gives options to New
func WithPassphrase ¶
WithPassphrase sets the passphrase for the store.
func WithVaultKubernetesAuth ¶
WithID sets the ID for the store
func WithVaultKubernetesAuthRole ¶
WithID sets the ID for the store
func WithVaultKubernetesAuthSATokenPath ¶
WithID sets the ID for the store
func WithVaultSecretMountPath ¶
WithID sets the ID for the store
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the store for the wallet held encrypted on Amazon S3.
func (*Store) RetrieveAccount ¶
RetrieveAccount retrieves account-level data. It will fail if it cannot retrieve the data.
func (*Store) RetrieveAccounts ¶
RetrieveAccounts retrieves all account-level data for a wallet.
func (*Store) RetrieveAccountsIndex ¶
RetrieveAccountsIndex retrieves the account index.
func (*Store) RetrieveWallet ¶
RetrieveWallet retrieves wallet-level data. It will fail if it cannot retrieve the data.
func (*Store) RetrieveWalletByID ¶
RetrieveWalletByID retrieves wallet-level data. It will fail if it cannot retrieve the data.
func (*Store) RetrieveWallets ¶
RetrieveWallets retrieves wallet-level data for all wallets.
func (*Store) StoreAccount ¶
StoreAccount stores an account. It will fail if it cannot store the data. Note this will overwrite an existing account with the same ID. It will not, however, allow multiple accounts with the same name to co-exist in the same wallet.
func (*Store) StoreAccountsIndex ¶
StoreAccountsIndex stores the account index.
func (*Store) StoreWallet ¶
StoreWallet stores wallet-level data. It will fail if it cannot store the data. Note that this will overwrite any existing data; it is up to higher-level functions to check for the presence of a wallet with the wallet name and handle clashes accordingly.
type WalletIndexSecret ¶
type WalletIndexSecret struct {
// contains filtered or unexported fields
}
type WalletListSecret ¶
type WalletListSecret struct {
// contains filtered or unexported fields
}
type WalletSecret ¶
type WalletSecret struct {
// contains filtered or unexported fields
}