vault

package
v0.0.0-...-f9509b0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObservedRetryPolicy

func ObservedRetryPolicy(log *zap.Logger, metricSink metrics.MetricSink) func(ctx context.Context, resp *http.Response, err error) (bool, error)

Types

type Client

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

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) Delete

func (d *Client) Delete(ctx context.Context, p string) (*vaultapi.Secret, error)

func (*Client) DeleteWithData

func (d *Client) DeleteWithData(ctx context.Context, p string, data map[string][]string) (*vaultapi.Secret, error)

func (*Client) List

func (d *Client) List(ctx context.Context, p string) (*vaultapi.Secret, error)

func (*Client) Raw

func (d *Client) Raw(ctx context.Context, method string, path string, body any) (*vaultapi.Secret, error)

func (*Client) Read

func (d *Client) Read(ctx context.Context, p string) (*vaultapi.Secret, error)

func (*Client) ReadWithData

func (d *Client) ReadWithData(ctx context.Context, p string, data map[string][]string) (*vaultapi.Secret, error)

func (*Client) SetLimiter

func (d *Client) SetLimiter(limiter *rate.Limiter)

func (*Client) SetToken

func (d *Client) SetToken(token string)

func (*Client) Token

func (d *Client) Token() string

func (*Client) Write

func (d *Client) Write(ctx context.Context, p string, data map[string]interface{}) (*vaultapi.Secret, error)

type Config

type Config struct {
	Address    string
	Token      string
	Insecure   bool
	MetricSink metrics.MetricSink
	Log        *zap.Logger
}

func DefaultConfig

func DefaultConfig() *Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