plugins

package
v1.10.14 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHARGE_TYPE_PREPAID = "PREPAID"
	RESULT_CODE_SUCCESS = "0"
	RESULT_CODE_ERROR   = "1"
	PASSWORD_LEN        = 12
	DEFALT_CIPHER       = "CIPHER_A"
	ASCII_CODE_LF       = 10
	SystemRole          = `SUB_SYSTEM`
	PlatformUser        = `SYS_PLATFORM`
)
View Source
const (
	UNCOMPRESSED_DIR = "/data/decompressed/"
	UPLOADS3FILE_DIR = "/data/minio/"
	S3CONFIG_DIR     = "/home/app/wecube-plugins-saltstack/minio-conf/"
)
View Source
const (
	ENV_NAME_SALT_API_HOST = "SALT_API_HOST"
	ENV_NAME_SALT_API_USER = "SALT_API_USER"
	ENV_NAME_SALT_API_PWD  = "SALT_API_PWD"
	SALT_TOKEN_VALID_TIME  = 30 * 60 //second
)
View Source
const (
	SCRIPT_SAVE_PATH = "/srv/salt/base/"

	END_POINT_TYPE_S3         = "S3"
	END_POINT_TYPE_LOCAL      = "LOCAL"
	END_POINT_TYPE_USER_PARAM = "USER_PARAM"
)
View Source
const (
	Zip_gZip                      = "gzip"
	Zip_Deflate                   = "deflate"
	WEB_CONSOLE_DEFAULT_USER_NAME = "root"
	WEB_CONSOLE_DEFAULT_PORT      = 22

	//命令行拦截实现相关
	ENABLE_HIGH_RISK_COMMAND_INTERRUPT = false
	KEY_CR                             = 13
	KEY_CANCEL                         = 3
	KEY_SPACE                          = 32
	STATE_WAIT_COMMAND_INPUT           = 0
	STATE_HIGH_RISK_WAIT_CONFIRM       = 1
)
View Source
const (
	ADD_USER_DEFALUT_PASSWORD = "Ab888888"
)
View Source
const ClusterDeletePath = `/salt/cluster/delete`
View Source
const (
	DEFAULT_GET_TEXT_CONTEXT_LINE_OFFSET = 10
)

Variables

View Source
var (
	DefaultS3Key              = "access_key"
	DefaultS3Password         = "secret_key"
	DefaultSpecialReplaceList []string
	DefaultEncryptReplaceList []string
	DefaultFileReplaceList    []string
	ClusterList               []string
	MasterHostIp              string
	CoreUrl                   string
	DefaultS3TmpAddress       string
	SubSystemCode             string
	SubSystemKey              string
	SaltResetEnv              bool
	ApiConcurrentNum          int
	VariableNullCheck         bool
)
View Source
var (
	SEPERATOR                   = string([]byte{0x01})
	VARIABLE_KEY_SEPERATOR      = SEPERATOR + "=" + SEPERATOR
	VARIABLE_VARIABLE_SEPERATOR = "," + SEPERATOR
	KEY_KEY_SEPERATOR           = VARIABLE_VARIABLE_SEPERATOR
	ONE_VARIABLE_SEPERATOR      = "&" + SEPERATOR
	NULL_VALUE_FLAG             = "NULL" + SEPERATOR
)
View Source
var AgentActions = make(map[string]Action)
View Source
var ApplyDeploymentActions = make(map[string]Action)
View Source
var CIPHER_MAP = map[string]string{
	"CIPHER_A": "{cipher_a}",
}
View Source
var DB *sql.DB
View Source
var FileActions = make(map[string]Action)
View Source
var (
	HighRiskCommands = []string{
		"rm /* -rf ",
		"rm -rf /* ",
		"rm /* ",
	}
)
View Source
var LogActions = make(map[string]Action)

LogActions define

View Source
var MysqlDatabasePluginActions = make(map[string]Action)
View Source
var MysqlDatabaseUserPluginActions = make(map[string]Action)
View Source
var MysqlScriptPluginActions = make(map[string]Action)
View Source
var PasswordPluginActions = make(map[string]Action)
View Source
var ReleasedPackagePluginActions = make(map[string]Action)
View Source
var SaltApiActions = make(map[string]Action)
View Source
var ScriptPluginActions = make(map[string]Action)
View Source
var TextProcessorPluginActions = make(map[string]Action)
View Source
var UserPluginActions = make(map[string]Action)
View Source
var VariableActions = make(map[string]Action)

VariableActions .

View Source
var WebConsoleActions = make(map[string]Action)

-----------get web console url plugin--------------------//

Functions

func Accept_Encoding

func Accept_Encoding(r *http.Request) string

func AesDePassword

func AesDePassword(guid, seed, password string) (string, error)

func AesDecode

func AesDecode(key string, encryptData string) (password string, err error)

func AesEnPassword

func AesEnPassword(guid, seed, password, cipher string) (string, error)

func AesEncode

func AesEncode(key string, rawData string) (string, error)

func CallSaltApi

func CallSaltApi(serviceUrl string, request SaltApiRequest, language string) (string, error)

func CheckVariableIsAllReady

func CheckVariableIsAllReady(input map[string]string, variablelist []string) (err error)

func CompressFile

func CompressFile(dir string, filePath []string, pkgName string, pkgType string) error

func CountLineNumber

func CountLineNumber(wLine int, rLine string) (string, string)

CountLineNumber .

func DecryptRsa

func DecryptRsa(inputString string) string

func ExtractJsonFromStruct

func ExtractJsonFromStruct(s interface{}) map[string]string

func GetCoreToken

func GetCoreToken() string

func GetFileMD5Value

func GetFileMD5Value(filePath string) (string, error)

func GetInputVariableMap

func GetInputVariableMap(variable string, seed string, specialList []string) (map[string]string, error)

func GetInputVariableMapNew

func GetInputVariableMapNew(variable string, seed string, specialList []string) (map[string]string, error)

func Gzip_Html

func Gzip_Html(b io.Reader, w http.ResponseWriter, r *http.Request)

func InitCoreToken

func InitCoreToken()

func InitEnvParam

func InitEnvParam()

func InitErrorMessageList

func InitErrorMessageList()

func LogReadLine

func LogReadLine(cmd *exec.Cmd, stdout io.ReadCloser) ([]string, error)

func Md5Encode

func Md5Encode(rawData string) string

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

func PathExists

func PathExists(path string) (bool, error)

func RSAEncryptByPrivate

func RSAEncryptByPrivate(orgidata []byte, privatekey string) ([]byte, error)

func ReplaceFileVar

func ReplaceFileVar(filepath string, input *VariableReplaceInput, decompressDirName string) error

variablelist,seed,publicKey,privateKey string

func SendHostDelete

func SendHostDelete(hosts []string)

func StartCleanInterval

func StartCleanInterval()

func StartClusterServer

func StartClusterServer()

func SyncClusterList

func SyncClusterList()

func Uint32

func Uint32(str string) (uint32, error)

func UnmarshalJson

func UnmarshalJson(source interface{}, target interface{}) error

func WebConsoleHandler

func WebConsoleHandler(w http.ResponseWriter, r *http.Request)

func WebConsoleStaticPageHandler

