globals

package
v0.0.0-...-c0d5e8a Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAvatar = models.File{
	Id:      -1,
	Type:    "image/png",
	Content: nil,
}

Default avatar

View Source
var DefaultBanner = models.File{
	Id:      -1,
	Type:    "image/png",
	Content: nil,
}
View Source
var SessionStore *sessions.CookieStore

Functions

func CaptchaCreate

func CaptchaCreate() (string, string)

func CaptchaVerfiy

func CaptchaVerfiy(idKey, verifyValue string) bool

Types

type GlobalConfig

type GlobalConfig struct {
	AppPort       int    `json:"app_port"`
	DbName        string `json:"db_name"`
	DbUser        string `json:"db_user"`
	DbPassword    string `json:"db_password"`
	RedisPort     int    `json:"redis_port"`
	RedisPassword string `json:"redis_password"`
	JudgeSigKey   string `json:"judge_sig_key"`

	CookieKeyPairs []string `json:"cookie_key_pairs"`

	ApiPrefix string `json:"api_prefix"`
}

func Config

func Config() *GlobalConfig

func LoadConfiguration

func LoadConfiguration(file string) GlobalConfig

Jump to

Keyboard shortcuts

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