config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigCacheKey string = "appConfigCacheKey"
)

Variables

This section is empty.

Functions

func GetFlags

func GetFlags() string

func GetServiceConfiguration

func GetServiceConfiguration(config interface{}, configFilePath string)

Types

type AppConfiguration

type AppConfiguration struct {
	OpenID OpenID `fig:"openid" validate:"required"`
	Server Server `fig:"server" validate:"required"`
}

func GetAppConfig

func GetAppConfig() *AppConfiguration

type OpenID

type OpenID struct {
	Audience string `fig:"audience" validate:"required"`
	Issuer   string `fig:"issuer" validate:"required"`
	KeyPath  string `fig:"keyPath" validate:"required"`
}

type Server

type Server struct {
	GracefulTimeout time.Duration `fig:"gracefulTimeout" default:"5s"`
	Name            string        `fig:"name"`
	Addr            string        `fig:"addr" default:":8080"`
	TLS             bool          `fig:"tls"`
}

Jump to

Keyboard shortcuts

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