func WebConsoleStaticPageHandler(w http.ResponseWriter, r *http.Request)

Types

type Action

type Action interface {
	ReadParam(param interface{}) (interface{}, error)
	// CheckParam(param interface{}) error
	Do(param interface{}) (interface{}, error)
	// Set accept language
	SetAcceptLanguage(language string)
}

type AddMysqlDatabaseAction

type AddMysqlDatabaseAction struct{ Language string }

func (*AddMysqlDatabaseAction) Do

func (action *AddMysqlDatabaseAction) Do(input interface{}) (interface{}, error)

func (*AddMysqlDatabaseAction) ReadParam

func (action *AddMysqlDatabaseAction) ReadParam(param interface{}) (interface{}, error)

func (*AddMysqlDatabaseAction) SetAcceptLanguage

func (action *AddMysqlDatabaseAction) SetAcceptLanguage(language string)

type AddMysqlDatabaseInput

type AddMysqlDatabaseInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Host     string `json:"host,omitempty"`
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
	Port     string `json:"port,omitempty"`

	//new database info
	DatabaseName          string `json:"databaseName,omitempty"`
	DatabaseOwnerGuid     string `json:"databaseOwnerGuid,omitempty"`
	DatabaseOwnerName     string `json:"databaseOwnerName,omitempty"`
	DatabaseOwnerPassword string `json:"databaseOwnerPassword,omitempty"`
}

type AddMysqlDatabaseInputs

type AddMysqlDatabaseInputs struct {
	Inputs []AddMysqlDatabaseInput `json:"inputs,omitempty"`
}

type AddMysqlDatabaseOutput

type AddMysqlDatabaseOutput struct {
	CallBackParameter
	Result
	DatabaseOwnerGuid     string `json:"databaseOwnerGuid,omitempty"`
	DatabaseOwnerPassword string `json:"databaseOwnerPassword,omitempty"`
}

type AddMysqlDatabaseOutputs

type AddMysqlDatabaseOutputs struct {
	Outputs []AddMysqlDatabaseOutput `json:"outputs,omitempty"`
}

type AddMysqlDatabaseUserAction

type AddMysqlDatabaseUserAction struct{ Language string }

------------AddMysqlDatabaseUserAction--------------

func (*AddMysqlDatabaseUserAction) Do

func (action *AddMysqlDatabaseUserAction) Do(input interface{}) (interface{}, error)

func (*AddMysqlDatabaseUserAction) ReadParam

func (action *AddMysqlDatabaseUserAction) ReadParam(param interface{}) (interface{}, error)

func (*AddMysqlDatabaseUserAction) SetAcceptLanguage

func (action *AddMysqlDatabaseUserAction) SetAcceptLanguage(language string)

type AddMysqlDatabaseUserInput

type AddMysqlDatabaseUserInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Host     string `json:"host,omitempty"`
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
	Port     string `json:"port,omitempty"`

	//new database info
	DatabaseUserGuid     string `json:"databaseUserGuid,omitempty"`
	DatabaseName         string `json:"databaseName,omitempty"`
	DatabaseUserName     string `json:"databaseUserName,omitempty"`
	DatabaseUserPassword string `json:"databaseUserPassword,omitempty"`
}

type AddMysqlDatabaseUserInputs

type AddMysqlDatabaseUserInputs struct {
	Inputs []AddMysqlDatabaseUserInput `json:"inputs,omitempty"`
}

type AddMysqlDatabaseUserOutput

type AddMysqlDatabaseUserOutput struct {
	CallBackParameter
	Result
	DatabaseUserGuid     string `json:"databaseUserGuid,omitempty"`
	DatabaseUserPassword string `json:"databaseUserPassword,omitempty"`
}

type AddMysqlDatabaseUserOutputs

type AddMysqlDatabaseUserOutputs struct {
	Outputs []AddMysqlDatabaseUserOutput `json:"outputs,omitempty"`
}

type AddUserAction

type AddUserAction struct {
	Language string
}

func (*AddUserAction) CheckParam

func (action *AddUserAction) CheckParam(input AddUserInput) error

func (*AddUserAction) Do

func (action *AddUserAction) Do(input interface{}) (interface{}, error)

func (*AddUserAction) ReadParam

func (action *AddUserAction) ReadParam(param interface{}) (interface{}, error)

func (*AddUserAction) SetAcceptLanguage

func (action *AddUserAction) SetAcceptLanguage(language string)

type AddUserInput

type AddUserInput struct {
	CallBackParameter
	Guid      string `json:"guid,omitempty"`
	Seed      string `json:"seed,omitempty"`
	Target    string `json:"target,omitempty"`
	UserName  string `json:"userName,omitempty"`
	UserId    string `json:"userId,omitempty"`
	Password  string `json:"password,omitempty"`
	UserGroup string `json:"userGroup,omitempty"`
	GroupId   string `json:"groupId,omitempty"`
	HomeDir   string `json:"homeDir,omitempty"`
	RwDir     string `json:"rwDir,omitempty"`
	RwFile    string `json:"rwFile,omitempty"`
}

type AddUserInputs

type AddUserInputs struct {
	Inputs []AddUserInput `json:"inputs,omitempty"`
}

type AddUserOutput

type AddUserOutput struct {
	CallBackParameter
	Result
	Guid     string `json:"guid,omitempty"`
	Password string `json:"password,omitempty"`
	Detail   string `json:"detail,omitempty"`
}

type AddUserOutputs

type AddUserOutputs struct {
	Outputs []AddUserOutput `json:"outputs,omitempty"`
}

type AgentInstallInput

type AgentInstallInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Password string `json:"password,omitempty"`
	Host     string `json:"host,omitempty"`
	Port     string `json:"port,omitempty"`
	User     string `json:"user,omitempty"`
	Command  string `json:"command,omitempty"`
	Method   string `json:"method,omitempty"`
}

type AgentInstallInputs

type AgentInstallInputs struct {
	Inputs []AgentInstallInput `json:"inputs,omitempty"`
}

type AgentInstallOutput

type AgentInstallOutput struct {
	CallBackParameter
	Result
	Guid string `json:"guid,omitempty"`
}

type AgentInstallOutputs

type AgentInstallOutputs struct {
	Outputs []AgentInstallOutput `json:"outputs,omitempty"`
}

type AgentPlugin

type AgentPlugin struct {
}

func (*AgentPlugin) GetActionByName

func (plugin *AgentPlugin) GetActionByName(actionName string) (Action, error)

type AgentUninstallInput

type AgentUninstallInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
	Host     string `json:"host,omitempty"`
	Port     string `json:"port,omitempty"`
}

type AgentUninstallInputs

type AgentUninstallInputs struct {
	Inputs []AgentUninstallInput `json:"inputs,omitempty"`
}

type AgentUninstallOutput

type AgentUninstallOutput struct {
	CallBackParameter
	Result
	Guid string `json:"guid,omitempty"`
}

type AgentUninstallOutputs

type AgentUninstallOutputs struct {
	Outputs []AgentUninstallOutput `json:"outputs,omitempty"`
}

type ApplyDeleteDeploymentAction

type ApplyDeleteDeploymentAction struct {
	Language string
}

func (*ApplyDeleteDeploymentAction) Do

