...

Package config

import "github.com/Diarkis/diarkis/config"
Overview
Index

Overview ▾

func GetAsBool

func GetAsBool(name string, property string, _default bool) bool

GetAsBool Retrieves a configuration value as a boolean

func GetAsFloat64

func GetAsFloat64(name string, property string, _default float64) float64

GetAsFloat64 retrieves a configuration value as a float64

func GetAsInt

func GetAsInt(name string, property string, _default int) int

GetAsInt retrieves a configuration value as an int

func GetAsInt16

func GetAsInt16(name string, property string, _default int16) int16

GetAsInt16 retrieves a configuration value as an int16

func GetAsInt32

func GetAsInt32(name string, property string, _default int32) int32

GetAsInt32 retrieves a configuration value as an int32

func GetAsInt64

func GetAsInt64(name string, property string, _default int64) int64

GetAsInt64 retrieves a configuration value as an int64

func GetAsInt8

func GetAsInt8(name string, property string, _default int8) int8

GetAsInt8 retrieves a configuration value as an int8

func GetAsString

func GetAsString(name string, property string, _default string) string

GetAsString retrieves a configuration value as a string

func GetAsStruct

func GetAsStruct(name string, _struct any)

GetAsStruct Retrieves a configuration value and parse it into the passed struct _struct should be a pointer for a struct instance

func GetAsUint16

func GetAsUint16(name string, property string, _default uint16) uint16

GetAsUint16 retrieves a configuration value as a uint16

func GetAsUint32

func GetAsUint32(name string, property string, _default uint32) uint32

GetAsUint32 retrieves a configuration value as a uint32

func GetAsUint64

func GetAsUint64(name string, property string, _default uint64) uint64

GetAsUint64 retrieves a configuration value as a uint64

func GetAsUint8

func GetAsUint8(name string, property string, _default uint8) uint8

GetAsUint8 retrieves a configuration value as a uint8

func Load

func Load(name string, path string) map[string]interface{}

Load Load configurations from a file into memory

func Read

func Read(name string) map[string]interface{}

Read retrieves configurations by name and return as a map

func ReadProperty

func ReadProperty(name string, property string) interface{}

ReadProperty returns a property of a configuration object map

func Set

func Set(name string, property string, value interface{})

Set Sets a configuration value by name and its property name