Documentation ¶
Index ¶
- func GetPrivateKey(storage SecretStorage, path string) (*rsa.PrivateKey, error)
- func GetPublicKey(storage SecretStorage, path string) (*rsa.PublicKey, error)
- func LoadKeyFromBlob(data []byte) (interface{}, error)
- func LoadPrivateKey(data []byte) (*rsa.PrivateKey, error)
- func LoadPublicKey(data []byte) (*rsa.PublicKey, error)
- type ConsulClient
- type LocalStorage
- type LocalStorageConfig
- type SecretData
- type SecretStorage
- type StorageConfig
- type VaultClient
- type VaultStorage
- type VaultStorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPrivateKey ¶
func GetPrivateKey(storage SecretStorage, path string) (*rsa.PrivateKey, error)
func GetPublicKey ¶
func GetPublicKey(storage SecretStorage, path string) (*rsa.PublicKey, error)
func LoadKeyFromBlob ¶
func LoadPrivateKey ¶
func LoadPrivateKey(data []byte) (*rsa.PrivateKey, error)
Types ¶
type ConsulClient ¶
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
func NewLocalStorage ¶
func NewLocalStorage(cfg *LocalStorageConfig) *LocalStorage
func (*LocalStorage) ReadStringArray ¶
func (s *LocalStorage) ReadStringArray(path string) ([]string, error)
func (*LocalStorage) ReadStringValue ¶
func (s *LocalStorage) ReadStringValue(path string) (string, error)
type LocalStorageConfig ¶
type LocalStorageConfig struct {
Values map[string]interface{} `json:"values"`
}
type SecretData ¶
type SecretData = map[string]interface{}
type SecretStorage ¶
type SecretStorage interface { ReadStringValue(path string) (string, error) ReadStringArray(path string) ([]string, error) }
SecretStorage defines interface for reading from a confidential storage
func NewSecretStorage ¶
func NewSecretStorage(cfg *StorageConfig) (SecretStorage, error)
type StorageConfig ¶
type StorageConfig struct { Vault *VaultStorageConfig `json:"vault"` Local *LocalStorageConfig `json:"local"` }
type VaultClient ¶
type VaultStorage ¶
type VaultStorage struct {
// contains filtered or unexported fields
}
func NewVaultStorage ¶
func NewVaultStorage(cfg *VaultStorageConfig) (*VaultStorage, error)
func (*VaultStorage) ReadSecret ¶
func (s *VaultStorage) ReadSecret(path string) (SecretData, error)
func (*VaultStorage) ReadStringArray ¶
func (s *VaultStorage) ReadStringArray(path string) ([]string, error)
func (*VaultStorage) ReadStringValue ¶
func (s *VaultStorage) ReadStringValue(path string) (string, error)
type VaultStorageConfig ¶
Click to show internal directories.
Click to hide internal directories.