models

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config     *GlobalConfig
	CoreJwtKey string
)

Functions

func InitConfig

func InitConfig(cfg string) error

Types

type CoreJwtToken

type CoreJwtToken struct {
	User   string   `json:"user"`
	Expire int64    `json:"expire"`
	Roles  []string `json:"roles"`
}

type ErrorMessageObj

type ErrorMessageObj struct {
	Language                 string `json:"language"`
	Success                  string `json:"success"`
	ParamEmptyError          string `json:"param_empty_error"`
	ParamValidateError       string `json:"param_validate_error"`
	SysParamEmptyError       string `json:"sys_param_empty_error"`
	PasswordDecodeError      string `json:"password_decode_error"`
	PasswordEncodeError      string `json:"password_encode_error"`
	ExecRemoteCommandError   string `json:"exec_remote_command_error"`
	InstallMinionError       string `json:"install_minion_error"`
	UninstallMinionError     string `json:"uninstall_minion_error"`
	S3UrlValidateError       string `json:"s3_url_validate_error"`
	S3FileEmptyError         string `json:"s3_file_empty_error"`
	S3DownloadError          string `json:"s3_download_error"`
	S3UploadError            string `json:"s3_upload_error"`
	SaltApiTargetError       string `json:"salt_api_target_error"`
	SaltApiConnectError      string `json:"salt_api_connect_error"`
	DecompressSuffixError    string `json:"decompress_suffix_error"`
	UnpackFileError          string `json:"unpack_file_error"`
	MysqlConnectError        string `json:"mysql_connect_error"`
	AddMysqlDatabaseError    string `json:"add_mysql_database_error"`
	DeleteMysqlDatabaseError string `json:"delete_mysql_database_error"`
	RunMysqlCommandError     string `json:"run_mysql_command_error"`
	FileNotExistError        string `json:"file_not_exist_error"`
	RunMysqlScriptError      string `json:"run_mysql_script_error"`
	MysqlCreateUserError     string `json:"mysql_create_user_error"`
	RunRemoteScriptError     string `json:"run_remote_script_error"`
}

type GlobalConfig

type GlobalConfig struct {
	Http                     HttpConfig `json:"http"`
	Log                      LogConfig  `json:"log"`
	DefaultLanguage          string     `json:"default_language"`
	InstallMinionTimeout     int        `json:"install_minion_timeout"`
	ExecRemoteCommandTimeout int        `json:"exec_remote_command_timeout"`
}

type HttpConfig

type HttpConfig struct {
	Port  string `json:"port"`
	Token string `json:"token"`
}

type LogConfig

type LogConfig struct {
	Level            string `json:"level"`
	File             string `json:"file"`
	ArchiveMaxSize   int    `json:"archive_max_size"`
	ArchiveMaxBackup int    `json:"archive_max_backup"`
	ArchiveMaxDay    int    `json:"archive_max_day"`
	Compress         bool   `json:"compress"`
}

Jump to

Keyboard shortcuts

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