Documentation
¶
Index ¶
- func FileExist(path string) bool
- func GetConfigBatchSize() int
- func GetConfigBool(key string) bool
- func GetConfigDataSourceName() string
- func GetConfigInt(key string) int
- func GetConfigString(key string) string
- func GetLanguage(language string) string
- func GetStringArray(key string) []string
- func IsCasdoorAvailable() bool
- func IsDemoMode() bool
- func ReadGlobalConfigTokens() []string
- func ReadStringFromPath(path string) string
- func SetCasdoorAvailable(available bool)
- type WebConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigBatchSize ¶
func GetConfigBatchSize() int
func GetConfigBool ¶
func GetConfigDataSourceName ¶
func GetConfigDataSourceName() string
func GetConfigInt ¶
func GetConfigString ¶
func GetLanguage ¶
func GetStringArray ¶
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 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"`
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
Click to show internal directories.
Click to hide internal directories.