configurationmanager

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 9 Imported by: 0

README

go-configuration-manager

Configuration Management Library for Go Applications

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound      = errors.New("key not found")
	ErrPointerNotPassed = errors.New("pointer not passed")
)

Functions

func CastAndAssignValue

func CastAndAssignValue(value any, to any) any

func CastValue

func CastValue(value any, to any) any

func RunTests

func RunTests(t *testing.T, tests *[]Test)

Types

type Builder

type Builder interface {
	Add(module modules.Module) Builder
	Clear()
	Modules() []modules.Module
	Build() Configuration
}

func New

func New(options *Options) Builder

type Configuration

type Configuration interface {
	List() map[string]interface{}
	Get(key string, value any) any
	Deconstruct() Configuration
	Refresh() (isRefreshed bool)
}

type Options

type Options struct {
	Delimiter string
}

func NewDefaultOptions

func NewDefaultOptions(optsfn ...func(options *Options)) *Options

type Test

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

Directories

Path Synopsis
files Module
usersecrets Module
tools
usersecrets Module

Jump to

Keyboard shortcuts

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