util

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Login(ctx context.Context, authMethod vault.AuthMethod) (*vault.Secret, error)
}

type Client

type Client interface {
	SetToken(v string)
	Token() string
	ClearToken()
	Auth() Auth
	Logical() Logical
	AuthToken() Token
	Namespace() string
	SetNamespace(namespace string)
	AddHeader(key, value string)
}

type JwtProviderFactory

type JwtProviderFactory func(name, namespace, roleArn string, aud []string, region string) (credentials.Provider, error)

type Logical

type Logical interface {
	ReadWithDataWithContext(ctx context.Context, path string, data map[string][]string) (*vault.Secret, error)
	ListWithContext(ctx context.Context, path string) (*vault.Secret, error)
	WriteWithContext(ctx context.Context, path string, data map[string]any) (*vault.Secret, error)
	DeleteWithContext(ctx context.Context, path string) (*vault.Secret, error)
}

type Token

type Token interface {
	RevokeSelfWithContext(ctx context.Context, token string) error
	LookupSelfWithContext(ctx context.Context) (*vault.Secret, error)
}

type VaultClient added in v0.9.12

type VaultClient struct {
	SetTokenFunc     func(v string)
	TokenFunc        func() string
	ClearTokenFunc   func()
	AuthField        Auth
	LogicalField     Logical
	AuthTokenField   Token
	NamespaceFunc    func() string
	SetNamespaceFunc func(namespace string)
	AddHeaderFunc    func(key, value string)
}

func (VaultClient) AddHeader added in v0.9.12

func (v VaultClient) AddHeader(key, value string)

func (VaultClient) Auth added in v0.9.12

func (v VaultClient) Auth() Auth

func (VaultClient) AuthToken added in v0.9.12

func (v VaultClient) AuthToken() Token

func (VaultClient) ClearToken added in v0.9.12

func (v VaultClient) ClearToken()

func (VaultClient) Logical added in v0.9.12

func (v VaultClient) Logical() Logical

func (VaultClient) Namespace added in v0.9.14

func (v VaultClient) Namespace() string

func (VaultClient) SetNamespace added in v0.9.12

func (v VaultClient) SetNamespace(namespace string)

func (VaultClient) SetToken added in v0.9.12

func (v VaultClient) SetToken(token string)

func (VaultClient) Token added in v0.9.12

func (v VaultClient) Token() string

Jump to

Keyboard shortcuts

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