func (action *ApplyDeleteDeploymentAction) Do(input interface{}) (interface{}, error)

func (*ApplyDeleteDeploymentAction) ReadParam

func (action *ApplyDeleteDeploymentAction) ReadParam(param interface{}) (interface{}, error)

func (*ApplyDeleteDeploymentAction) SetAcceptLanguage

func (action *ApplyDeleteDeploymentAction) SetAcceptLanguage(language string)

type ApplyDeleteDeploymentInput

type ApplyDeleteDeploymentInput struct {
	CallBackParameter
	Guid            string `json:"guid,omitempty"`
	UserName        string `json:"userName,omitempty"`
	Target          string `json:"target,omitempty"`
	StopScriptPath  string `json:"stopScript,omitempty"`
	DestinationPath string `json:"destinationPath,omitempty"`
}

type ApplyDeleteDeploymentInputs

type ApplyDeleteDeploymentInputs struct {
	Inputs []ApplyDeleteDeploymentInput `json:"inputs,omitempty"`
}

type ApplyDeleteDeploymentOutput

type ApplyDeleteDeploymentOutput struct {
	CallBackParameter
	Result
	Guid string `json:"guid,omitempty"`
}

type ApplyDeleteDeploymentOutputs

type ApplyDeleteDeploymentOutputs struct {
	Outputs []ApplyDeleteDeploymentOutput `json:"outputs,omitempty"`
}

type ApplyDeploymentPlugin

type ApplyDeploymentPlugin struct {
}

func (*ApplyDeploymentPlugin) GetActionByName

func (plugin *ApplyDeploymentPlugin) GetActionByName(actionName string) (Action, error)

type ApplyNewDeploymentAction

type ApplyNewDeploymentAction struct {
	Language string
}

func (*ApplyNewDeploymentAction) CheckParam

func (action *ApplyNewDeploymentAction) CheckParam(input ApplyNewDeploymentInput) error

func (*ApplyNewDeploymentAction) Do

func (action *ApplyNewDeploymentAction) Do(input interface{}) (interface{}, error)

func (*ApplyNewDeploymentAction) ReadParam

func (action *ApplyNewDeploymentAction) ReadParam(param interface{}) (interface{}, error)

func (*ApplyNewDeploymentAction) SetAcceptLanguage

func (action *ApplyNewDeploymentAction) SetAcceptLanguage(language string)

type ApplyNewDeploymentInput

type ApplyNewDeploymentInput struct {
	CallBackParameter
	EndPoint         string `json:"endpoint,omitempty"`
	Guid             string `json:"guid,omitempty"`
	UserName         string `json:"userName,omitempty"`
	Target           string `json:"target,omitempty"`
	DestinationPath  string `json:"destinationPath,omitempty"`
	VariableFilePath string `json:"confFiles,omitempty"`
	VariableList     string `json:"variableList,omitempty"`
	ExecArg          string `json:"args,omitempty"`
	StartScriptPath  string `json:"startScript,omitempty"`
	// AccessKey    string `json:"accessKey,omitempty"`
	// SecretKey    string `json:"secretKey,omitempty"`
	EncryptVariblePrefix string `json:"encryptVariblePrefix,omitempty"`
	Seed                 string `json:"seed,omitempty"`
	AppPublicKey         string `json:"appPublicKey,omitempty"`
	SysPrivateKey        string `json:"sysPrivateKey,omitempty"`
	Password             string `json:"password,omitempty"`
	RwDir                string `json:"rwDir,omitempty"`
	RwFile               string `json:"rwFile,omitempty"`
}

type ApplyNewDeploymentInputs

type ApplyNewDeploymentInputs struct {
	Inputs []ApplyNewDeploymentInput `json:"inputs,omitempty"`
}

type ApplyNewDeploymentOutput

type ApplyNewDeploymentOutput struct {
	CallBackParameter
	Result
	Guid            string `json:"guid,omitempty"`
	UserDetail      string `json:"userDetail,omitempty"`
	FileDetail      string `json:"fileDetail,omitempty"`
	NewS3PkgPath    string `json:"s3PkgPath,omitempty"`
	Target          string `json:"target,omitempty"`
	RetCode         int    `json:"retCode,omitempty"`
	RunScriptDetail string `json:"runScriptDetail,omitempty"`
	Password        string `json:"password,omitempty"`
}

type ApplyNewDeploymentOutputs

type ApplyNewDeploymentOutputs struct {
	Outputs []ApplyNewDeploymentOutput `json:"outputs,omitempty"`
}

type ApplyNewDeploymentThreadObj

type ApplyNewDeploymentThreadObj struct {
	Data  ApplyNewDeploymentOutput
	Err   error
	Index int
}

type ApplyUpdateDeploymentAction

type ApplyUpdateDeploymentAction struct {
	Language string
}

func (*ApplyUpdateDeploymentAction) CheckParam

func (*ApplyUpdateDeploymentAction) Do

func (action *ApplyUpdateDeploymentAction) Do(input interface{}) (interface{}, error)

func (*ApplyUpdateDeploymentAction) ReadParam

func (action *ApplyUpdateDeploymentAction) ReadParam(param interface{}) (interface{}, error)

func (*ApplyUpdateDeploymentAction) SetAcceptLanguage

func (action *ApplyUpdateDeploymentAction) SetAcceptLanguage(language string)

type ApplyUpdateDeploymentInput

type ApplyUpdateDeploymentInput struct {
	CallBackParameter
	EndPoint         string `json:"endpoint,omitempty"`
	Guid             string `json:"guid,omitempty"`
	UserName         string `json:"userName,omitempty"`
	Target           string `json:"target,omitempty"`
	DestinationPath  string `json:"destinationPath,omitempty"`
	VariableFilePath string `json:"confFiles,omitempty"`
	VariableList     string `json:"variableList,omitempty"`
	ExecArg          string `json:"args,omitempty"`
	StopScriptPath   string `json:"stopScript,omitempty"`
	StartScriptPath  string `json:"startScript,omitempty"`

	EncryptVariblePrefix string `json:"encryptVariblePrefix,omitempty"`
	Seed                 string `json:"seed,omitempty"`
	AppPublicKey         string `json:"appPublicKey,omitempty"`
	SysPrivateKey        string `json:"sysPrivateKey,omitempty"`
}

type ApplyUpdateDeploymentInputs

type ApplyUpdateDeploymentInputs struct {
	Inputs []ApplyUpdateDeploymentInput `json:"inputs,omitempty"`
}

type ApplyUpdateDeploymentOutput

type ApplyUpdateDeploymentOutput struct {
	CallBackParameter
	Result
	Guid                 string `json:"guid,omitempty"`
	FileDetail           string `json:"fileDetail,omitempty"`
	NewS3PkgPath         string `json:"s3PkgPath,omitempty"`
	Target               string `json:"target,omitempty"`
	RetCode              int    `json:"retCode,omitempty"`
	RunStartScriptDetail string `json:"runStartScriptDetail,omitempty"`
	RunStopScriptDetail  string `json:"runStopScriptDetail,omitempty"`
}

type ApplyUpdateDeploymentOutputs

type ApplyUpdateDeploymentOutputs struct {
	Outputs []ApplyUpdateDeploymentOutput `json:"outputs,omitempty"`
}

