Documentation ¶
Index ¶
Constants ¶
View Source
const ( VERSION = "v1.0.6" ImageThumbnailProcess = "image/resize,w_50" VideoThumbnailProcess = "video/snapshot,t_0,f_jpg,w_50" ImageUrlProcess = "image/resize,w_1920/format,jpeg" ASC = "ASC" DESC = "DESC" OrderUpdatedAt = "updated_at" OrderCreatedAt = "created_at" OrderSize = "size" OrderName = "name" OrderSearch = "type ASC,updated_at DESC" AccessTokenInvalid = "AccessTokenInvalid" Bearer = "Bearer\t" )
Variables ¶
View Source
var ( Debug bool // is debug command Help bool // is help command Version bool // is print version command ConfigFile string // config file SkipUpdate bool // skip update Client *http.Client // request client DB *gorm.DB Origins []string // allow origins AllowProxies []string )
View Source
var Conf = new(Config)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Info struct { Title string `yaml:"title" json:"title"` Roots []string `yaml:"-" json:"roots"` Logo string `yaml:"logo" json:"logo"` FooterText string `yaml:"footer_text" json:"footer_text"` FooterUrl string `yaml:"footer_url" json:"footer_url"` MusicImg string `yaml:"music_img" json:"music_img"` CheckUpdate bool `yaml:"check_update" json:"check_update"` Script string `yaml:"script" json:"script"` Autoplay bool `yaml:"autoplay" json:"autoplay"` Sort string `yaml:"sort" json:"sort"` Preview struct { Url string `yaml:"url" json:"url"` PreProcess []string `yaml:"pre_process" json:"pre_process"` Extensions []string `yaml:"extensions" json:"extensions"` Text []string `yaml:"text" json:"text"` MaxSize int `yaml:"max_size" json:"max_size"` } `yaml:"preview" json:"preview"` } `yaml:"info"` Server struct { Address string `yaml:"address"` Port string `yaml:"port"` //端口 Search bool `yaml:"search"` //允许搜索 Download bool `yaml:"download"` //允许下载 Static string `yaml:"static"` SiteUrl string `yaml:"site_url"` //网站url Password string `yaml:"password"` AllowProxy string `yaml:"allow_proxy"` // 允许代理的后缀 } `yaml:"server"` AliDrive struct { ApiUrl string `yaml:"api_url"` //阿里云盘api MaxFilesCount int `yaml:"max_files_count"` Drives []Drive `yaml:"drives"` } `yaml:"ali_drive"` Database struct { Type string `yaml:"type"` User string `yaml:"user"` Password string `yaml:"password"` Host string `yaml:"host"` Port int `yaml:"port"` Name string `yaml:"name"` TablePrefix string `yaml:"tablePrefix"` DBFile string `yaml:"dBFile"` } `yaml:"database"` }
config struct
Click to show internal directories.
Click to hide internal directories.