clients

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VaultClient

type VaultClient interface {
	Sys() VaultSysClient
	Logical() VaultLogicalClient
}

VaultClient wraps the vault client

func NewVaultClient

func NewVaultClient(ctx context.Context, kube client.Client, mg resource.Managed) (VaultClient, error)

NewVaultClient creates a new Vault client. This function should be used in the Connect method of controller connectors.

type VaultClientWrapper

type VaultClientWrapper struct {
	*vault.Client
}

VaultClientWrapper implements the VaultClient interface and provides the subclient abstractions

func (*VaultClientWrapper) Logical added in v0.2.0

func (vc *VaultClientWrapper) Logical() VaultLogicalClient

Logical returns the vault logical subclient

func (*VaultClientWrapper) Sys

Sys returns the vault sys subclient

type VaultLogicalClient added in v0.2.0

type VaultLogicalClient interface {
	Write(path string, data map[string]interface{}) (*vault.Secret, error)
	Delete(path string) (*vault.Secret, error)
	Read(path string) (*vault.Secret, error)
}

VaultLogicalClient is the interface that wraps the vault Logical subclient

type VaultSysClient

type VaultSysClient interface {
	GetPolicy(name string) (string, error)
	PutPolicy(name string, rules string) error
	DeletePolicy(name string) error
}

VaultSysClient is the interface that wraps the vault Sys subclient

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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