vault

package
v1.0.0-beta.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManagersRoot = root + ".managers"
)

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func ManageAll

func ManageAll(ctx context.Context, managers ...Manager)

func ManagerConfigAdd

func ManagerConfigAdd(path string)

func NewClient

func NewClient(ctx context.Context) (*vault.Client, error)

func NewClientWithConfigPath

func NewClientWithConfigPath(ctx context.Context, path string) (*vault.Client, error)

func NewClientWithOptions

func NewClientWithOptions(ctx context.Context, options *Options) (*vault.Client, error)

Types

type Manager

type Manager interface {
	Options() *ManagerOptions
	Close(context.Context) error
	Configure(context.Context, map[string]interface{}) error
}

type ManagerOptions

type ManagerOptions struct {
	SecretPath string
	Watcher    struct {
		Enabled   bool
		Increment int
	}
	Keys map[string]string
}

func NewManagerOptionsWithPath

func NewManagerOptionsWithPath(path string) (opts *ManagerOptions, err error)

type ManagerPool

type ManagerPool struct {
	// contains filtered or unexported fields
}

func NewManagerPool

func NewManagerPool(client *vault.Client, managers ...Manager) *ManagerPool

func (*ManagerPool) Configure

func (m *ManagerPool) Configure(ctx context.Context, manager Manager) error

func (*ManagerPool) ManageAll

func (m *ManagerPool) ManageAll(ctx context.Context)

type Options

type Options struct {
	Addr   string
	Type   string
	CaPath string
	Token  string
	K8s    struct {
		Role string
		Jwt  struct {
			File    string
			Content string
		}
	}
}

func NewOptions

func NewOptions() (*Options, error)

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL