client

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 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) CreateKey

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

func (*HashicorpVaultClient) DeleteSecret

func (c *HashicorpVaultClient) DeleteSecret(id string, data map[string][]string) error

func (*HashicorpVaultClient) DestroyKey

func (c *HashicorpVaultClient) DestroyKey(id string) error

func (*HashicorpVaultClient) DestroySecret

func (c *HashicorpVaultClient) DestroySecret(id string, data map[string][]string) error

func (*HashicorpVaultClient) GetKey

func (c *HashicorpVaultClient) GetKey(id string) (*api.Secret, error)

func (*HashicorpVaultClient) HealthCheck

func (c *HashicorpVaultClient) HealthCheck() error

func (*HashicorpVaultClient) ImportKey

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

func (*HashicorpVaultClient) ListKeys

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

func (*HashicorpVaultClient) ListSecrets

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

func (*HashicorpVaultClient) Mount

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

func (*HashicorpVaultClient) ReadData

func (c *HashicorpVaultClient) ReadData(id string, data map[string][]string) (*api.Secret, error)

func (*HashicorpVaultClient) ReadMetadata

func (c *HashicorpVaultClient) ReadMetadata(id string) (*api.Secret, error)

func (*HashicorpVaultClient) RestoreSecret

func (c *HashicorpVaultClient) RestoreSecret(id string, data map[string][]string) error

func (*HashicorpVaultClient) SetSecret

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

func (*HashicorpVaultClient) SetToken

func (c *HashicorpVaultClient) SetToken(token string)

func (*HashicorpVaultClient) Sign

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

func (*HashicorpVaultClient) UnwrapToken

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

func (*HashicorpVaultClient) UpdateKey

func (c *HashicorpVaultClient) UpdateKey(id 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