Version: v1.0.7 Latest Latest

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 13 Imported by: 0




View Source
const KVMountPath = "secret/"

kv mount path


This section is empty.


func FinIdPath added in v1.0.5

func FinIdPath(u *user.User) (spath string)

func GetClient added in v1.0.1

func GetClient(ctx context.Context) (*pfvault.Client, error)

GetClient returns a postfinance vault client. The context is used to detect the calling user and loading his vault approleId

func GetStores

func GetStores() []string

GetStores returns all registered stores. Registered stores are all available stores that a user may configure as a store of secretsfs.

func RegisterStore

func RegisterStore(s Store)

RegisterStore registers available stores if a store is also set to be the backend store it will be set here

func VaultApproleLogin added in v1.0.0

func VaultApproleLogin(c *api.Client, approleId string) (accessToken string, err error)


type Secret added in v1.0.0

type Secret struct {
	Path    string
	Mode    int64
	Content string
	Subs    []*Secret

type Store

type Store interface {
	// for convenience
	GetSecret(spath string, ctx context.Context) (secret *Secret, err error)

	// String() is used to distinguish between different store implementations
	String() string

Store interface describes functions a new store should implement.

func GetStore

func GetStore() *Store

GetStore returns currently active Store Implementation

type VaultKv added in v1.0.0

type VaultKv struct {

func (*VaultKv) GetSecret added in v1.0.0

func (s *VaultKv) GetSecret(spath string, ctx context.Context) (*Secret, error)

func (*VaultKv) String added in v1.0.0

func (s *VaultKv) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL