providers

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const FileSystemName = "FileSystem"

Variables

This section is empty.

Functions

func GenerateProvidersMetaJSON

func GenerateProvidersMetaJSON(version string, providersMetaList []core.MetaInfo) (string, error)

func GetAllProvidersMeta

func GetAllProvidersMeta() []core.MetaInfo

func NewDotenv

func NewDotenv(logger logging.Logger) (core.Provider, error)

func NewFileSystem

func NewFileSystem(logger logging.Logger) (core.Provider, error)

NewFileSystem creates new provider instance

func NewProcessEnv

func NewProcessEnv(logger logging.Logger) (core.Provider, error)

NewProcessEnv creates new provider instance

func RegisterProvider

func RegisterProvider(metaInfo core.MetaInfo, builder func(logger logging.Logger) (core.Provider, error))

func ResolveProvider

func ResolveProvider(providerName string) (core.Provider, error)

func ResolveProviderMeta

func ResolveProviderMeta(providerName string) (core.MetaInfo, error)

Types

type DotEnvClient

type DotEnvClient interface {
	Read(p string) (map[string]string, error)
	Write(p string, kvs map[string]string) error
	Exists(p string) (bool, error)
	Delete(p string) error
}

type DotEnvReader

type DotEnvReader struct{}

func (*DotEnvReader) Delete

func (d *DotEnvReader) Delete(p string) error

func (*DotEnvReader) Exists

func (d *DotEnvReader) Exists(p string) (bool, error)

func (*DotEnvReader) Read

func (d *DotEnvReader) Read(p string) (map[string]string, error)

func (*DotEnvReader) Write

func (d *DotEnvReader) Write(p string, kvs map[string]string) error

type Dotenv

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

func (*Dotenv) Delete

func (a *Dotenv) Delete(kp core.KeyPath) error

func (*Dotenv) DeleteMapping

func (a *Dotenv) DeleteMapping(kp core.KeyPath) error

func (*Dotenv) Get

func (a *Dotenv) Get(p core.KeyPath) (*core.EnvEntry, error)

func (*Dotenv) GetMapping

func (a *Dotenv) GetMapping(p core.KeyPath) ([]core.EnvEntry, error)

func (*Dotenv) Put

func (a *Dotenv) Put(p core.KeyPath, val string) error

func (*Dotenv) PutMapping

func (a *Dotenv) PutMapping(kp core.KeyPath, m map[string]string) error

type FileSystem

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

func (*FileSystem) Delete

func (f *FileSystem) Delete(kp core.KeyPath) error

Delete will delete entry

func (*FileSystem) DeleteMapping

func (f *FileSystem) DeleteMapping(kp core.KeyPath) error

DeleteMapping will delete the given path

func (*FileSystem) Get

func (f *FileSystem) Get(p core.KeyPath) (*core.EnvEntry, error)

Get returns a single entry

func (*FileSystem) GetMapping

func (f *FileSystem) GetMapping(p core.KeyPath) ([]core.EnvEntry, error)

GetMapping returns a multiple entries

func (*FileSystem) IsText

func (f *FileSystem) IsText(s []byte) bool

func (*FileSystem) Put

func (f *FileSystem) Put(p core.KeyPath, val string) error

Put will create a new single entry

func (*FileSystem) PutMapping

func (f *FileSystem) PutMapping(p core.KeyPath, m map[string]string) error

PutMapping will create a multiple entries

type ProcessEnv

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

func (*ProcessEnv) Delete

func (a *ProcessEnv) Delete(kp core.KeyPath) error

Delete will delete entry

func (*ProcessEnv) DeleteMapping

func (a *ProcessEnv) DeleteMapping(kp core.KeyPath) error

DeleteMapping will delete the given path recessively

func (*ProcessEnv) Get

func (a *ProcessEnv) Get(p core.KeyPath) (*core.EnvEntry, error)

Get returns a single entry

func (*ProcessEnv) GetMapping

func (a *ProcessEnv) GetMapping(p core.KeyPath) ([]core.EnvEntry, error)

GetMapping returns a multiple entries

func (*ProcessEnv) Name

func (a *ProcessEnv) Name() string

Name return the provider name

func (*ProcessEnv) Put

func (a *ProcessEnv) Put(p core.KeyPath, val string) error

Put will create a new single entry

func (*ProcessEnv) PutMapping

func (a *ProcessEnv) PutMapping(p core.KeyPath, m map[string]string) error

PutMapping will create a multiple entries

type TellerExport

type TellerExport struct {
	Version   string                   `json:"version"`
	Providers map[string]core.MetaInfo `json:"providers"`
}

Directories

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

Jump to

Keyboard shortcuts

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