config

package
v0.0.0-...-7eeeacd Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate() error

Validate 校验 app 未覆盖的业务配置。

Types

type Auth

type Auth struct {
	JWTSecret string        `json:"jwt_secret"`
	ExpiresIn time.Duration `json:"expires_in"`
}

type Bootstrap

type Bootstrap struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
}

type Config

type Config struct {
	Auth      Auth      `json:"auth"`
	Storage   Storage   `json:"storage"`
	Bootstrap Bootstrap `json:"bootstrap"`
}

func G

func G() Config

G 返回应用业务配置的只读快照。

type Storage

type Storage struct {
	Root           string `json:"root"`
	MaxUploadBytes int64  `json:"max_upload_bytes"`
}

Jump to

Keyboard shortcuts

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