type ApplyUpdateDeploymentThreadObj

type ApplyUpdateDeploymentThreadObj struct {
	Data  ApplyUpdateDeploymentOutput
	Err   error
	Index int
}

type CallBackParameter

type CallBackParameter struct {
	Parameter string `json:"callbackParameter,omitempty"`
}

type ChangeUserPasswordAction

type ChangeUserPasswordAction struct {
	Language string
}

func (*ChangeUserPasswordAction) CheckParam

func (action *ChangeUserPasswordAction) CheckParam(input ChangeUserPasswordInput) error

func (*ChangeUserPasswordAction) Do

func (action *ChangeUserPasswordAction) Do(input interface{}) (interface{}, error)

func (*ChangeUserPasswordAction) ReadParam

func (action *ChangeUserPasswordAction) ReadParam(param interface{}) (interface{}, error)

func (*ChangeUserPasswordAction) SetAcceptLanguage

func (action *ChangeUserPasswordAction) SetAcceptLanguage(language string)

type ChangeUserPasswordInput

type ChangeUserPasswordInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Target   string `json:"target,omitempty"`
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

type ChangeUserPasswordInputs

type ChangeUserPasswordInputs struct {
	Inputs []ChangeUserPasswordInput `json:"inputs,omitempty"`
}

type ChangeUserPasswordOutput

type ChangeUserPasswordOutput struct {
	CallBackParameter
	Result
	Guid     string `json:"guid,omitempty"`
	Password string `json:"password,omitempty"`
	Detail   string `json:"detail,omitempty"`
}

type ChangeUserPasswordOutputs

type ChangeUserPasswordOutputs struct {
	Outputs []ChangeUserPasswordOutput `json:"outputs,omitempty"`
}

type ClusterHostDeleteResult

type ClusterHostDeleteResult struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type ConfigKeyInfo

type ConfigKeyInfo struct {
	Line string `json:"line,omitempty"`
	Key  string `json:"key,omitempty"`
	Type string `json:"type,omitempty"`
}

func GetVariable

func GetVariable(filepath string, specialList []string, showPrefix bool) ([]ConfigKeyInfo, error)

GetVariable .

type DeleteMysqlDatabaseAction

type DeleteMysqlDatabaseAction struct{ Language string }

func (*DeleteMysqlDatabaseAction) Do

func (action *DeleteMysqlDatabaseAction) Do(input interface{}) (interface{}, error)

func (*DeleteMysqlDatabaseAction) ReadParam

func (action *DeleteMysqlDatabaseAction) ReadParam(param interface{}) (interface{}, error)

func (*DeleteMysqlDatabaseAction) SetAcceptLanguage

func (action *DeleteMysqlDatabaseAction) SetAcceptLanguage(language string)

type DeleteMysqlDatabaseInput

type DeleteMysqlDatabaseInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Host     string `json:"host,omitempty"`
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
	Port     string `json:"port,omitempty"`

	// database info
	DatabaseName      string `json:"databaseName,omitempty"`
	DatabaseOwnerGuid string `json:"databaseOwnerGuid,omitempty"`
}

type DeleteMysqlDatabaseInputs

type DeleteMysqlDatabaseInputs struct {
	Inputs []DeleteMysqlDatabaseInput `json:"inputs,omitempty"`
}

type DeleteMysqlDatabaseOutput

type DeleteMysqlDatabaseOutput struct {
	CallBackParameter
	Result
	DatabaseOwnerGuid string `json:"databaseOwnerGuid,omitempty"`
}

type DeleteMysqlDatabaseOutputs

type DeleteMysqlDatabaseOutputs struct {
	Outputs []DeleteMysqlDatabaseOutput `json:"outputs,omitempty"`
}

type DeleteMysqlDatabaseUserAction

type DeleteMysqlDatabaseUserAction struct{ Language string }

func (*DeleteMysqlDatabaseUserAction) Do

func (action *DeleteMysqlDatabaseUserAction) Do(input interface{}) (interface{}, error)

func (*DeleteMysqlDatabaseUserAction) ReadParam

func (action *DeleteMysqlDatabaseUserAction) ReadParam(param interface{}) (interface{}, error)

func (*DeleteMysqlDatabaseUserAction) SetAcceptLanguage

func (action *DeleteMysqlDatabaseUserAction) SetAcceptLanguage(language string)

type DeleteMysqlDatabaseUserInput

type DeleteMysqlDatabaseUserInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Host     string `json:"host,omitempty"`
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
	Port     string `json:"port,omitempty"`

	//database info
	DatabaseUserName string `json:"databaseUserName,omitempty"`
	DatabaseUserGuid string `json:"databaseUserGuid,omitempty"`
}

type DeleteMysqlDatabaseUserInputs

type DeleteMysqlDatabaseUserInputs struct {
	Inputs []DeleteMysqlDatabaseUserInput `json:"inputs,omitempty"`
}

type DeleteMysqlDatabaseUserOutput

type DeleteMysqlDatabaseUserOutput struct {
	CallBackParameter
	Result
	DatabaseUserGuid string `json:"databaseUserGuid,omitempty"`
}

type DeleteMysqlDatabaseUserOutputs

type DeleteMysqlDatabaseUserOutputs struct {
	Outputs []DeleteMysqlDatabaseUserOutput `json:"outputs,omitempty"`
}

type DeleteUserAction

type DeleteUserAction struct {
	Language string
}

func (*DeleteUserAction) DeleteUserCheckParam

func (action *DeleteUserAction) DeleteUserCheckParam(input DeleteUserInput) error

func (*DeleteUserAction) Do

func (action *DeleteUserAction) Do(input interface{}) (interface{}, error)

func (*DeleteUserAction) ReadParam

func (action *DeleteUserAction) ReadParam(param interface{}) (interface{}, error)

func (*DeleteUserAction) SetAcceptLanguage

func (action *DeleteUserAction) SetAcceptLanguage(language string)

type DeleteUserInput

type DeleteUserInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Target   string `json:"target,omitempty"`
	UserName string `json:"userName,omitempty"`
}

type DeleteUserInputs

type DeleteUserInputs struct {
	Inputs []DeleteUserInput `json:"inputs,omitempty"`
}

type DeleteUserOutput

type DeleteUserOutput struct {
	CallBackParameter
	Result
	Detail string `json:"detail,omitempty"`
	Guid   string `json:"guid,omitempty"`
}

type DeleteUserOutputs

type DeleteUserOutputs struct {
	Outputs []DeleteUserOutput `json:"outputs,omitempty"`
}

type ExecRemoteParam

type ExecRemoteParam struct {
	User     string
	Password string
	Host     string
	Port     string
	Command  string
	Output   string
	Err      error
	Timeout  int
	DoneChan chan int
}

type FileCopyAction

type FileCopyAction struct{ Language string }

func (*FileCopyAction) CheckParam

func (action *FileCopyAction) CheckParam(input FileCopyInput) error

func (*FileCopyAction) Do

func (action *FileCopyAction) Do(input interface{}) (interface{}, error)

func (*FileCopyAction) ReadParam

func (action *FileCopyAction) ReadParam(param interface{}) (interface{}, error)

func (*FileCopyAction) SetAcceptLanguage

