config

package
v0.0.0-...-b401549 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `env-required:"true" yaml:"name"    env:"APP_NAME"`
	Version string `env-required:"true" yaml:"version" env:"APP_VERSION"`
}

type Config

type Config struct {
	App   `yaml:"app"`
	HTTP  `yaml:"http"`
	GRPC  `yaml:"grpc"`
	Log   `yaml:"logger"`
	Redis `yaml:"redis"`
	Env   string `yaml:"env" env-required:"true" env-default:"local"`
}

func GetConfig

func GetConfig() *Config

type GRPC

type GRPC struct {
	Address           string `env-required:"true" yaml:"addr" env:"GRPC_ADDRESS"`
	ConnectionAddress string `env-required:"true" yaml:"conn" env:"GRPC_CONNECTION"`
}

type HTTP

type HTTP struct {
	Port     string `env-required:"true" yaml:"port" env:"HTTP_PORT"`
	CertFile string `yaml:"cert_file" env:"HTTP_CERT_FILE"`
	KeyFile  string `yaml:"key_file" env:"HTTP_KEY_FILE"`
}

type Log

type Log struct {
	Level string `env-required:"true" yaml:"log_level" env:"LOG_LEVEL"`
}

type Redis

type Redis struct {
	Addr string `env-required:"true" yaml:"addr" env:"REDIS_ADDR"`
}

Jump to

Keyboard shortcuts

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