client

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MountPoint    string
	Address       string
	CACert        string
	CAPath        string
	ClientCert    string
	ClientKey     string
	TLSServerName string
	Namespace     string
	ClientTimeout time.Duration
	RateLimit     float64
	BurstLimit    int
	MaxRetries    int
	SkipVerify    bool
}

Config object that be converted into an api.Config later

func NewConfig

func NewConfig(specs *entities.HashicorpConfig) *Config

func (*Config) ToHashicorpConfig

func (c *Config) ToHashicorpConfig() (*api.Config, error)

ToHashicorpConfig extracts an api.Config object from self

type HashicorpVaultClient

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

func NewClient

func NewClient(cfg *Config) (*HashicorpVaultClient, error)

func (*HashicorpVaultClient) CreateWallet

func (c *HashicorpVaultClient) CreateWallet(data map[string]interface{}) (*api.Secret, error)

func (*HashicorpVaultClient) DestroyWallet

func (c *HashicorpVaultClient) DestroyWallet(pubkey string) error

func (*HashicorpVaultClient) GetWallet

func (c *HashicorpVaultClient) GetWallet(pubkey string) (*api.Secret, error)

func (*HashicorpVaultClient) HealthCheck

func (c *HashicorpVaultClient) HealthCheck() error

func (*HashicorpVaultClient) ImportWallet

func (c *HashicorpVaultClient) ImportWallet(data map[string]interface{}) (*api.Secret, error)

func (*HashicorpVaultClient) ListWallets

func (c *HashicorpVaultClient) ListWallets() (*api.Secret, error)

func (*HashicorpVaultClient) Mount

func (c *HashicorpVaultClient) Mount(path string, mountInfo *api.MountInput) error

func (*HashicorpVaultClient) SetToken

func (c *HashicorpVaultClient) SetToken(token string)

func (*HashicorpVaultClient) Sign

func (c *HashicorpVaultClient) Sign(pubkey, typeSign string, data []byte) (*api.Secret, error)

func (*HashicorpVaultClient) UnwrapToken

func (c *HashicorpVaultClient) UnwrapToken(token string) (*api.Secret, error)

func (*HashicorpVaultClient) UpdateWallet

func (c *HashicorpVaultClient) UpdateWallet(pubkey string, data map[string]interface{}) (*api.Secret, error)

Jump to

Keyboard shortcuts

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