func (action *FileCopyAction) SetAcceptLanguage(language string)

type FileCopyInput

type FileCopyInput struct {
	CallBackParameter
	EndPoint        string `json:"endpoint,omitempty"`
	Guid            string `json:"guid,omitempty"`
	Target          string `json:"target,omitempty"`
	DestinationPath string `json:"destinationPath,omitempty"`
	Unpack          string `json:"unpack,omitempty"`
	FileOwner       string `json:"fileOwner,omitempty"`
}

type FileCopyInputs

type FileCopyInputs struct {
	Inputs []FileCopyInput `json:"inputs,omitempty"`
}

type FileCopyOutput

type FileCopyOutput struct {
	CallBackParameter
	Result
	Guid   string `json:"guid,omitempty"`
	Detail string `json:"detail,omitempty"`
}

type FileCopyOutputs

type FileCopyOutputs struct {
	Outputs []FileCopyOutput `json:"outputs,omitempty"`
}

type FileCopyThreadObj

type FileCopyThreadObj struct {
	Data  FileCopyOutput
	Err   error
	Index int
}

type FileNode

type FileNode struct {
	Name      string      `json:"name"`
	Path      string      `json:"-"`
	FileNodes []*FileNode `json:"-"`
	IsDir     bool        `json:"isDir"`
	Md5       string      `json:"md5"`
}

type FilePlugin

type FilePlugin struct {
}

func (*FilePlugin) GetActionByName

func (plugin *FilePlugin) GetActionByName(actionName string) (Action, error)

type GetConfigFileKeyAction

type GetConfigFileKeyAction struct {
	Language string
}

func (*GetConfigFileKeyAction) CheckParam

func (action *GetConfigFileKeyAction) CheckParam(input GetConfigFileKeyInput) error

func (*GetConfigFileKeyAction) Do

func (action *GetConfigFileKeyAction) Do(input interface{}) (interface{}, error)

func (*GetConfigFileKeyAction) ReadParam

func (action *GetConfigFileKeyAction) ReadParam(param interface{}) (interface{}, error)

func (*GetConfigFileKeyAction) SetAcceptLanguage

func (action *GetConfigFileKeyAction) SetAcceptLanguage(language string)

type GetConfigFileKeyInput

type GetConfigFileKeyInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	EndPoint string `json:"endpoint,omitempty"`
	FilePath string `json:"filePath,omitempty"`
}

type GetConfigFileKeyInputs

type GetConfigFileKeyInputs struct {
	Inputs []GetConfigFileKeyInput `json:"inputs,omitempty"`
}

type GetConfigFileKeyOutput

type GetConfigFileKeyOutput struct {
	CallBackParameter
	Result
	Guid           string          `json:"guid,omitempty"`
	FilePath       string          `json:"filePath,omitempty"`
	ConfigKeyInfos []ConfigKeyInfo `json:"configKeyInfos"`
}

type GetConfigFileKeyOutputs

type GetConfigFileKeyOutputs struct {
	Outputs []GetConfigFileKeyOutput `json:"outputs,omitempty"`
}

type GetContextAction

type GetContextAction struct {
	Language string
}

func (*GetContextAction) CheckParam

func (action *GetContextAction) CheckParam(input GetContextInput) error

func (*GetContextAction) Do

func (action *GetContextAction) Do(input interface{}) (interface{}, error)

func (*GetContextAction) ReadParam

func (action *GetContextAction) ReadParam(param interface{}) (interface{}, error)

func (*GetContextAction) SetAcceptLanguage

func (action *GetContextAction) SetAcceptLanguage(language string)

type GetContextInput

type GetContextInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	EndPoint string `json:"endpoint,omitempty"`
	LineNum  int    `json:"lineNum,omitempty"`
	Offset   int    `json:"offset,omitempty"`
}

type GetContextInputs

type GetContextInputs struct {
	Inputs []GetContextInput `json:"inputs,omitempty"`
}

get context

type GetContextOutput

type GetContextOutput struct {
	CallBackParameter
	Result
	Guid        string `json:"guid,omitempty"`
	ContextText string `json:"context"`
}

type GetContextOutputs

type GetContextOutputs struct {
	Outputs []GetContextOutput `json:"outputs"`
}

type GetWebConsoleUrlAction

type GetWebConsoleUrlAction struct {
	Language string
}

func (*GetWebConsoleUrlAction) CheckParam

func (action *GetWebConsoleUrlAction) CheckParam(input interface{}) error

func (*GetWebConsoleUrlAction) Do

func (action *GetWebConsoleUrlAction) Do(input interface{}) (interface{}, error)

func (*GetWebConsoleUrlAction) ReadParam

func (action *GetWebConsoleUrlAction) ReadParam(param interface{}) (interface{}, error)

func (*GetWebConsoleUrlAction) SetAcceptLanguage

func (action *GetWebConsoleUrlAction) SetAcceptLanguage(language string)

type ListCurrentDirAction

type ListCurrentDirAction struct {
	Language string
}

func (*ListCurrentDirAction) CheckParam

func (action *ListCurrentDirAction) CheckParam(input ListFilesInput) error

func (*ListCurrentDirAction) Do

func (action *ListCurrentDirAction) Do(input interface{}) (interface{}, error)

func (*ListCurrentDirAction) ReadParam

func (action *ListCurrentDirAction) ReadParam(param interface{}) (interface{}, error)

func (*ListCurrentDirAction) SetAcceptLanguage

func (action *ListCurrentDirAction) SetAcceptLanguage(language string)

type ListFilesInput

type ListFilesInput struct {
	CallBackParameter
	Guid       string `json:"guid,omitempty"`
	EndPoint   string `json:"endpoint,omitempty"`
	CurrentDir string `json:"currentDir,omitempty"`
}

type ListFilesInputs

type ListFilesInputs struct {
	Inputs []ListFilesInput `json:"inputs,omitempty"`
}

type ListFilesOutput

type ListFilesOutput struct {
	CallBackParameter
	Result
	Guid  string     `json:"guid,omitempty"`
	Files []FileNode `json:"files,omitempty"`
}

type ListFilesOutputs

type ListFilesOutputs struct {
	Outputs []ListFilesOutput `json:"outputs,omitempty"`
}

type LogPlugin

type LogPlugin struct {
}

LogPlugin .

func (*LogPlugin) GetActionByName

func (plugin *LogPlugin) GetActionByName(actionName string) (Action, error)

GetActionByName .

type LogSearchAction

type LogSearchAction struct{ Language string }

LogSearchAction .

func (*LogSearchAction) CheckParam

func (action *LogSearchAction) CheckParam(input SearchInput) error

CheckParam .

func (*LogSearchAction) Do

func (action *LogSearchAction) Do(input interface{}) (interface{}, error)

Do .

func (*LogSearchAction) ReadParam

func (action *LogSearchAction) ReadParam(param interface{}) (interface{}, error)

ReadParam .

func (*LogSearchAction) Search

func (action *LogSearchAction) Search(input *SearchInput) (outputs SearchOutputs, err error)

Search .

func (*LogSearchAction) SetAcceptLanguage

func (action *LogSearchAction) SetAcceptLanguage(language string)

type LogSearchDetailAction

type LogSearchDetailAction struct{ Language string }

