util

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 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
	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]interface{}) (*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 VClient

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

func (VClient) AddHeader

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

func (VClient) Auth

func (v VClient) Auth() Auth

func (VClient) AuthToken

func (v VClient) AuthToken() Token

func (VClient) ClearToken

func (v VClient) ClearToken()

func (VClient) Logical

func (v VClient) Logical() Logical

func (VClient) SetNamespace

func (v VClient) SetNamespace(namespace string)

func (VClient) SetToken

func (v VClient) SetToken(token string)

func (VClient) Token

func (v VClient) Token() string

Jump to

Keyboard shortcuts

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