system

package
v0.0.0-...-e6d3209 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalSyslog = new(SyslogHandler)

Functions

func Check

func CheckK8sFileIsExist

func CheckK8sFileIsExist(fpath, fName string) int

func CheckK8sFilePost

func CheckK8sFilePost(ext, fName string) int

func CreateKubeConfigDir

func CreateKubeConfigDir(fpath string)

func GetSyncSyslogFunc

func GetSyncSyslogFunc(exType string) func()

func TestClient

func TestClient(params models.ApiParams) models.Result

Types

type ClientModuleService

type ClientModuleService struct {
	ConfigForUpdate     *models.UpdateAssets
	ClientModuleControl *models.ClientModuleControl
	HostIds             string
}

func (*ClientModuleService) GetUpdateAssetsConfig

func (this *ClientModuleService) GetUpdateAssetsConfig() []byte

func (*ClientModuleService) SetModule

func (this *ClientModuleService) SetModule() *models.NatsData

type HostService

type HostService struct {
	Host models.HostConfig
}

func (*HostService) Delete

func (this *HostService) Delete() models.Result

todo add result

func (*HostService) SendAuthorizationDetail

func (this *HostService) SendAuthorizationDetail() models.Result

type LDAPService

type LDAPService struct {
	LoginUser models.LDAPUser
}

func (*LDAPService) CheckLDAPStatus

func (this *LDAPService) CheckLDAPStatus() models.Result

func (*LDAPService) SearchUser

func (this *LDAPService) SearchUser() (*ldap.SearchResult, error)

func (*LDAPService) UserAuthentication

func (this *LDAPService) UserAuthentication() (bool, error)

type LicenseService

type LicenseService struct {
	LicenseByte     []byte
	IsForce         bool
	IsUpdate        bool
	FileType        string
	LicStandFile    string
	LicStandTmpFile string
	LicTrialFile    string
	LicType         string
}

func (*LicenseService) CheckLicenseFile

func (this *LicenseService) CheckLicenseFile(h *multipart.FileHeader) models.Result

func (*LicenseService) CheckLicenseType

func (this *LicenseService) CheckLicenseType() (res models.Result)

func (*LicenseService) GenerateFeatureCode

func (this *LicenseService) GenerateFeatureCode() models.Result

func (*LicenseService) GetFeatureCode

func (this *LicenseService) GetFeatureCode() string

func (*LicenseService) GetLicenseData

func (this *LicenseService) GetLicenseData(licConfig *models.LicenseConfig) models.Result

func (*LicenseService) GetLicenseFilePath

func (this *LicenseService) GetLicenseFilePath() string

func (*LicenseService) GetLicensedHostCount

func (this *LicenseService) GetLicensedHostCount() int64

func (*LicenseService) InitTrialLicense

func (this *LicenseService) InitTrialLicense() models.Result

func (*LicenseService) LicenseActive

func (this *LicenseService) LicenseActive() models.Result

func (*LicenseService) LicenseRSADecrypt

func (this *LicenseService) LicenseRSADecrypt(licenseByte []byte) models.Result

func (*LicenseService) UpdateLicenseCountOfModules

func (this *LicenseService) UpdateLicenseCountOfModules(count int64) models.Result

func (*LicenseService) VerifyFeatureCode

func (this *LicenseService) VerifyFeatureCode(fcode string) models.Result

type LogToMailFilterService

type LogToMailFilterService struct {
	InfoType    string
	InfoSubType string
	LogType     string
	CurLevelTag string
}

func (*LogToMailFilterService) GetLogFilterStatus

func (this *LogToMailFilterService) GetLogFilterStatus() bool

func (*LogToMailFilterService) SendToChannel

func (this *LogToMailFilterService) SendToChannel(dataModel interface{})

func (*LogToMailFilterService) TransLogTypeAndTag

func (this *LogToMailFilterService) TransLogTypeAndTag() string

type LogoService

type LogoService struct {
}

func (*LogoService) Check

func (this *LogoService) Check(h *multipart.FileHeader) (models.Result, string)

func (*LogoService) CheckLogoIsExist

func (this *LogoService) CheckLogoIsExist() models.Result

func (*LogoService) CreateLogoDir

func (this *LogoService) CreateLogoDir(fpath string)
func (this *LogoService) RestoreLogo() models.Result
func (this *LogoService) SaveDefaultLogo(path string)

type MailService

type MailService struct {
	Subject          string
	Body             string
	WarningInfoName  string
	WarningInfoError string
}

func (*MailService) FillMailWarningData

func (this *MailService) FillMailWarningData() models.WarningInfo

func (*MailService) SendMail

func (this *MailService) SendMail() error

func (*MailService) StartMailService

func (this *MailService) StartMailService()

type RespCenterService

type RespCenterService struct {
}

func (*RespCenterService) ContainerOperation

func (this *RespCenterService) ContainerOperation(crc *models.RespCenter) models.Result

type RuleDefineService

type RuleDefineService struct {
	RuleDefine *models.RuleDefine
}

func (*RuleDefineService) AddRule

func (this *RuleDefineService) AddRule() models.Result

type SysConfigService

type SysConfigService struct {
	SysConfig *models.SysConfig
	ConfigKey string
	ParamName string
}

func (*SysConfigService) GetConfigDataBool

func (this *SysConfigService) GetConfigDataBool() (status bool, err error)

func (*SysConfigService) RefreshConnections

func (this *SysConfigService) RefreshConnections()

type SyslogHandler

type SyslogHandler struct {
	// contains filtered or unexported fields
}

func (*SyslogHandler) CheckSyslogServer

func (this *SyslogHandler) CheckSyslogServer(ServerUrl, ServerPort string) error

func (*SyslogHandler) OpenSyslog

func (this *SyslogHandler) OpenSyslog(tag string) error

func (*SyslogHandler) SendSysLog

func (this *SyslogHandler) SendSysLog(tag, level, msg string)

func (*SyslogHandler) UpdateSysLogConfCache

func (this *SyslogHandler) UpdateSysLogConfCache()

type WariningFilterService

type WariningFilterService struct {
	Rule        string
	RuleNode    string
	WarningInfo models.WarningInfo
}

func (*WariningFilterService) FilterWarnWhiteList

func (this *WariningFilterService) FilterWarnWhiteList(warningInfo models.WarningInfo) bool

func (*WariningFilterService) WhiteListCheckInner

func (this *WariningFilterService) WhiteListCheckInner() bool

func (*WariningFilterService) WhiteListCheckOuter

func (this *WariningFilterService) WhiteListCheckOuter() bool

type WarnWhitelistService

type WarnWhitelistService struct {
	WhitelistData []byte
}

func (*WarnWhitelistService) Check

func (*WarnWhitelistService) CreateWarnWhitelistDir

func (this *WarnWhitelistService) CreateWarnWhitelistDir(fpath string)

func (*WarnWhitelistService) SaveList

func (this *WarnWhitelistService) SaveList() models.Result

Jump to

Keyboard shortcuts

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