LogSearchDetailAction .

func (*LogSearchDetailAction) CheckParam

func (action *LogSearchDetailAction) CheckParam(input SearchDetailInput) error

CheckParam .

func (*LogSearchDetailAction) Do

func (action *LogSearchDetailAction) Do(input interface{}) (interface{}, error)

Do .

func (*LogSearchDetailAction) ReadParam

func (action *LogSearchDetailAction) ReadParam(param interface{}) (interface{}, error)

ReadParam .

func (*LogSearchDetailAction) SearchDetail

func (action *LogSearchDetailAction) SearchDetail(input *SearchDetailInput) (output SearchDetailOutput, err error)

SearchDetail .

func (*LogSearchDetailAction) SetAcceptLanguage

func (action *LogSearchDetailAction) SetAcceptLanguage(language string)

type MinioConf

type MinioConf struct {
	AccessKey string
	MinioURL  string
	BucketURL string
	SecretKey string
}

MinioConf .

type MinionInstallAction

type MinionInstallAction struct{ Language string }

func (*MinionInstallAction) CheckParam

func (action *MinionInstallAction) CheckParam(input AgentInstallInput) error

func (*MinionInstallAction) Do

func (action *MinionInstallAction) Do(input interface{}) (interface{}, error)

func (*MinionInstallAction) ReadParam

func (action *MinionInstallAction) ReadParam(param interface{}) (interface{}, error)

func (*MinionInstallAction) SetAcceptLanguage

func (action *MinionInstallAction) SetAcceptLanguage(language string)

type MinionUninstallAction

type MinionUninstallAction struct{ Language string }

func (*MinionUninstallAction) Do

func (action *MinionUninstallAction) Do(input interface{}) (interface{}, error)

func (*MinionUninstallAction) ReadParam

func (action *MinionUninstallAction) ReadParam(param interface{}) (interface{}, error)

func (*MinionUninstallAction) SetAcceptLanguage

func (action *MinionUninstallAction) SetAcceptLanguage(language string)

type MysqlDatabasePlugin

type MysqlDatabasePlugin struct {
}

func (*MysqlDatabasePlugin) GetActionByName

func (plugin *MysqlDatabasePlugin) GetActionByName(actionName string) (Action, error)

type MysqlScriptPlugin

type MysqlScriptPlugin struct {
}

func (*MysqlScriptPlugin) GetActionByName

func (plugin *MysqlScriptPlugin) GetActionByName(actionName string) (Action, error)

type MysqlUserPlugin

type MysqlUserPlugin struct {
}

func (*MysqlUserPlugin) GetActionByName

func (plugin *MysqlUserPlugin) GetActionByName(actionName string) (Action, error)

type NewSaltApiTokenRsp

type NewSaltApiTokenRsp struct {
	Result []SaltApiTokenResult `json:"return"`
}

type PasswordDecodeAction

type PasswordDecodeAction struct {
	Language string
}

func (*PasswordDecodeAction) CheckParam

func (action *PasswordDecodeAction) CheckParam(input PasswordDecodeInput) error

func (*PasswordDecodeAction) Do

func (action *PasswordDecodeAction) Do(input interface{}) (interface{}, error)

func (*PasswordDecodeAction) ReadParam

func (action *PasswordDecodeAction) ReadParam(param interface{}) (interface{}, error)

func (*PasswordDecodeAction) SetAcceptLanguage

func (action *PasswordDecodeAction) SetAcceptLanguage(language string)

type PasswordDecodeInput

type PasswordDecodeInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Password string `json:"password,omitempty"`
}

type PasswordDecodeInputs

type PasswordDecodeInputs struct {
	Inputs []PasswordDecodeInput `json:"inputs,omitempty"`
}

type PasswordDecodeOutput

type PasswordDecodeOutput struct {
	CallBackParameter
	Result
	Guid     string `json:"guid,omitempty"`
	Password string `json:"password,omitempty"`
}

type PasswordDecodeOutputs

type PasswordDecodeOutputs struct {
	Outputs []PasswordDecodeOutput `json:"outputs,omitempty"`
}

type PasswordEncodeAction

type PasswordEncodeAction struct {
	Language string
}

func (*PasswordEncodeAction) CheckParam

func (action *PasswordEncodeAction) CheckParam(input PasswordEncodeInput) error

func (*PasswordEncodeAction) Do

func (action *PasswordEncodeAction) Do(input interface{}) (interface{}, error)

func (*PasswordEncodeAction) ReadParam

func (action *PasswordEncodeAction) ReadParam(param interface{}) (interface{}, error)

func (*PasswordEncodeAction) SetAcceptLanguage

func (action *PasswordEncodeAction) SetAcceptLanguage(language string)

type PasswordEncodeInput

type PasswordEncodeInput struct {
	CallBackParameter
	Guid     string `json:"guid,omitempty"`
	Seed     string `json:"seed,omitempty"`
	Password string `json:"password,omitempty"`
}

type PasswordEncodeInputs

type PasswordEncodeInputs struct {
	Inputs []PasswordEncodeInput `json:"inputs,omitempty"`
}

type PasswordEncodeOutput

type PasswordEncodeOutput struct {
	CallBackParameter
	Result
	Guid     string `json:"guid,omitempty"`
	Password string `json:"password,omitempty"`
}

type PasswordEncodeOutputs

type PasswordEncodeOutputs struct {
	Outputs []PasswordEncodeOutput `json:"outputs,omitempty"`
}

type PasswordPlugin

type PasswordPlugin struct {
}

func (*PasswordPlugin) GetActionByName

func (plugin *PasswordPlugin) GetActionByName(actionName string) (Action, error)

type Plugin

type Plugin interface {
	GetActionByName(actionName string) (Action, error)
}

type PluginRequest

type PluginRequest struct {
	Version      string
	ProviderName string
	Name         string
	Action       string
	Parameters   interface{}
}

type PluginResponse

type PluginResponse struct {
	ResultCode string      `json:"resultCode"`
	ResultMsg  string      `json:"resultMessage"`
	Results    interface{} `json:"results"`
}

func Process

func Process(pluginRequest *PluginRequest) (*PluginResponse, error)

type ReleasedPackagePlugin

type ReleasedPackagePlugin struct {
}

func (ReleasedPackagePlugin) GetActionByName

func (ReleasedPackagePlugin) GetActionByName(actionName string) (Action, error)

type Result

type Result struct {
	Code    string `json:"errorCode"`
	Message string `json:"errorMessage"`
}

type Roster

type Roster struct {
	Name   string
	Host   string
	User   string
	Passwd string
	Sudo   string
}

type RunMysqlScriptAction

type RunMysqlScriptAction struct{ Language string }

func (*RunMysqlScriptAction) Do

func (action *RunMysqlScriptAction) Do(input interface{}) (interface{}, error)

func (*RunMysqlScriptAction) ReadParam

func (action *RunMysqlScriptAction) ReadParam(param interface{}) (interface{}, error)

func (*RunMysqlScriptAction) SetAcceptLanguage

func (action *RunMysqlScriptAction) SetAcceptLanguage(language string)

type RunMysqlScriptInput

