vault

package
v0.0.0-...-7b75ba9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps the HashiCorp Vault API client with additional functionality.

func InitClient

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

InitClient initializes and returns a new Vault client using the provided configuration.

func (*Client) CreateRaftSnapshot

func (c *Client) CreateRaftSnapshot() (*bytes.Buffer, error)

CreateRaftSnapshot creates a snapshot of the Vault's Raft storage backend. Returns a buffer containing the snapshot data.

func (*Client) LoginAppRole

func (c *Client) LoginAppRole(roleID, secretID string) error

LoginAppRole authenticates to Vault using the AppRole method with the provided roleID and secretID.

type Config

type Config struct {
	Address  string
	Timeout  time.Duration
	RoleID   string
	SecretID string
}

Config defines the necessary configuration to initialize a Vault client.

Jump to

Keyboard shortcuts

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