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
	GRPC      GRPC
	Postgres  Postgres
	Migration Migration
	JWTConfig JWTConfig
}

func ParseConfig

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

type GRPC

type GRPC struct {
	Port              string
	Time              time.Duration
	Timeout           time.Duration
	MaxConnectionIdle time.Duration
	MaxConnectionAge  time.Duration
}

type HTTP

type HTTP struct {
	Port string
	Mode string
}

type JWTConfig

type JWTConfig struct {
	SecretKey          string
	AccessTokenExpire  uint
	RefreshTokenExpire uint
}

type Migration

type Migration struct {
	Enable   bool
	Recreate bool
}

type Postgres

type Postgres struct {
	DnsURL string `mapstructure:"DNS_URL"`
}

Jump to

Keyboard shortcuts

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