Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeString = "string" TypeSelect = "select" TypeBool = "bool" TypeText = "text" TypeNumber = "number" )
View Source
const ( // site VERSION = "version" SiteTitle = "site_title" Announcement = "announcement" AllowIndexed = "allow_indexed" Logo = "logo" Favicon = "favicon" MainColor = "main_color" // preview TextTypes = "text_types" AudioTypes = "audio_types" VideoTypes = "video_types" ImageTypes = "image_types" ProxyTypes = "proxy_types" ProxyIgnoreHeaders = "proxy_ignore_headers" AudioAutoplay = "audio_autoplay" VideoAutoplay = "video_autoplay" // global HideFiles = "hide_files" CustomizeHead = "customize_head" CustomizeBody = "customize_body" LinkExpiration = "link_expiration" SignAll = "sign_all" PrivacyRegs = "privacy_regs" OcrApi = "ocr_api" FilenameCharMapping = "filename_char_mapping" ForwardDirectLinkParams = "forward_direct_link_params" // index SearchIndex = "search_index" AutoUpdateIndex = "auto_update_index" IgnorePaths = "ignore_paths" MaxIndexDepth = "max_index_depth" // aria2 Aria2Uri = "aria2_uri" Aria2Secret = "aria2_secret" // single Token = "token" IndexProgress = "index_progress" //Github GithubClientId = "github_client_id" GithubClientSecrets = "github_client_secrets" GithubLoginEnabled = "github_login_enabled" // qbittorrent QbittorrentUrl = "qbittorrent_url" )
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 FilenameCharMap = make(map[string]string)
View Source
var PrivacyReg []*regexp.Regexp
View Source
var SlicesMap = make(map[string][]string)
View Source
var ( // StoragesLoaded loaded success if empty StoragesLoaded = false )
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"` BleveDir string `json:"bleve_dir" env:"BLEVE_DIR"` Log LogConfig `json:"log"` MaxConnections int `json:"max_connections" env:"MAX_CONNECTIONS"` TlsInsecureSkipVerify bool `json:"tls_insecure_skip_verify" env:"TLS_INSECURE_SKIP_VERIFY"` }
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.