config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfig

func CreateConfig(ctx context.Context, obj any) error

Types

type App

type App struct {
	AppName string `env:"APP_NAME"`
}

type Grpc

type Grpc struct {
	Host string `env:"HOST, default=localhost"`
	Port string `env:"PORT, default=8081"`
}

type Http

type Http struct {
	Host string `env:"HOST, default=localhost"`
	Port string `env:"PORT, default=8080"`

	// Настройки CORS
	AllowedOrigins []string `env:"ALLOW_ORIGINS, default=*"`
	AllowedHeaders []string `env:"ALLOW_HEADERS, default=*"`
}

Jump to

Keyboard shortcuts

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