config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env         string `env:"ENVIRONMENT" env-default:"prod"`
	StorageHost string `env:"POSTGRES_HOST" env-required:"true"`
	StoragePort int    `env:"POSTGRES_PORT" env-default:"5432"`
	StorageUser string `env:"POSTGRES_USER" env-default:"postgres"`
	StoragePass string `env:"POSTGRES_PASS" env-default:"postgres"`
	StorageDB   string `env:"POSTGRES_DB" env-default:"postgres"`
	GRPC        GRPCConfig
}

func MustLoad

func MustLoad() *Config

type GRPCConfig

type GRPCConfig struct {
	Port    int           `env:"GRPC_PORT" env-default:"50051"`
	Timeout time.Duration `env:"GRPC_TIMEOUT" env-default:"5"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