infra

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FunctionNotExist - not founded function for configuring
	FunctionNotExist = -1
	// FunctionSetupEnvironment - identifier function configuration your structure
	FunctionSetupEnvironment = iota
	// FunctionSetupHocon - function configuring from hocon
	FunctionSetupHocon = iota
	// FunctionSetupJSON - function configuring from json
	FunctionSetupJSON = iota
	// FunctionSetupYaml - function configuring from yaml
	FunctionSetupYaml = iota
	FunctionSetupIni  = iota
	FunctionSetupToml = iota
	// FunctionSetupDefault - function configuring from default values
	FunctionSetupDefault = iota
	// FunctionSetupVault - function configuring from vault secured backend
	FunctionSetupVault = iota
	// FunctionSetupConfigServer - function configuring by any types (json, yaml, hocon, toml, txt...) from configuring server with settings
	FunctionSetupConfigServer = iota

	FunctionKeyValueServer = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncType

type FuncType int

FuncType - identifier type for one of our configure functions

type GoStructorValue

type GoStructorValue struct {
	Value reflect.Value
	// contains filtered or unexported fields
}

GoStructorValue - it's main type which using by this library. Current preparing field contain in this type and if field structure doesn't prepared that will be contain special noValue interface.

func NewGoStructorNoValue

func NewGoStructorNoValue(value interface{}, err error) GoStructorValue

NewGoStructorNoValue - generate new GoStructorValue with error handling value

func NewGoStructorTrueValue

func NewGoStructorTrueValue(value reflect.Value) GoStructorValue

NewGoStructorTrueValue - generate new GoStructorValue with completed preparing field

func (GoStructorValue) CheckIsValue

func (gostructvalue GoStructorValue) CheckIsValue() bool

CheckIsValue - check that inserted in GoStructorValue is valid value // TODO: Upgrade in future

func (GoStructorValue) GetNotAValue

func (gostructvalue GoStructorValue) GetNotAValue() *NotAValue

GetNotAValue - getting interface of can not install value

type NotAValue

type NotAValue struct {
	ValueAddress interface{}
	Error        error
}

NotAValue - special error interface

func NewNotAValue

func NewNotAValue(field interface{}, err error) *NotAValue

NewNotAValue - create new not a value field interface for check true or false setuping value from source

Jump to

Keyboard shortcuts

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