safe

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSCredentials

type AWSCredentials struct {
	AccessKey string
	SecretKey string
	Secret    *vault.Secret
}

type Client

type Client struct {
	*vault.Client
}

func NewClient

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

func (*Client) Decrypt

func (c *Client) Decrypt(path string, ciphertext string) (string, error)

func (*Client) Encrypt

func (c *Client) Encrypt(path string, plaintext string) (string, error)

func (*Client) GetAWSCredentials

func (c *Client) GetAWSCredentials(path string) (*AWSCredentials, error)

func (*Client) GetDatabaseCredentials

func (c *Client) GetDatabaseCredentials(path string) (*DatabaseCredentials, error)

func (*Client) GetGCPServiceAccount added in v1.0.1

func (c *Client) GetGCPServiceAccount(path string) (*GCPCredentials, error)

func (*Client) GetSecret

func (c *Client) GetSecret(mountPath string, secretPath string) (*vault.KVSecret, error)

func (*Client) GetTLSConfig

func (c *Client) GetTLSConfig(path string, data map[string]interface{}) (*tls.Config, error)

func (*Client) RenewSecret

func (c *Client) RenewSecret(secret *vault.Secret) error

type Credential

type Credential struct {
	Token    string
	RoleID   string
	SecretID string
}

type DatabaseCredentials

type DatabaseCredentials struct {
	Username string
	Password string
	LeaseID  string
}

type GCPCredentials added in v1.0.1

type GCPCredentials struct {
	Data   *google.Credentials
	Secret *vault.Secret
}

type Vault

type Vault struct {
	Address        string
	Authentication string
	Path           string
	Credential     Credential
}

Jump to

Keyboard shortcuts

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