Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeString = "string" TypeSelect = "select" TypeBool = "bool" TypeText = "text" TypeNumber = "number" )
View Source
const ( // site VERSION = "version" ApiUrl = "api_url" BasePath = "base_path" SiteTitle = "site_title" Announcement = "announcement" Logo = "logo" Favicon = "favicon" MainColor = "main_color" // preview TextTypes = "text_types" AudioTypes = "audio_types" VideoTypes = "video_types" ImageTypes = "image_types" //OfficeTypes = "office_types" ProxyTypes = "proxy_types" OfficeViewers = "office_viewers" PdfViewers = "pdf_viewers" AudioAutoplay = "audio_autoplay" VideoAutoplay = "video_autoplay" // global HideFiles = "hide_files" GlobalReadme = "global_readme" CustomizeHead = "customize_head" CustomizeBody = "customize_body" LinkExpiration = "link_expiration" PrivacyRegs = "privacy_regs" OcrApi = "ocr_api" // aria2 Aria2Uri = "aria2_uri" Aria2Secret = "aria2_secret" // single Token = "token" )
View Source
const ( UNKNOWN = iota FOLDER //OFFICE VIDEO AUDIO TEXT IMAGE )
Variables ¶
View Source
var ( BuiltAt string GoVersion string GitAuthor string GitCommit string Version string = "dev" WebVersion string )
View Source
var ( RawIndexHtml string ManageHtml string IndexHtml string )
View Source
var PrivacyReg []*regexp.Regexp
View Source
var ( // StoragesLoaded loaded success if empty StoragesLoaded = false )
View Source
var TypesMap = make(map[string][]string)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Force bool `json:"force" env:"FORCE"` Address string `json:"address" env:"ADDR"` Port int `json:"port" env:"PORT"` SiteURL string `json:"site_url" env:"SITE_URL"` Cdn string `json:"cdn" env:"CDN"` JwtSecret string `json:"jwt_secret" env:"JWT_SECRET"` TokenExpiresIn int `json:"token_expires_in" env:"TOKEN_EXPIRES_IN"` Database Database `json:"database"` Scheme Scheme `json:"scheme"` TempDir string `json:"temp_dir" env:"TEMP_DIR"` Log LogConfig `json:"log"` }
var (
Conf *Config
)
func DefaultConfig ¶
func DefaultConfig() *Config
type Database ¶
type Database struct { Type string `json:"type" env:"DB_TYPE"` Host string `json:"host" env:"DB_HOST"` Port int `json:"port" env:"DB_PORT"` User string `json:"user" env:"DB_USER"` Password string `json:"password" env:"DB_PASS"` Name string `json:"name" env:"DB_NAME"` DBFile string `json:"db_file" env:"DB_FILE"` TablePrefix string `json:"table_prefix" env:"DB_TABLE_PREFIX"` SSLMode string `json:"ssl_mode" env:"DB_SSL_MODE"` }
Click to show internal directories.
Click to hide internal directories.