Documentation ¶
Index ¶
- Constants
- func ConfigAdd(path string)
- func ManageAll(ctx context.Context, managers ...Manager)
- func ManagerConfigAdd(path string)
- func NewClient(ctx context.Context) (*vault.Client, error)
- func NewClientWithConfigPath(ctx context.Context, path string) (*vault.Client, error)
- func NewClientWithOptions(ctx context.Context, options *Options) (*vault.Client, error)
- type Manager
- type ManagerOptions
- type ManagerPool
- type Options
Constants ¶
View Source
const (
ManagersRoot = root + ".managers"
)
Variables ¶
This section is empty.
Functions ¶
func ManagerConfigAdd ¶
func ManagerConfigAdd(path string)
func NewClientWithConfigPath ¶
NewClientWithConfigPath returns a new vault client with options from config path.
Types ¶
type Manager ¶
type Manager interface { Options() *ManagerOptions Close(context.Context) error Configure(context.Context, map[string]interface{}) error }
Manager vault manager interface.
type ManagerOptions ¶
type ManagerOptions struct { SecretPath string Watcher struct { Enabled bool Increment int } Keys map[string]string }
ManagerOptions represents a vault client options.
func NewManagerOptionsWithPath ¶
func NewManagerOptionsWithPath(path string) (opts *ManagerOptions, err error)
NewManagerOptionsWithPath unmarshals manager options based a given key path.
type ManagerPool ¶
type ManagerPool struct {
// contains filtered or unexported fields
}
ManagerPool represents a manager pool for vault.
func NewManagerPool ¶
func NewManagerPool(client *vault.Client, managers ...Manager) *ManagerPool
NewManagerPool returns a new manager pool.
func (*ManagerPool) Configure ¶
func (m *ManagerPool) Configure(ctx context.Context, manager Manager) error
Configure configures manager with options from this manager pool.
func (*ManagerPool) ManageAll ¶
func (m *ManagerPool) ManageAll(ctx context.Context)
ManageAll configures all managers from this manager pool.
type Options ¶
type Options struct { Addr string Type string CaPath string Token string K8s struct { Role string Jwt struct { File string Content string } } }
Options vault client options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.