config

package
v0.0.0-...-3d84ab5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAppConfig

type IAppConfig interface {
	Url() string //host:port
	Name() string
	Version() string
	ReadTimeOut() time.Duration
	WriteTimeOut() time.Duration
	BodyLimit() int
	FileLimit() int
	GCPBucket() string
}

type IDbConfig

type IDbConfig interface {
	Url() string
	MaxConns() int
}

type IJwtConfig

type IJwtConfig interface {
	AdminKey() []byte
	SecretKey() []byte
	ApiKey() []byte
	AccessExpiresAt() int
	RefreshExpiresAt() int
}

type Iconfig

type Iconfig interface {
	App() IAppConfig
	Db() IDbConfig
	Jwt() IJwtConfig
}

Port Interface

func LoadConfig

func LoadConfig(path string) Iconfig

LoadConfig เป็นตัวดึงข้อมูลจาก env มาใส่ใน struct

Jump to

Keyboard shortcuts

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