data

package
v0.3.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewZipkinTracer

func NewZipkinTracer(c *conf.Data) (*sdktrace.TracerProvider, error)

initTracer creates a new trace provider instance

Types

type Data

type Data struct {
}

Data .

func NewData

func NewData(c *conf.Data, logger log.Logger) (*Data, func(), error)

NewData .

type VaultClient

type VaultClient struct {
	Client *vault.Client
	// contains filtered or unexported fields
}

func (*VaultClient) CreatePolicy

func (vc *VaultClient) CreatePolicy(ctx context.Context, path string, policy string) error

func (*VaultClient) CreateSecret

func (vc *VaultClient) CreateSecret(ctx context.Context, secretName string, path string, data map[string]interface{}) (*vault.KVSecret, error)

func (*VaultClient) Delete

func (vc *VaultClient) Delete(ctx context.Context, path string) (*vault.Secret, error)

func (*VaultClient) DeletePolicy

func (vc *VaultClient) DeletePolicy(ctx context.Context, path string) error

func (*VaultClient) DeleteSecret

func (vc *VaultClient) DeleteSecret(ctx context.Context, secretName string, path string) error

func (*VaultClient) DisableAuth

func (vc *VaultClient) DisableAuth(ctx context.Context, path string) error

func (*VaultClient) EnableAuth

func (vc *VaultClient) EnableAuth(ctx context.Context, path string, authOptions *vault.MountInput) error

func (*VaultClient) GetPolicy

func (vc *VaultClient) GetPolicy(ctx context.Context, path string) (string, error)

func (*VaultClient) GetSecret

func (vc *VaultClient) GetSecret(ctx context.Context, secretname, path string) (*vault.KVSecret, error)

func (*VaultClient) GetSecretVersionList

func (vc *VaultClient) GetSecretVersionList(ctx context.Context, secretName string, path string) ([]vault.KVVersionMetadata, error)

func (*VaultClient) Health

func (vc *VaultClient) Health() bool

func (*VaultClient) Read

func (vc *VaultClient) Read(ctx context.Context, path string) (*vault.Secret, error)

func (*VaultClient) RollBackSecret

func (vc *VaultClient) RollBackSecret(ctx context.Context, secretName string, path string, toVersion int) error

func (*VaultClient) Write

func (vc *VaultClient) Write(ctx context.Context, path string, data map[string]interface{}) (*vault.Secret, error)

type VaultClientInterface

type VaultClientInterface interface {
	CreateSecret(ctx context.Context, secretName string, path string, data map[string]interface{}) (*vault.KVSecret, error)
	GetSecret(ctx context.Context, secretName, path string) (*vault.KVSecret, error)
	DeleteSecret(ctx context.Context, secretName string, path string) error
	RollBackSecret(ctx context.Context, secretName string, path string, toVersion int) error
	GetSecretVersionList(ctx context.Context, secretName string, path string) ([]vault.KVVersionMetadata, error)
	CreatePolicy(ctx context.Context, path string, policy string) error
	GetPolicy(ctx context.Context, path string) (string, error)
	DeletePolicy(ctx context.Context, path string) error
	Read(ctx context.Context, path string) (*vault.Secret, error)
	Write(ctx context.Context, path string, data map[string]interface{}) (*vault.Secret, error)
	Delete(ctx context.Context, path string) (*vault.Secret, error)
	EnableAuth(ctx context.Context, path string, authOptions *vault.MountInput) error
	DisableAuth(ctx context.Context, path string) error
	Health() bool
}

func NewVaultClient

func NewVaultClient(c *conf.Data, logger log.Logger) VaultClientInterface

Jump to

Keyboard shortcuts

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