conf

package
v1.783.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(path string) bool

func GetConfigBatchSize

func GetConfigBatchSize() int

func GetConfigBool

func GetConfigBool(key string) bool

func GetConfigDataSourceName

func GetConfigDataSourceName() string

func GetConfigInt

func GetConfigInt(key string) int

func GetConfigString

func GetConfigString(key string) string

func GetLanguage

func GetLanguage(language string) string

func GetStringArray

func GetStringArray(key string) []string

func IsCasdoorAvailable added in v1.782.0

func IsCasdoorAvailable() bool

IsCasdoorAvailable reports whether Casdoor is configured and reachable for SDK calls.

func IsDemoMode

func IsDemoMode() bool

func ReadGlobalConfigTokens

func ReadGlobalConfigTokens() []string

func ReadStringFromPath

func ReadStringFromPath(path string) string

func SetCasdoorAvailable added in v1.782.0

func SetCasdoorAvailable(available bool)

SetCasdoorAvailable records whether Casdoor was initialized successfully.

Types

type WebConfig

type WebConfig struct {
	AuthConfig struct {
		ServerUrl        string `json:"serverUrl"`
		ClientId         string `json:"clientId"`
		AppName          string `json:"appName"`
		OrganizationName string `json:"organizationName"`
		RedirectPath     string `json:"redirectPath"`
	} `json:"authConfig"`
	EnableExtraPages   bool     `json:"enableExtraPages"`
	ShortcutPageItems  []string `json:"shortcutPageItems"`
	UsageEndpoints     []string `json:"usageEndpoints"`
	IframeUrl          string   `json:"iframeUrl"`
	ForceLanguage      string   `json:"forceLanguage"`
	DefaultLanguage    string   `json:"defaultLanguage"`
	StaticBaseUrl      string   `json:"staticBaseUrl"`
	HtmlTitle          string   `json:"htmlTitle"`
	FaviconUrl         string   `json:"faviconUrl"`
	LogoUrl            string   `json:"logoUrl"`
	NavbarHtml         string   `json:"navbarHtml"`
	FooterHtml         string   `json:"footerHtml"`
	AppUrl             string   `json:"appUrl"`
	ShowGithubCorner   bool     `json:"showGithubCorner"`
	IsDemoMode         bool     `json:"isDemoMode"`
	DisablePreviewMode bool     `json:"disablePreviewMode"`
	ThemeDefault       struct {
		ThemeType    string `json:"themeType"`
		ColorPrimary string `json:"colorPrimary"`
		BorderRadius int    `json:"borderRadius"`
		IsCompact    bool   `json:"isCompact"`
	} `json:"themeDefault"`
	AvatarErrorUrl string `json:"avatarErrorUrl"`
}

func GetWebConfig

func GetWebConfig() *WebConfig

Jump to

Keyboard shortcuts

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