config

package
v0.0.0-...-01627f8 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	ServiceName    string        `json:"SERVICE_NAME" envconfig:"SERVICE_NAME"`
	ProjectID      string        `json:"PROJECT_ID" envconfig:"PROJECT_ID"`
	Environment    string        `json:"ENVIRONMENT" envconfig:"ENVIRONMENT"`
	Port           string        `json:"PORT" envconfig:"PORT"`
	Host           string        `json:"HOST" envconfig:"HOST"`
	HttpTimeout    time.Duration `json:"HTTP_TIMEOUT" envconfig:"HTTP_TIMEOUT"`
	LogLevel       string        `json:"LOG_LEVEL" envconfig:"LOG_LEVEL"`
	DBConfig       db.Config     `json:"DB_CONFIG" envconfig:"DB_CONFIG"`
	TokenSecretKey string        `json:"TOKEN_SECRET_KEY" envconfig:"TOKEN_SECRET_KEY"`
	Logger         *slog.Logger
}

func New

func New() *AppConfig

func (*AppConfig) InitLogger

func (c *AppConfig) InitLogger(ctx context.Context)

Jump to

Keyboard shortcuts

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