setting

package
v0.0.0-...-89c19b0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APP

type APP struct {
	RunMode     string `yaml:"run-mode"`
	Pagesize    int    `yaml:"pagesize"`
	IdentityKey string `yaml:"identity-key"`
	LogPath     string `yaml:"log-path"`
}

APP 程序配置

type Conf

type Conf struct {
	Server   Server   `yaml:"server"`
	Database Database `yaml:"database"`
	Harbor   Harbor   `yaml:"harbor"`
	APP      APP      `yaml:"app"`
}

Conf 配置结构体

var (
	Config *Conf
)

Config 定义配置

type Database

type Database struct {
	Type        string `yaml:"type"`
	User        string `yaml:"user"`
	Password    string `yaml:"password"`
	Host        string `yaml:"host"`
	Name        string `yaml:"name"`
	TablePrefix string `yaml:"table-prefix"`
}

Database 数据库配置结构体

type Harbor

type Harbor struct {
	ApiAddr  string `yaml:"api-addr"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

Harbor配置结构体

type Server

type Server struct {
	Port         string        `yaml:"port"`
	ReadTimeout  time.Duration `yaml:"read-timeout"`
	WriteTimeout time.Duration `yaml:"write-timeout"`
}

Server HTTP服务配置结构体

Jump to

Keyboard shortcuts

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