driver

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 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 Config

type Config struct {
	Logger hclog.Logger
}

Config is a main driver configuration

type Driver

type Driver interface {
	GetSecret(ctx context.Context, secretURL string) (string, error)
}

Driver is an interfce that needs to be implemented by drivers

type Factory

type Factory interface {
	GetDriver(name string, config Config) (Driver, error)
}

Factory is a struct responsible for creating drivers

type KeyVaultDriver

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

KeyVaultDriver will get secrets from Azure KeyVault

func (*KeyVaultDriver) GetSecret

func (kvd *KeyVaultDriver) GetSecret(ctx context.Context, secretURL string) (string, error)

GetSecret is a main function of the driver

type SimpleFactory

type SimpleFactory struct {
}

SimpleFactory is a factory based on driver name

func NewSimpleFactory

func NewSimpleFactory() *SimpleFactory

NewSimpleFactory returns SecretURLDriverFactory

func (*SimpleFactory) GetDriver

func (df *SimpleFactory) GetDriver(name string, config Config) (Driver, error)

GetDriver returns Driver struct by name

Jump to

Keyboard shortcuts

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