config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	App     = "Cantor"
	Version = "v0.1.0"
)

应用

View Source
const (
	Title          = App + " " + Version
	Description    = "一个简单好用的图床应用"
	VersionNewMsg  = "当前已经是最新版本!"
	VersionOldMsg  = "最新版本: %s, 是否立即更新?"
	BtnConfirmText = "确定"
	BtnCancelText  = "取消"
)
View Source
const (
	Width  = 1024
	Height = 768
)

窗口尺寸

View Source
const (
	EventUploadBegin   = "event.upload.begin"
	EventUploadSuccess = "event.upload.success"
	EventUploadFail    = "event.upload.fail"
)

事件

View Source
const (
	GitApiURL   = "https://api.github.com/repos/%s/%s/contents/%s"
	GitTagURL   = "https://api.github.com/repos/evercyan/cantor/tags"
	GitFileURL  = "https://cdn.jsdelivr.net/gh/%s/%s/%s"
	GitDBFile   = "resource/cantor.db"
	GitFilePath = "resource/%s/%s%s"
	GitMarkFile = "mark"
	GitMessage  = "upload by cantor"
	GitRepoURL  = "https://github.com/evercyan/cantor"
	GitAppURL   = GitRepoURL + "/releases/tag/%s"
)

Git 配置 https://docs.github.com/cn/rest/reference/repos#contents

Variables

View Source
var (
	AllowFileExts       = []string{".png", ".gif", ".jpg", ".jpeg"}
	MaxFileSize   int64 = 4 * 1024 * 1024
	MaxFileCount        = 10
)

图片配置

View Source
var (
	CfgFile = "%s/config.yaml"
	LogFile = "%s/app.log"
	DBFile  = "%s/cantor.db"
)

文件配置

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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