settings

package
v0.0.0-...-2ce84b7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = Default()

Functions

This section is empty.

Types

type Settings

type Settings struct {
	DataFolderName   string
	DatabaseFileName string
	ExportFileName   string
	PasswordMaxTry   int
	Password         string
	Address          string

	// FirstPage 是指登入网站时跳转的第一个页面。
	FirstPage string

	// MaxAge for session
	// 有效单位是 "s", "m", "h"
	MaxAge string

	// NoteTitleLimit 限制标题的长度。
	// 注意:该限制还需要在 public/util.js 中设置(为了做前端限制)
	NoteTitleLimit int

	// NoteSizeLimit 限制每篇笔记的体积。
	// 注意:该限制还需要在 public/util.js 中设置(为了做前端限制)
	NoteSizeLimit int

	// MaxBodySize 单个文件上限, 通常应设置为等于 NoteSizeLimit
	MaxBodySize int

	// DatabaseCapacity 整个数据库的体积上限
	DatabaseCapacity int

	// ISO8601 需要根据服务器的具体时区来设定正确的时区
	// 比如,如果是北京时间,则应设为 "2006-01-02T15:04:05.999+08:00"
	// 特殊情况如果采用时区 +00:00 请设为 "2006-01-02T15:04:05.999Z" (为了与前端 day.js 输出的格式保持一致)
	// 另外要注意与 public/util.js 中的设置保持一致。
	ISO8601 string

	// HistoryLimit 限制每篇笔记可保留的历史版本数量上限。
	// 该参数已经废除,现在历史版本系统升级了,不设上限。
	HistoryLimit int

	// TagGroupLimit 限制标签组数量上限。
	// 当超过上限时,不受保护的标签组会被覆盖。可通过点击 "protect" 按钮保护标签。
	TagGroupLimit int
}

func Default

func Default() Settings

Jump to

Keyboard shortcuts

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