configs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfigIsExist

func CheckConfigIsExist() bool

func InitConfig

func InitConfig() error

Types

type Auth

type Auth struct {
	Secret string
}

type Config

type Config struct {
	Database  DatabaseConfig
	Site      SiteConfig
	LBSConfig LBSConfig
	Auth      Auth
	Uploader  Uploader
}
var GlobalConfig *Config

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Port     int
	User     string
	Password string
	Name     string
}

type LBSConfig

type LBSConfig struct {
	Name   string
	Config map[string]string
}

type Logger

type Logger struct {
	Path string `yaml:"path"`
}

type RateLimit

type RateLimit struct {
	Roles string //10:1;100:3600
}

type SiteConfig

type SiteConfig struct {
	Background    string
	Title         string
	ICP           string
	BaiDuTongJi   string
	Favicon       string
	ImageCompress bool
	CustomCardCss []string
	CustomCardJs  string
}

type Uploader

type Uploader struct {
	Name      string            `yaml:"name"`
	Config    map[string]string `yaml:"config"`
	RateLimit *RateLimit
	Logger    *Logger
}

Jump to

Keyboard shortcuts

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