config

package
v0.0.0-...-7ff0bef Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config provides all configuration related functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBool

func GetBool(key string) bool

GetBool returns the value of the key in bool

func GetDefaultBool

func GetDefaultBool(key string, defaultVal bool) bool

GetDefaultBool returns the value of the key in bool or a default value

func GetDefaultDuration

func GetDefaultDuration(key string, defaultVal int) time.Duration

GetDefaultDuration returns the value of the in time.Duration or a default value The default value should be the amount of seconds and gets transformed to a time.Duration

func GetDefaultInt

func GetDefaultInt(key string, defaultVal int) int

GetDefaultInt returns the value of the key in int or a default value

func GetDefaultString

func GetDefaultString(key, defaultValue string) string

GetDefaultString returns the value of the key in string or a default value

func GetDefaultUint16

func GetDefaultUint16(key string, defaultVal uint16) uint16

GetDefaultUint16 returns the value of the key in uint16 or a default value

func GetDuration

func GetDuration(key string) time.Duration

GetDuration returns the value of the key as a duration

func GetInt

func GetInt(key string) int

GetInt returns the value of the key in int

func GetString

func GetString(key string) string

GetString returns the value of the key in string

func GetUint16

func GetUint16(key string) uint16

GetUint16 returns the value of the key in uint16

func Init

func Init() error

Init initializes the configuration

func IsDev

func IsDev() bool

IsDev returns true if the environment == dev

Types

This section is empty.

Jump to

Keyboard shortcuts

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