config

package
v0.0.0-...-0c44e78 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(filename string) (*viper.Viper, error)

Types

type Config

type Config struct {
	App         appconfig.App
	HTTP        HTTP
	RpcEnpoints RpcEndpoints `mapstructure:"rpcEndpoints"`
	Kafka       Kafka
}

func ParseConfig

func ParseConfig(v *viper.Viper) (*Config, error)

type HTTP

type HTTP struct {
	Port string
	Mode string
}

type Kafka

type Kafka struct {
	Brokers []string
}

type Logger

type Logger struct {
	Development       bool
	DisableCaller     bool
	DisableStacktrace bool
	Encoding          string
	Level             string
}

type RpcEndpoints

type RpcEndpoints struct {
	AuthSvc    string
	ProductSvc string
}

type Service

type Service struct {
	Name         string
	Mode         string
	Debug        bool
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Jump to

Keyboard shortcuts

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