config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyEnv = "env"

	KeyHost             = "server.host"
	KeyPort             = "server.port"
	KeyReadTimeout      = "server.read-timeout"
	KeyWriteTimeout     = "server.write-timeout"
	KeyStopTimeout      = "server.stop-timeout"
	KeyCORSAllowOrigins = "server.cors.allow-origins"
	KeyPprofToken       = "server.pprof-token" //nolint:gosec

	KeyProfilerServerAddress = "profiler.server-address"
	KeyProfilerAuthUsername  = "profiler.auth-username"
	KeyProfilerAuthPassword  = "profiler.auth-password" //nolint:gosec
	KeyProfilerDebug         = "profiler.debug"

	KeyLog = "log"
)

Variables

This section is empty.

Functions

func Init

func Init(cfgFile, cfgType string)

func InitLogger

func InitLogger(v *viper.Viper) error

func QuitWatch

func QuitWatch()

func V

func V() *viper.Viper

Types

type Config

type Config struct {
	MWCorsFn gin.HandlerFunc
	// contains filtered or unexported fields
}

func Get

func Get() *Config

Jump to

Keyboard shortcuts

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