system_setting

package
v1.0.3-preview.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: AGPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerAddress = "http://localhost:3000"
View Source
var WorkerAllowHttpImageRequestEnabled = false
View Source
var WorkerUrl = ""
View Source
var WorkerValidKey = ""

Functions

func EnableWorker

func EnableWorker() bool

func UpdateAndSyncTheme

func UpdateAndSyncTheme()

UpdateAndSyncTheme syncs the theme config to common after DB load.

Types

type DiscordSettings

type DiscordSettings struct {
	Enabled      bool   `json:"enabled"`
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

func GetDiscordSettings

func GetDiscordSettings() *DiscordSettings

type FetchSetting

type FetchSetting struct {
	EnableSSRFProtection   bool     `json:"enable_ssrf_protection"` // 是否启用SSRF防护
	AllowPrivateIp         bool     `json:"allow_private_ip"`
	DomainFilterMode       bool     `json:"domain_filter_mode"`         // 域名过滤模式,true: 白名单模式,false: 黑名单模式
	IpFilterMode           bool     `json:"ip_filter_mode"`             // IP过滤模式,true: 白名单模式,false: 黑名单模式
	DomainList             []string `json:"domain_list"`                // domain format, e.g. example.com, *.example.com
	IpList                 []string `json:"ip_list"`                    // CIDR format
	AllowedPorts           []string `json:"allowed_ports"`              // port range format, e.g. 80, 443, 8000-9000
	ApplyIPFilterForDomain bool     `json:"apply_ip_filter_for_domain"` // 对域名启用IP过滤(实验性)
}

func GetFetchSetting

func GetFetchSetting() *FetchSetting

type LegalSettings

type LegalSettings struct {
	UserAgreement string `json:"user_agreement"`
	PrivacyPolicy string `json:"privacy_policy"`
}

func GetLegalSettings

func GetLegalSettings() *LegalSettings

type OIDCSettings

type OIDCSettings struct {
	Enabled               bool   `json:"enabled"`
	ClientId              string `json:"client_id"`
	ClientSecret          string `json:"client_secret"`
	WellKnown             string `json:"well_known"`
	AuthorizationEndpoint string `json:"authorization_endpoint"`
	TokenEndpoint         string `json:"token_endpoint"`
	UserInfoEndpoint      string `json:"user_info_endpoint"`
}

func GetOIDCSettings

func GetOIDCSettings() *OIDCSettings

type PasskeySettings

type PasskeySettings struct {
	Enabled              bool   `json:"enabled"`
	RPDisplayName        string `json:"rp_display_name"`
	RPID                 string `json:"rp_id"`
	Origins              string `json:"origins"`
	AllowInsecureOrigin  bool   `json:"allow_insecure_origin"`
	UserVerification     string `json:"user_verification"`
	AttachmentPreference string `json:"attachment_preference"`
}

func GetPasskeySettings

func GetPasskeySettings() *PasskeySettings

type ThemeSettings

type ThemeSettings struct {
	Frontend string `json:"frontend"`
}

func GetThemeSettings

func GetThemeSettings() *ThemeSettings

Jump to

Keyboard shortcuts

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