config

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidVarType = fmt.Errorf("not a valid VarType, try [%s]", strings.Join(_VarTypeNames, ", "))

Functions

func FilesEndpointEnabled

func FilesEndpointEnabled() bool

func GetConfig

func GetConfig() string

func HasConfigTemplate

func HasConfigTemplate() bool

func IsStaticContent

func IsStaticContent() bool

func IsVerbose

func IsVerbose() bool

func VarTypeNames

func VarTypeNames() []string

VarTypeNames returns a list of possible string values of VarType.

Types

type Field

type Field struct {
	EnvVariable  string  `yaml:"envVariable"`
	DefaultValue string  `yaml:"defaultValue"`
	VariableType VarType `yaml:"variableType" default:"string"`
	Separator    string  `yaml:"separator" default:" "`
}

func (*Field) String

func (f *Field) String() (string, error)

type File

type File struct {
	Fields map[string]Field `yaml:",inline"`
}

type VarType

type VarType uint8

Variable type ENUM( string // String bool // Boolean int // Integer array // Array )

const (
	// VarTypeString is a VarType of type String.
	// String
	VarTypeString VarType = iota
	// VarTypeBool is a VarType of type Bool.
	// Boolean
	VarTypeBool
	// VarTypeInt is a VarType of type Int.
	// Integer
	VarTypeInt
	// VarTypeArray is a VarType of type Array.
	// Array
	VarTypeArray
)

func ParseVarType

func ParseVarType(name string) (VarType, error)

ParseVarType attempts to convert a string to a VarType.

func (VarType) MarshalText

func (x VarType) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (VarType) String

func (x VarType) String() string

String implements the Stringer interface.

func (*VarType) UnmarshalText

func (x *VarType) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

Jump to

Keyboard shortcuts

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