type RunMysqlScriptInput struct {
	CallBackParameter
	EndPoint     string `json:"endpoint,omitempty"`
	SqlFiles     string `json:"sql_files,omitempty"`
	Guid         string `json:"guid,omitempty"`
	Seed         string `json:"seed,omitempty"`
	Host         string `json:"host,omitempty"`
	UserName     string `json:"userName,omitempty"`
	Password     string `json:"password,omitempty"`
	DatabaseName string `json:"databaseName,omitempty"`
	Port         string `json:"port,omitempty"`
}

type RunMysqlScriptInputs

type RunMysqlScriptInputs struct {
	Inputs []RunMysqlScriptInput `json:"inputs,omitempty"`
}

type RunMysqlScriptOutput

type RunMysqlScriptOutput struct {
	CallBackParameter
	Result
	Guid   string `json:"guid,omitempty"`
	Detail string `json:"detail,omitempty"`
}

type RunMysqlScriptOutputs

type RunMysqlScriptOutputs struct {
	Outputs []RunMysqlScriptOutput `json:"outputs,omitempty"`
}

type RunScriptAction

type RunScriptAction struct {
	Language string
}

func (*RunScriptAction) CheckParam

func (action *RunScriptAction) CheckParam(input RunScriptInput) error

func (*RunScriptAction) Do

func (action *RunScriptAction) Do(input interface{}) (interface{}, error)

func (*RunScriptAction) ReadParam

func (action *RunScriptAction) ReadParam(param interface{}) (interface{}, error)

func (*RunScriptAction) SetAcceptLanguage

func (action *RunScriptAction) SetAcceptLanguage(language string)

type RunScriptInput

type RunScriptInput struct {
	CallBackParameter
	EndPointType  string `json:"endpointType,omitempty"` // "S3" or "LOCAL", Defalt: "LOCAL"
	EndPoint      string `json:"endpoint,omitempty"`
	ScriptContent string `json:"scriptContent,omitempty"`
	Target        string `json:"target,omitempty"`
	RunAs         string `json:"runAs,omitempty"`
	ExecArg       string `json:"args,omitempty"`
	Guid          string `json:"guid,omitempty"`
	Password      string `json:"password,omitempty"`
	Seed          string `json:"seed,omitempty"`
	WorkDir       string `json:"workDir,omitempty"`
}

type RunScriptInputs

type RunScriptInputs struct {
	Inputs []RunScriptInput `json:"inputs,omitempty"`
}

type RunScriptOutput

type RunScriptOutput struct {
	CallBackParameter
	Result
	Target  string `json:"target"`
	RetCode int    `json:"retCode"`
	Detail  string `json:"detail"`
	Guid    string `json:"guid,omitempty"`
}

type RunScriptOutputs

type RunScriptOutputs struct {
	Outputs []RunScriptOutput `json:"outputs"`
}

type RunScriptThreadObj

type RunScriptThreadObj struct {
	Data              RunScriptOutput
	Err               error
	Index             int
	TmpScriptPathList []string
}

type RunWebConsoleErr

type RunWebConsoleErr struct {
	ResultCode string `json:"resultCode"`
	ResultMsg  string `json:"resultMessage"`
}

type RunWebConsoleParam

type RunWebConsoleParam struct {
	Token string `json:"token,omitempty"`
}

type SSHRunScriptAction

type SSHRunScriptAction struct{ Language string }

func (*SSHRunScriptAction) CheckParam

func (action *SSHRunScriptAction) CheckParam(input RunScriptInput) error

func (*SSHRunScriptAction) Do

func (action *SSHRunScriptAction) Do(input interface{}) (interface{}, error)

func (*SSHRunScriptAction) ReadParam

func (action *SSHRunScriptAction) ReadParam(param interface{}) (interface{}, error)

func (*SSHRunScriptAction) SetAcceptLanguage

func (action *SSHRunScriptAction) SetAcceptLanguage(language string)

type SaltApiCallAction

type SaltApiCallAction struct {
	Language string
}

func (*SaltApiCallAction) CheckParam

func (action *SaltApiCallAction) CheckParam(input SaltApiCallInput) error

func (*SaltApiCallAction) Do

func (action *SaltApiCallAction) Do(input interface{}) (interface{}, error)

func (*SaltApiCallAction) ReadParam

func (action *SaltApiCallAction) ReadParam(param interface{}) (interface{}, error)

func (*SaltApiCallAction) SetAcceptLanguage

func (action *SaltApiCallAction) SetAcceptLanguage(language string)

type SaltApiCallInput

type SaltApiCallInput struct {
	CallBackParameter
	Guid     string   `json:"guid,omitempty"`
	Client   string   `json:"client,omitempty"`
	Target   string   `json:"target,omitempty"`
	Function string   `json:"function,omitempty"`
	Args     []string `json:"args,omitempty"`
}

type SaltApiCallInputs

type SaltApiCallInputs struct {
	Inputs []SaltApiCallInput `json:"inputs,omitempty"`
}

type SaltApiCallOutput

type SaltApiCallOutput struct {
	CallBackParameter
	Result
	Guid   string `json:"guid,omitempty"`
	Detail string `json:"detail,omitempty"`
}

type SaltApiCallOutputs

type SaltApiCallOutputs struct {
	Outputs []SaltApiCallOutput `json:"outputs,omitempty"`
}

type SaltApiCmdRunResult

type SaltApiCmdRunResult struct {
	Jid       string `json:"jid,omitempty"`
	RetCode   int    `json:"retcode,omitempty"`
	RetDetail string `json:"ret,omitempty"`
}

type SaltApiCmdRunResults

type SaltApiCmdRunResults struct {
	Results []map[string]SaltApiCmdRunResult `json:"return,omitempty"`
}

type SaltApiCmdScriptResult

type SaltApiCmdScriptResult struct {
	Pid     int    `json:"pid,omitempty"`
	RetCode int    `json:"retcode,omitempty"`
	Stderr  string `json:"stderr,omitempty"`
	Stdout  string `json:"stdout,omitempty"`
}

type SaltApiCmdScriptResults

type SaltApiCmdScriptResults struct {
	Results []map[string]SaltApiCmdScriptResult `json:"return,omitempty"`
}

type SaltApiPlugin

type SaltApiPlugin struct {
}

func (*SaltApiPlugin) GetActionByName

func (plugin *SaltApiPlugin) GetActionByName(actionName string) (Action, error)

type SaltApiRequest

type SaltApiRequest struct {
	Client     string   `json:"client,omitempty"`
	TargetType string   `json:"expr_form,omitempty"`
	Target     string   `json:"tgt,omitempty"`
	Function   string   `json:"fun,omitempty"`
	Args       []string `json:"arg,omitempty"`
	FullReturn bool     `json:"full_return,omitempty"`
}

type SaltApiToken

type SaltApiToken struct {
	Token      string
	CreateTime time.Time
	Expire     float64 //unit second
}

type SaltApiTokenResult

type SaltApiTokenResult struct {
	Token  string  `json:"token"`
	Start  float64 `json:"start"`
	Expire float64 `json:"expire"`
}

type ScriptPlugin

type ScriptPlugin struct {
}

func (*ScriptPlugin) GetActionByName

func (plugin *ScriptPlugin) GetActionByName(actionName string) (Action, error)

type SearchDetailInput

