global

package
v0.0.0-...-6c3f565 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB      *gorm.DB
	AlertDB *gorm.DB
	TaskDB  *gorm.DB
	AgentDB *gorm.DB
	LOG     *logrus.Logger
	CONF    ServerConfig
	Api     ApiInterface
	VALID   *validator.Validate
	SESSION *psession.PSession
	Viper   *viper.Viper

	I18n       *i18n.Localizer
	I18nForCmd *i18n.Localizer

	Cron *cron.Cron

	ScriptSyncJobID cron.EntryID

	IPTracker *auth.IPTracker
)

Functions

This section is empty.

Types

type ApiInterface

type ApiInterface struct {
	ApiKey             string `mapstructure:"api_key"`
	ApiInterfaceStatus string `mapstructure:"api_interface_status"`
	IpWhiteList        string `mapstructure:"ip_white_list"`
	ApiKeyValidityTime string `mapstructure:"api_key_validity_time"`
}

type Base

type Base struct {
	Mode           string `mapstructure:"mode"`
	Username       string `mapstructure:"username"`
	Password       string `mapstructure:"password"`
	Language       string `mapstructure:"language"`
	IsDemo         bool   `mapstructure:"is_demo"`
	IsIntl         bool   `mapstructure:"is_intl"`
	IsOffLine      bool   `mapstructure:"is_offline"`
	IsFxplay       bool   `mapstructure:"is_fxplay"`
	Version        string `mapstructure:"version"`
	InstallDir     string `mapstructure:"install_dir"`
	ChangeUserInfo string `mapstructure:"change_user_info"`
	EncryptKey     string `mapstructure:"encrypt_key"`
}

type Conn

type Conn struct {
	Port        string `mapstructure:"port"`
	BindAddress string `mapstructure:"bindAddress"`
	Ipv6        string `mapstructure:"ipv6"`
	SSL         string `mapstructure:"ssl"`
	Entrance    string `mapstructure:"entrance"`
}

type DBOption

type DBOption func(*gorm.DB) *gorm.DB

type LogConfig

type LogConfig struct {
	Level     string `mapstructure:"level"`
	TimeZone  string `mapstructure:"timeZone"`
	LogName   string `mapstructure:"log_name"`
	LogSuffix string `mapstructure:"log_suffix"`
	MaxBackup int    `mapstructure:"max_backup"`
}

type RemoteURL

type RemoteURL struct {
	RepoUrl     string `mapstructure:"repo_url"`
	ResourceURL string `mapstructure:"resource_url"`
}

type ServerConfig

type ServerConfig struct {
	Base      Base      `mapstructure:"base"`
	Conn      Conn      `mapstructure:"conn"`
	RemoteURL RemoteURL `mapstructure:"remote_url"`
	LogConfig LogConfig `mapstructure:"log"`
}

Jump to

Keyboard shortcuts

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