config

package
v0.0.0-...-3ae0001 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(filename string, cfg *Config) error

Types

type AuthClientConfig

type AuthClientConfig struct {
	Addr string `yaml:"addr" env:"AUTH_CLIENT_ADDR" env-default:"localhost:30031"`
}

type Config

type Config struct {
	ServerConfig ServerConfig       `yaml:"server"`
	SJWTConfig   SJWTConfig         `yaml:"sjwt"`
	AuthClient   AuthClientConfig   `yaml:"auth-client"`
	ConfigClient ConfigClientConfig `yaml:"config-client"`
}

type ConfigClientConfig

type ConfigClientConfig struct {
	Addr string `yaml:"addr" env:"CONFIG_CLIENT_ADDR" env-default:"localhost:30032"`
}

type SJWTConfig

type SJWTConfig struct {
	Secret string `yaml:"secret" env:"SJWT_SECRET" env-default:"mysecret"`
}

type ServerConfig

type ServerConfig struct {
	Addr string `yaml:"addr" env:"HTTP_LISTEN_ADDR" env-defaul:":30032"`
}

Jump to

Keyboard shortcuts

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