type SearchDetailInput struct {
	CallBackParameter
	Guid            string `json:"guid,omitempty"`
	FileName        string `json:"fileName,omitempty"`
	LineNumber      string `json:"lineNumber,omitempty"`
	RelateLineCount int    `json:"relateLineCount,omitempty"`
}

SearchDetailInput .

type SearchDetailInputs

type SearchDetailInputs struct {
	Inputs []SearchDetailInput `json:"inputs,omitempty"`
}

SearchDetailInputs .

type SearchDetailOutput

type SearchDetailOutput struct {
	CallBackParameter
	Result
	Guid       string `json:"guid,omitempty"`
	FileName   string `json:"fileName,omitempty"`
	LineNumber string `json:"lineNumber,omitempty"`
	Logs       string `json:"logs,omitempty"`
}

SearchDetailOutput .

type SearchDetailOutputs

type SearchDetailOutputs struct {
	Outputs []SearchDetailOutput `json:"outputs,omitempty"`
}

SearchDetailOutputs .

type SearchInput

type SearchInput struct {
	CallBackParameter
	Guid       string `json:"guid,omitempty"`
	KeyWord    string `json:"keyWord,omitempty"`
	LineNumber int    `json:"lineNumber,omitempty"`
}

SearchInput .

type SearchInputs

type SearchInputs struct {
	Inputs []SearchInput `json:"inputs,omitempty"`
}

SearchInputs .

type SearchOutput

type SearchOutput struct {
	CallBackParameter
	Result
	Guid     string `json:"guid,omitempty"`
	FileName string `json:"fileName,omitempty"`
	Line     string `json:"lineNumber,omitempty"`
	Log      string `json:"log,omitempty"`
}

SearchOutput .

type SearchOutputs

type SearchOutputs struct {
	Outputs []SearchOutput `json:"outputs,omitempty"`
}

SearchOutputs .

type SearchResult

type SearchResult struct {
	LineNum  int    `json:"lineNum"`
	LineText string `json:"lineText"`
}

type SearchTextAction

type SearchTextAction struct {
	Language string
}

func (*SearchTextAction) CheckParam

func (action *SearchTextAction) CheckParam(input SearchTextInput) error

func (*SearchTextAction) Do

func (action *SearchTextAction) Do(input interface{}) (interface{}, error)

func (*SearchTextAction) ReadParam

func (action *SearchTextAction) ReadParam(param interface{}) (interface{}, error)

func (*SearchTextAction) SetAcceptLanguage

func (action *SearchTextAction) SetAcceptLanguage(language string)

type SearchTextInput

type SearchTextInput struct {
	CallBackParameter
	Guid          string `json:"guid,omitempty"`
	Target        string `json:"target,omitempty"`
	EndPoint      string `json:"endpoint,omitempty"`
	SearchPattern string `json:"pattern,omitempty"`
}

type SearchTextInputs

type SearchTextInputs struct {
	Inputs []SearchTextInput `json:"inputs,omitempty"`
}

type SearchTextOutput

type SearchTextOutput struct {
	CallBackParameter
	Result
	Guid    string         `json:"guid,omitempty"`
	Host    string         `json:"host,omitempty"`
	Results []SearchResult `json:"result,omitempty"`
}

type SearchTextOutputs

type SearchTextOutputs struct {
	Outputs []SearchTextOutput `json:"outputs"`
}

type SshConnectResult

type SshConnectResult struct {
	Err      error
	Input    *WebConsoleUrlInput
	Password string
}

type TextProcessorPlugin

type TextProcessorPlugin struct {
}

func (*TextProcessorPlugin) GetActionByName

func (plugin *TextProcessorPlugin) GetActionByName(actionName string) (Action, error)

type UserPlugin

type UserPlugin struct {
}

func (*UserPlugin) GetActionByName

func (plugin *UserPlugin) GetActionByName(actionName string) (Action, error)

type VariablePlugin

type VariablePlugin struct {
}

VariablePlugin .

func (*VariablePlugin) GetActionByName

func (plugin *VariablePlugin) GetActionByName(actionName string) (Action, error)

GetActionByName .

type VariableReplaceAction

type VariableReplaceAction struct {
	Language string
}

func (*VariableReplaceAction) CheckParam

func (action *VariableReplaceAction) CheckParam(input VariableReplaceInput) error

func (*VariableReplaceAction) Do

func (action *VariableReplaceAction) Do(input interface{}) (interface{}, error)

func (*VariableReplaceAction) ReadParam

func (action *VariableReplaceAction) ReadParam(param interface{}) (interface{}, error)

func (*VariableReplaceAction) SetAcceptLanguage

func (action *VariableReplaceAction) SetAcceptLanguage(language string)

type VariableReplaceInput

type VariableReplaceInput struct {
	CallBackParameter
	EndPoint     string `json:"endpoint,omitempty"`
	Guid         string `json:"guid,omitempty"`
	FilePath     string `json:"confFiles,omitempty"`
	VariableList string `json:"variableList,omitempty"`

	//support aomp password encrypt
	EncryptVariblePrefix string `json:"encryptVariblePrefix,omitempty"`
	Seed                 string `json:"seed,omitempty"`
	AppPublicKey         string `json:"appPublicKey,omitempty"`
	SysPrivateKey        string `json:"sysPrivateKey,omitempty"`
	FileReplacePrefix    string `json:"fileReplacePrefix,omitempty"`
}

VariableReplaceInput .

type VariableReplaceInputs

type VariableReplaceInputs struct {
	Inputs []VariableReplaceInput `json:"inputs,omitempty"`
}

VariableReplaceInputs .

type VariableReplaceOutput

type VariableReplaceOutput struct {
	CallBackParameter
	Result
	Guid         string `json:"guid,omitempty"`
	NewS3PkgPath string `json:"s3PkgPath,omitempty"`
}

VariableReplaceOutput .

type VariableReplaceOutputs

type VariableReplaceOutputs struct {
	Outputs []VariableReplaceOutput `json:"outputs,omitempty"`
}

VariableReplaceOutputs .

type WebConsoleOutput

type WebConsoleOutput struct {
	Guid        string `json:"guid,omitempty"`
	Token       string `json:"token,omitempty"`
	ReDirectUrl string `json:"redirect_url,omitempty"`
	Method      string `json:"method,omitempty"`
}

type WebConsoleOutputs

type WebConsoleOutputs struct {
	Outputs []WebConsoleOutput `json:"outputs,omitempty"`
}

type WebConsolePlugin

type WebConsolePlugin struct {
}

func (*WebConsolePlugin) GetActionByName

func (plugin *WebConsolePlugin) GetActionByName(actionName string) (Action, error)

type WebConsoleUrlInput

type WebConsoleUrlInput struct {
	Guid      string `json:"guid,omitempty"`
	HostIp    string `json:"host_ip,omitempty"`
	ShellPort uint   `json:"shell_port,omitempty"`
	UserName  string `json:"user_name,omitempty"`
	Seed      string `json:"seed,omitempty"`
	Password  string `json:"password,omitempty"`
}

type WebConsoleUrlInputs

type WebConsoleUrlInputs struct {
	Inputs []WebConsoleUrlInput `json:"inputs,omitempty"`
}

Jump to

Keyboard shortcuts

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