conf

package
v4.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuiltAt    string
	GitAuthor  string
	GitCommit  string
	Version    string = "dev"
	WebVersion string
)
View Source
var (
	SlicesMap       = make(map[string][]string)
	FilenameCharMap = make(map[string]string)
	PrivacyReg      []*regexp.Regexp
)
View Source
var (
	RawIndexHTML string
	ManageHTML   string
	IndexHTML    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"`
	SiteURL               string      `json:"site_url"`
	Cdn                   string      `json:"cdn"`
	JwtSecret             string      `json:"jwt_secret"`
	TokenExpiresIn        int         `json:"token_expires_in"`
	Database              Database    `json:"database"`
	Meilisearch           Meilisearch `json:"meilisearch"`
	Scheme                Scheme      `json:"scheme"`
	TempDir               string      `json:"temp_dir"`
	BleveDir              string      `json:"bleve_dir"`
	DistDir               string      `json:"dist_dir"`
	Log                   LogConfig   `json:"log"`
	DelayedStart          int         `json:"delayed_start"`
	MaxConnections        int         `json:"max_connections"`
	MaxConcurrency        int         `json:"max_concurrency"`
	TLSInsecureSkipVerify bool        `json:"tls_insecure_skip_verify"`
	Tasks                 TasksConfig `json:"tasks"`
	Cors                  Cors        `json:"cors"`
	S3                    S3          `json:"s3"`
	FTP                   FTP         `json:"ftp"`
	SFTP                  SFTP        `json:"sftp"`
	LastLaunchedVersion   string      `json:"last_launched_version"`
}
var (
	Conf *Config
	URL  *url.URL
)

func DefaultConfig

func DefaultConfig(dataDir string) *Config

type Cors

type Cors struct {
	AllowOrigins []string `json:"allow_origins"`
	AllowMethods []string `json:"allow_methods"`
	AllowHeaders []string `json:"allow_headers"`
}

type Database

type Database struct {
	Type        string `json:"type"`
	Host        string `json:"host"`
	Port        int    `json:"port"`
	User        string `json:"user"`
	Password    string `json:"password"`
	Name        string `json:"name"`
	DBFile      string `json:"db_file"`
	TablePrefix string `json:"table_prefix"`
	SSLMode     string `json:"ssl_mode"`
	DSN         string `json:"dsn"`
}

type FTP

type FTP struct {
	Enable                  bool   `json:"enable"`
	Listen                  string `json:"listen"`
	FindPasvPortAttempts    int    `json:"find_pasv_port_attempts"`
	ActiveTransferPortNon20 bool   `json:"active_transfer_port_non_20"`
	IdleTimeout             int    `json:"idle_timeout"`
	ConnectionTimeout       int    `json:"connection_timeout"`
	DisableActiveMode       bool   `json:"disable_active_mode"`
	DefaultTransferBinary   bool   `json:"default_transfer_binary"`
	EnableActiveConnIPCheck bool   `json:"enable_active_conn_ip_check"`
	EnablePasvConnIPCheck   bool   `json:"enable_pasv_conn_ip_check"`
}

type LogConfig

type LogConfig struct {
	Enable     bool   `json:"enable"`
	Name       string `json:"name"`
	MaxSize    int    `json:"max_size"`
	MaxBackups int    `json:"max_backups"`
	MaxAge     int    `json:"max_age"`
	Compress   bool   `json:"compress"`
}

type Meilisearch

type Meilisearch struct {
	Host        string `json:"host"`
	APIKey      string `json:"api_key"`
	IndexPrefix string `json:"index_prefix"`
}

type S3

type S3 struct {
	Enable bool `json:"enable"`
	Port   int  `json:"port"`
	SSL    bool `json:"ssl"`
}

type SFTP

type SFTP struct {
	Enable bool   `json:"enable"`
	Listen string `json:"listen"`
}

type Scheme

type Scheme struct {
	Address      string `json:"address"`
	HttpPort     int    `json:"http_port"`
	HttpsPort    int    `json:"https_port"`
	ForceHttps   bool   `json:"force_https"`
	CertFile     string `json:"cert_file"`
	KeyFile      string `json:"key_file"`
	UnixFile     string `json:"unix_file"`
	UnixFilePerm string `json:"unix_file_perm"`
	EnableH2c    bool   `json:"enable_h2c"`
}

type TaskConfig

type TaskConfig struct {
	Workers        int  `json:"workers"`
	MaxRetry       int  `json:"max_retry"`
	TaskPersistant bool `json:"task_persistant"`
}

type TasksConfig

type TasksConfig struct {
	Download           TaskConfig `json:"download"`
	Transfer           TaskConfig `json:"transfer"`
	Upload             TaskConfig `json:"upload"`
	Copy               TaskConfig `json:"copy"`
	Move               TaskConfig `json:"move"`
	Decompress         TaskConfig `json:"decompress"`
	DecompressUpload   TaskConfig `json:"decompress_upload"`
	AllowRetryCanceled bool       `json:"allow_retry_canceled"`
}

Jump to

Keyboard shortcuts

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