option

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminOption

type AdminOption struct {
	ID       uint   `default:"1"`
	Nickname string `default:"管理员"`
	Username string `default:"admin"`
	Password string `required:"true"`
}

type DatabaseOption

type DatabaseOption struct {
	Driver   string `default:"mysql"`
	Port     int    `default:"3306"`
	Host     string `required:"true"`
	Name     string `required:"true"`
	Username string `required:"true"`
	Password string `required:"true"`
}

type JwtOption

type JwtOption struct {
	Secret string `default:"jwt_secret"`
	Expire int    `default:"7200"`
}

type LoggerOption

type LoggerOption struct {
	Level string `default:"debug"`
}

type Option

type Option struct {
	Logger LoggerOption
	Server ServerOption
	DB     DatabaseOption
	Admin  AdminOption
	Jwt    JwtOption

	Signature *SignatureOption
	Router    *RouterOption
}

type RouterOption

type RouterOption struct {
	Prefix string
}

type ServerOption

type ServerOption struct {
	Port int `default:"3080"`
	Host string
}

type SignatureOption

type SignatureOption struct {
	Pri string `required:"true"`
	Pub string `required:"true"`
}

Jump to

Keyboard shortcuts

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