conf

package
v0.0.0-...-707b7f7 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Service     string = "dauth"
	Version     string = "dev"
	Hostname, _        = os.Hostname()
	ServiceID   string = uuid.NewString()
)

inject by ldflags e.g. go build -ldflags "-X github.com/dizzrt/dauth/internal/conf.Version=x.y.z"

View Source
var ProviderSet = wire.NewSet(
	GetAppConfig,
)

Functions

This section is empty.

Types

type App

type App struct {
	TokenTTL string `mapstructure:"token_ttl"`
	Secret   string `mapstructure:"secret"`
}

type AppConfig

type AppConfig struct {
	App App `mapstructure:"app"`

	ENV     string
	Address string

	DB       DB       `mapstructure:"db"`
	Redis    Redis    `mapstructure:"redis"`
	Log      Log      `mapstructure:"log"`
	Server   Server   `mapstructure:"server"`
	Tracing  Tracing  `mapstructure:"tracing"`
	Registry Registry `mapstructure:"registry"`
}

func GetAppConfig

func GetAppConfig() *AppConfig

type DB

type DB struct {
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Database string `mapstructure:"database"`
	Addr     string `mapstructure:"addr"`
}

type GRPCServer

type GRPCServer struct {
	Addr string `mapstructure:"addr"`
}

type HTTPServer

type HTTPServer struct {
	Addr string `mapstructure:"addr"`
}

type Log

type Log struct {
	File       string `mapstructure:"file"`
	Symlink    string `mapstructure:"symlink"`
	Level      string `mapstructure:"level"`
	MaxAge     string `mapstructure:"max_age"`
	MaxBackups int    `mapstructure:"max_backups"`
	OutputType string `mapstructure:"output_type"`
}

type Redis

type Redis struct {
	Addr     string `mapstructure:"addr"`
	Password string `mapstructure:"password"`
}

type Registry

type Registry struct {
	Addr string `mapstructure:"addr"`
}

type Server

type Server struct {
	GRPC GRPCServer `mapstructure:"grpc"`
	HTTP HTTPServer `mapstructure:"http"`
}

type Tracing

type Tracing struct {
	Endpoint     string `mapstructure:"endpoint"`
	EndpointType string `mapstructure:"endpoint_type"`
	Insecure     bool   `mapstructure:"insecure"`
}

Jump to

Keyboard shortcuts

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