console

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sql_ConsoleUserDataIdTable core.SqlTable = "console_usersid" //话数据
	Sql_ConsoleUserDataTable   core.SqlTable = "console_users"
)
View Source
const (
	Cache_ConsoleToken          string = "Console_Token:%s"          //用户数据缓存
	Cache_ConsoleUsers          string = "Console_Users:%d"          //用户数据缓存
	Cache_ConsoleClusterMonitor string = "Console_Clustermonitor:%s" //集群监听数据
	Cache_ConsoleHostMonitor    string = "Console_Hostmonitor"       //主机监听数据
	Cache_ConsoleCaptcha        string = "Console_Captcha:%s-%d"     //验证码缓存
)
View Source
const (
	Event_Registered core.Event_Key = "Console_Registered" //用户注册
	Event_Login      core.Event_Key = "Console_Login"      //用户登录
)
View Source
const (
	ErrorCode_Success               core.ErrorCode = 0  //成功
	ErrorCode_NoFindService         core.ErrorCode = 10 //没有找到远程服务器
	ErrorCode_RpcFuncExecutionError core.ErrorCode = 11 //Rpc方法执行错误
	ErrorCode_CacheReadError        core.ErrorCode = 12 //缓存读取失败
	ErrorCode_SqlExecutionError     core.ErrorCode = 13 //数据库执行错误
	ErrorCode_ReqParameterError     core.ErrorCode = 14 //请求参数错误
	ErrorCode_SignError             core.ErrorCode = 15 //签名错误

	//Login登录错误码
	ErrorCode_TokenExpired                core.ErrorCode = 100 //Token过期
	ErrorCode_NoLOgin                     core.ErrorCode = 101 //未登录
	ErrorCode_AuthorityLow                core.ErrorCode = 102 //权限不足
	ErrorCode_AlreadyRegister             core.ErrorCode = 103 //帐号已被注册
	ErrorCode_LoginAccountOrPasswordError core.ErrorCode = 104 //登录帐号密码错误
	ErrorCode_UserCookieLose              core.ErrorCode = 105 //用户Cookie数据丢失
	ErrorCode_UserDataError               core.ErrorCode = 106 //用户数据错误
)
View Source
const (
	UserKey string = "UserId"
)

Variables

View Source
var (
	QueryMonitorTime_name = map[int32]string{
		0: "OneHour",
		1: "SixHour",
		2: "OneDay",
		3: "SevenDay",
	}
	QueryMonitorTime_value = map[string]int32{
		"OneHour":  0,
		"SixHour":  1,
		"OneDay":   2,
		"SevenDay": 3,
	}
)

Enum value maps for QueryMonitorTime.

View Source
var (
	CaptchaType_name = map[int32]string{
		0: "RegisterCaptcha",
		1: "LoginCaptcha",
		2: "BindCaptcha",
	}
	CaptchaType_value = map[string]int32{
		"RegisterCaptcha": 0,
		"LoginCaptcha":    1,
		"BindCaptcha":     2,
	}
)

Enum value maps for CaptchaType.

View Source
var (
	UserRole_name = map[int32]string{
		0: "Guester",
		1: "Operator",
		2: "Developer",
		3: "Master",
	}
	UserRole_value = map[string]int32{
		"Guester":   0,
		"Operator":  1,
		"Developer": 2,
		"Master":    3,
	}
)

Enum value maps for UserRole.

View Source
var ErrorCodeMsg = map[core.ErrorCode]string{
	ErrorCode_Success:                     "成功",
	ErrorCode_NoFindService:               "没有找到远程服务器",
	ErrorCode_RpcFuncExecutionError:       "Rpc方法执行错误",
	ErrorCode_CacheReadError:              "缓存读取失败",
	ErrorCode_SqlExecutionError:           "数据库执行错误",
	ErrorCode_ReqParameterError:           "请求参数错误",
	ErrorCode_SignError:                   "签名错误",
	ErrorCode_TokenExpired:                "Token过期",
	ErrorCode_NoLOgin:                     "未登录",
	ErrorCode_AuthorityLow:                "您的权限不足",
	ErrorCode_AlreadyRegister:             "帐号已被注册",
	ErrorCode_LoginAccountOrPasswordError: "登录帐号密码错误",
	ErrorCode_UserCookieLose:              "用户Cookie数据丢失",
}

Functions

func GetErrorCodeMsg

func GetErrorCodeMsg(code core.ErrorCode) string

Types

type ApiComp

type ApiComp struct {
	cbase.ModuleCompBase
	// contains filtered or unexported fields
}

func (*ApiComp) GetClusterMonitorData

func (this *ApiComp) GetClusterMonitorData(c *http.Context)

获取控制台信息

func (*ApiComp) GetCpuInfo

func (this *ApiComp) GetCpuInfo(c *http.Context)

获取控制台信息

func (*ApiComp) GetHostInfo

func (this *ApiComp) GetHostInfo(c *http.Context)

获取控制台信息

func (*ApiComp) GetHostMonitorData

func (this *ApiComp) GetHostMonitorData(c *http.Context)

获取主机监控信息

func (*ApiComp) GetMemoryInfo

func (this *ApiComp) GetMemoryInfo(c *http.Context)

获取控制台信息

func (*ApiComp) GetProjectInfo

func (this *ApiComp) GetProjectInfo(c *http.Context)

获取集群信息

func (*ApiComp) GetUserinfoReq

func (this *ApiComp) GetUserinfoReq(c *http.Context)

登录请求 Token

func (*ApiComp) Init

func (this *ApiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error)

func (*ApiComp) LoginByCaptchaReq

func (this *ApiComp) LoginByCaptchaReq(c *http.Context)

登录请求 验证码

func (*ApiComp) LoginByPasswordReq

func (this *ApiComp) LoginByPasswordReq(c *http.Context)

登录请求 密码

func (*ApiComp) LoginOutReq

func (this *ApiComp) LoginOutReq(c *http.Context)

登出

func (*ApiComp) RegisterByCaptchaReq

func (this *ApiComp) RegisterByCaptchaReq(c *http.Context)

注册请求 验证码

func (*ApiComp) SendEmailCaptchaReq

func (this *ApiComp) SendEmailCaptchaReq(c *http.Context)

获取验证码

type CacheComp

type CacheComp struct {
	cbase.ModuleCompBase
	// contains filtered or unexported fields
}

func (*CacheComp) AddNewClusterMonitor

func (this *CacheComp) AddNewClusterMonitor(data map[string]*ClusterMonitor)

添加新的ClusterMonitor

func (*CacheComp) AddNewHostMonitor

func (this *CacheComp) AddNewHostMonitor(data *HostMonitor)

添加新的HostMonitor

func (*CacheComp) CleanToken

func (this *CacheComp) CleanToken(token string) (err error)

清理Token

func (*CacheComp) CleanUserData

func (this *CacheComp) CleanUserData(uid uint32) (err error)

清理用户缓存

func (*CacheComp) GetClusterMonitor

func (this *CacheComp) GetClusterMonitor(sIs string, timeleng int) (result []*ClusterMonitor, err error)

添加新的ClusterMonitor

func (*CacheComp) GetHostMonitor

func (this *CacheComp) GetHostMonitor(timeleng int) (result []*HostMonitor, err error)

添加新的HostMonitor

func (*CacheComp) GetRedis

func (this *CacheComp) GetRedis() redis.IRedis

func (*CacheComp) Init

func (this *CacheComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error)

func (*CacheComp) QueryToken

func (this *CacheComp) QueryToken(token string) (uId uint32, err error)

查询用户数据

func (*CacheComp) QueryUserData

func (this *CacheComp) QueryUserData(uId uint32) (result *Cache_UserData, err error)

查询用户数据

func (*CacheComp) WriteToken

func (this *CacheComp) WriteToken(token string, uId uint32) (err error)

写入Token

func (*CacheComp) WriteUserData

func (this *CacheComp) WriteUserData(data *Cache_UserData) (err error)

登录用户缓存信息长期驻留

type Cache_UserData

type Cache_UserData struct {
	Db_UserData *DB_UserData `protobuf:"bytes,1,opt,name=Db_UserData,json=DbUserData,proto3" json:"Db_UserData,omitempty"` //用户信息
	IsOnLine    bool         `protobuf:"varint,2,opt,name=IsOnLine,proto3" json:"IsOnLine,omitempty"`                      //是否在线
	// contains filtered or unexported fields
}

用户缓存

func (*Cache_UserData) Descriptor deprecated

func (*Cache_UserData) Descriptor() ([]byte, []int)

Deprecated: Use Cache_UserData.ProtoReflect.Descriptor instead.

func (*Cache_UserData) GetDb_UserData

func (x *Cache_UserData) GetDb_UserData() *DB_UserData

func (*Cache_UserData) GetIsOnLine

func (x *Cache_UserData) GetIsOnLine() bool

func (*Cache_UserData) ProtoMessage

func (*Cache_UserData) ProtoMessage()

func (*Cache_UserData) ProtoReflect

func (x *Cache_UserData) ProtoReflect() protoreflect.Message

func (*Cache_UserData) Reset

func (x *Cache_UserData) Reset()

func (*Cache_UserData) String

func (x *Cache_UserData) String() string

type CaptchaComp

type CaptchaComp struct {
	cbase.ModuleCompBase
	// contains filtered or unexported fields
}

func (*CaptchaComp) Init

func (this *CaptchaComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error)

func (*CaptchaComp) QueryCaptcha

func (this *CaptchaComp) QueryCaptcha(cId string, ctype CaptchaType) (captcha string, err error)

获取验证码

func (*CaptchaComp) SendEmailCaptcha

func (this *CaptchaComp) SendEmailCaptcha(email, captcha string) (err error)

发送邮箱验证码

func (*CaptchaComp) WriteCaptcha

func (this *CaptchaComp) WriteCaptcha(cId, captcha string, ctype CaptchaType)

写入验证码

type CaptchaType

type CaptchaType int32

验证码类型

const (
	CaptchaType_RegisterCaptcha CaptchaType = 0 //注册验证码
	CaptchaType_LoginCaptcha    CaptchaType = 1 //登录验证码
	CaptchaType_BindCaptcha     CaptchaType = 2 //绑定验证码
)

func (CaptchaType) Descriptor

func (CaptchaType) Enum

func (x CaptchaType) Enum() *CaptchaType

func (CaptchaType) EnumDescriptor deprecated

func (CaptchaType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CaptchaType.Descriptor instead.

func (CaptchaType) Number

func (x CaptchaType) Number() protoreflect.EnumNumber

func (CaptchaType) String

func (x CaptchaType) String() string

func (CaptchaType) Type

type ClusterMonitor

type ClusterMonitor struct {
	CpuUsageRate    []float64 `protobuf:"fixed64,1,rep,packed,name=CpuUsageRate,proto3" json:"CpuUsageRate,omitempty"`       //Cpus使用率统计
	MemoryUsageRate []float64 `protobuf:"fixed64,2,rep,packed,name=MemoryUsageRate,proto3" json:"MemoryUsageRate,omitempty"` //内存使用率统计
	GoroutineUsed   []float64 `protobuf:"fixed64,3,rep,packed,name=GoroutineUsed,proto3" json:"GoroutineUsed,omitempty"`     //携程数
	PreWeight       []float64 `protobuf:"fixed64,4,rep,packed,name=PreWeight,proto3" json:"PreWeight,omitempty"`             //权重数
	// contains filtered or unexported fields
}

集群监控信息

func (*ClusterMonitor) Descriptor deprecated

func (*ClusterMonitor) Descriptor() ([]byte, []int)

Deprecated: Use ClusterMonitor.ProtoReflect.Descriptor instead.

func (*ClusterMonitor) GetCpuUsageRate

func (x *ClusterMonitor) GetCpuUsageRate() []float64

func (*ClusterMonitor) GetGoroutineUsed

func (x *ClusterMonitor) GetGoroutineUsed() []float64

func (*ClusterMonitor) GetMemoryUsageRate

func (x *ClusterMonitor) GetMemoryUsageRate() []float64

func (*ClusterMonitor) GetPreWeight

func (x *ClusterMonitor) GetPreWeight() []float64

func (*ClusterMonitor) ProtoMessage

func (*ClusterMonitor) ProtoMessage()

func (*ClusterMonitor) ProtoReflect

func (x *ClusterMonitor) ProtoReflect() protoreflect.Message

func (*ClusterMonitor) Reset

func (x *ClusterMonitor) Reset()

func (*ClusterMonitor) String

func (x *ClusterMonitor) String() string

type ClusterMonitorComp

type ClusterMonitorComp struct {
	cbase.ModuleCompBase
	// contains filtered or unexported fields
}

集群信息监控

func (*ClusterMonitorComp) GetClusterMonitorDataResp

func (this *ClusterMonitorComp) GetClusterMonitorDataResp(queryTime QueryMonitorTime) (result map[string]map[string]interface{})

func (*ClusterMonitorComp) Init

func (this *ClusterMonitorComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error)

func (*ClusterMonitorComp) Monitor

func (this *ClusterMonitorComp) Monitor()

func (*ClusterMonitorComp) SaveMonitorData

func (this *ClusterMonitorComp) SaveMonitorData()

type ClusterMonitorData

type ClusterMonitorData struct {
	CurrCpuPer    float64   `protobuf:"fixed64,1,opt,name=CurrCpuPer,proto3" json:"CurrCpuPer,omitempty"`
	CurrMemoryPer float64   `protobuf:"fixed64,2,opt,name=CurrMemoryPer,proto3" json:"CurrMemoryPer,omitempty"`
	CurrGoroutine float64   `protobuf:"fixed64,3,opt,name=CurrGoroutine,proto3" json:"CurrGoroutine,omitempty"`
	CurrPreWeight float64   `protobuf:"fixed64,4,opt,name=CurrPreWeight,proto3" json:"CurrPreWeight,omitempty"`
	Keys          []string  `protobuf:"bytes,5,rep,name=Keys,proto3" json:"Keys,omitempty"`
	Cpu           []float64 `protobuf:"fixed64,6,rep,packed,name=Cpu,proto3" json:"Cpu,omitempty"`
	Memory        []float64 `protobuf:"fixed64,7,rep,packed,name=Memory,proto3" json:"Memory,omitempty"`
	Goroutine     []float64 `protobuf:"fixed64,8,rep,packed,name=Goroutine,proto3" json:"Goroutine,omitempty"`
	PreWeight     []float64 `protobuf:"fixed64,9,rep,packed,name=PreWeight,proto3" json:"PreWeight,omitempty"`
	// contains filtered or unexported fields
}

查询主机监控数据

func (*ClusterMonitorData) Descriptor deprecated

func (*ClusterMonitorData) Descriptor() ([]byte, []int)

Deprecated: Use ClusterMonitorData.ProtoReflect.Descriptor instead.

func (*ClusterMonitorData) GetCpu

func (x *ClusterMonitorData) GetCpu() []float64

func (*ClusterMonitorData) GetCurrCpuPer

func (x *ClusterMonitorData) GetCurrCpuPer() float64

func (*ClusterMonitorData) GetCurrGoroutine

func (x *ClusterMonitorData) GetCurrGoroutine() float64

func (*ClusterMonitorData) GetCurrMemoryPer

func (x *ClusterMonitorData) GetCurrMemoryPer() float64

func (*ClusterMonitorData) GetCurrPreWeight

func (x *ClusterMonitorData) GetCurrPreWeight() float64

func (*ClusterMonitorData) GetGoroutine

func (x *ClusterMonitorData) GetGoroutine() []float64

func (*ClusterMonitorData) GetKeys

func (x *ClusterMonitorData) GetKeys() []string

func (*ClusterMonitorData) GetMemory

func (x *ClusterMonitorData) GetMemory() []float64

func (*ClusterMonitorData) GetPreWeight

func (x *ClusterMonitorData) GetPreWeight() []float64

func (*ClusterMonitorData) ProtoMessage

func (*ClusterMonitorData) ProtoMessage()

func (*ClusterMonitorData) ProtoReflect

func (x *ClusterMonitorData) ProtoReflect() protoreflect.Message

func (*ClusterMonitorData) Reset

func (x *ClusterMonitorData) Reset()

func (*ClusterMonitorData) String

func (x *ClusterMonitorData) String() string

type Console

type Console struct {
	http.Http
	// contains filtered or unexported fields
}

func (*Console) Cache

func (this *Console) Cache() ICache

func (*Console) Captcha

func (this *Console) Captcha() ICaptcha

func (*Console) CheckToken

func (this *Console) CheckToken(c *http.Context)

token 验证中间键

func (*Console) Clustermonitorcomp

func (this *Console) Clustermonitorcomp() IClustermonitorcomp

func (*Console) CreateToken

func (this *Console) CreateToken(uId uint32) (token string)

创建token

func (*Console) DB

func (this *Console) DB() IDB

func (*Console) GetType

func (this *Console) GetType() core.M_Modules

func (*Console) Hostmonitorcomp

func (this *Console) Hostmonitorcomp() IHostmonitorcomp

func (*Console) HttpStatusOK

func (this *Console) HttpStatusOK(c *http.Context, code core.ErrorCode, data interface{})

统一输出接口

func (*Console) Init

func (this *Console) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error)

func (*Console) NewOptions

func (this *Console) NewOptions() (options core.IModuleOptions)

func (*Console) OnInstallComp

func (this *Console) OnInstallComp()

func (*Console) Options

func (this *Console) Options() IOptions

func (*Console) ParamSign

func (this *Console) ParamSign(param map[string]interface{}) (sign string)

签名接口

type ConsoleUserId

type ConsoleUserId struct {
	Id uint32 `bson:"_id"`
}

type CpuInfo

type CpuInfo struct {
	CPU        int32   `protobuf:"varint,1,opt,name=CPU,proto3" json:"CPU,omitempty"`              //cpu编号
	VendorID   string  `protobuf:"bytes,2,opt,name=VendorID,proto3" json:"VendorID,omitempty"`     //供应商ID
	Family     string  `protobuf:"bytes,3,opt,name=Family,proto3" json:"Family,omitempty"`         //家庭
	Model      string  `protobuf:"bytes,4,opt,name=Model,proto3" json:"Model,omitempty"`           //模型
	Stepping   int32   `protobuf:"varint,5,opt,name=Stepping,proto3" json:"Stepping,omitempty"`    //步进 表示生产工艺较小的改进
	PhysicalID string  `protobuf:"bytes,6,opt,name=PhysicalID,proto3" json:"PhysicalID,omitempty"` //物理ID
	CoreID     string  `protobuf:"bytes,7,opt,name=CoreID,proto3" json:"CoreID,omitempty"`         //核心ID
	Cores      int32   `protobuf:"varint,8,opt,name=Cores,proto3" json:"Cores,omitempty"`          //核心数
	ModelName  string  `protobuf:"bytes,9,opt,name=ModelName,proto3" json:"ModelName,omitempty"`   //模块名
	Mhz        float64 `protobuf:"fixed64,10,opt,name=Mhz,proto3" json:"Mhz,omitempty"`            //兆赫
	CacheSize  int32   `protobuf:"varint,11,opt,name=CacheSize,proto3" json:"CacheSize,omitempty"` //缓存大小
	Flags      string  `protobuf:"bytes,12,opt,name=Flags,proto3" json:"Flags,omitempty"`          //标志
	Microcode  string  `protobuf:"bytes,13,opt,name=Microcode,proto3" json:"Microcode,omitempty"`  //微码
	// contains filtered or unexported fields
}

cpu信息

func (*CpuInfo) Descriptor deprecated

func (*CpuInfo) Descriptor() ([]byte, []int)

Deprecated: Use CpuInfo.ProtoReflect.Descriptor instead.

func (*CpuInfo) GetCPU

func (x *CpuInfo) GetCPU() int32

func (*CpuInfo) GetCacheSize

func (x *CpuInfo) GetCacheSize() int32

func (*CpuInfo) GetCoreID

func (x *CpuInfo) GetCoreID() string

func (*CpuInfo) GetCores

func (x *CpuInfo) GetCores() int32

func (*CpuInfo) GetFamily

func (x *CpuInfo) GetFamily() string

func (*CpuInfo) GetFlags

func (x *CpuInfo) GetFlags() string

func (*CpuInfo) GetMhz

func (x *CpuInfo) GetMhz() float64

func (*CpuInfo) GetMicrocode

func (x *CpuInfo) GetMicrocode() string

func (*CpuInfo) GetModel

func (x *CpuInfo) GetModel() string

func (*CpuInfo) GetModelName

func (x *CpuInfo) GetModelName() string

func (*CpuInfo) GetPhysicalID

func (x *CpuInfo) GetPhysicalID() string

func (*CpuInfo) GetStepping

func (x *CpuInfo) GetStepping() int32

func (*CpuInfo) GetVendorID

func (x *CpuInfo) GetVendorID() string

func (*CpuInfo) ProtoMessage

func (*CpuInfo) ProtoMessage()

func (*CpuInfo) ProtoReflect

func (x *CpuInfo) ProtoReflect() protoreflect.Message

func (*CpuInfo) Reset

func (x *CpuInfo) Reset()

func (*CpuInfo) String

func (x *CpuInfo) String() string

type DBComp

type DBComp struct {
	cbase.ModuleCompBase
	// contains filtered or unexported fields
}

func (*DBComp) GetMgo

func (this *DBComp) GetMgo() mgo.IMongodb

func (*DBComp) Init

func (this *DBComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error)

func (*DBComp) LoginUserDataByPhonOrEmail

func (this *DBComp) LoginUserDataByPhonOrEmail(data *DB_UserData) (result *DB_UserData, err error)

查询用户 账号

func (*DBComp) QueryUserDataById

func (this *DBComp) QueryUserDataById(uid uint32) (result *DB_UserData, err error)

查询用户 Id

func (*DBComp) QueryUserDataByPhonOrEmail

func (this *DBComp) QueryUserDataByPhonOrEmail(phonoremail string) (result *DB_UserData, err error)

查询用户 Id

func (*DBComp) UpDataUserData

func (this *DBComp) UpDataUserData(data *DB_UserData) (err error)

更新用户信息

type DB_UserData

type DB_UserData struct {
	Id          uint32   `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty" bson:"_id"` //tags:{bson:"_id"}
	PhonOrEmail string   `protobuf:"bytes,2,opt,name=PhonOrEmail,proto3" json:"PhonOrEmail,omitempty"`
	Password    string   `protobuf:"bytes,3,opt,name=Password,proto3" json:"Password,omitempty"`
	NickName    string   `protobuf:"bytes,4,opt,name=NickName,proto3" json:"NickName,omitempty"`
	HeadUrl     string   `protobuf:"bytes,5,opt,name=HeadUrl,proto3" json:"HeadUrl,omitempty"`
	UserRole    UserRole `protobuf:"varint,6,opt,name=UserRole,proto3,enum=UserRole" json:"UserRole,omitempty"`
	Token       string   `protobuf:"bytes,7,opt,name=Token,proto3" json:"Token,omitempty"`
	// contains filtered or unexported fields
}

func (*DB_UserData) Descriptor deprecated

func (*DB_UserData) Descriptor() ([]byte, []int)

Deprecated: Use DB_UserData.ProtoReflect.Descriptor instead.

func (*DB_UserData) GetHeadUrl

func (x *DB_UserData) GetHeadUrl() string

func (*DB_UserData) GetId

func (x *DB_UserData) GetId() uint32

func (*DB_UserData) GetNickName

func (x *DB_UserData) GetNickName() string

func (*DB_UserData) GetPassword

func (x *DB_UserData) GetPassword() string

func (*DB_UserData) GetPhonOrEmail

func (x *DB_UserData) GetPhonOrEmail() string

func (*DB_UserData) GetToken

func (x *DB_UserData) GetToken() string

func (*DB_UserData) GetUserRole

func (x *DB_UserData) GetUserRole() UserRole

func (*DB_UserData) ProtoMessage

func (*DB_UserData) ProtoMessage()

func (*DB_UserData) ProtoReflect

func (x *DB_UserData) ProtoReflect() protoreflect.Message

func (*DB_UserData) Reset

func (x *DB_UserData) Reset()

func (*DB_UserData) String

func (x *DB_UserData) String() string

type HostInfo

type HostInfo struct {
	HostID               string `protobuf:"bytes,1,opt,name=HostID,proto3" json:"HostID,omitempty"`                              //主机id
	Hostname             string `protobuf:"bytes,2,opt,name=Hostname,proto3" json:"Hostname,omitempty"`                          //主机名称
	Uptime               uint64 `protobuf:"varint,3,opt,name=Uptime,proto3" json:"Uptime,omitempty"`                             //正常运行时间
	BootTime             uint64 `protobuf:"varint,4,opt,name=BootTime,proto3" json:"BootTime,omitempty"`                         //开机时间
	Procs                uint64 `protobuf:"varint,5,opt,name=Procs,proto3" json:"Procs,omitempty"`                               //进程数
	OS                   string `protobuf:"bytes,6,opt,name=OS,proto3" json:"OS,omitempty"`                                      //内核系统 例如:freebsd, linux
	Platform             string `protobuf:"bytes,7,opt,name=Platform,proto3" json:"Platform,omitempty"`                          //操作系统 例如:ubuntu, centos
	PlatformFamily       string `protobuf:"bytes,8,opt,name=PlatformFamily,proto3" json:"PlatformFamily,omitempty"`              //主机系统系列 ex: debian, rhel
	PlatformVersion      string `protobuf:"bytes,9,opt,name=PlatformVersion,proto3" json:"PlatformVersion,omitempty"`            //主机系统版本
	KernelArch           string `protobuf:"bytes,10,opt,name=KernelArch,proto3" json:"KernelArch,omitempty"`                     //Cpu架构
	VirtualizationSystem string `protobuf:"bytes,11,opt,name=VirtualizationSystem,proto3" json:"VirtualizationSystem,omitempty"` //虚拟系统
	VirtualizationRole   string `protobuf:"bytes,12,opt,name=VirtualizationRole,proto3" json:"VirtualizationRole,omitempty"`     //虚拟身份  guest or host
	// contains filtered or unexported fields
}

主机信息

func (*HostInfo) Descriptor deprecated

func (*HostInfo) Descriptor() ([]byte, []int)

Deprecated: Use HostInfo.ProtoReflect.Descriptor instead.

func (*HostInfo) GetBootTime

func (x *HostInfo) GetBootTime() uint64

func (*HostInfo) GetHostID

func (x *HostInfo) GetHostID() string

func (*HostInfo) GetHostname

func (x *HostInfo) GetHostname() string

func (*HostInfo) GetKernelArch

func (x *HostInfo) GetKernelArch() string

func (*HostInfo) GetOS

func (x *HostInfo) GetOS() string

func (*HostInfo) GetPlatform

func (x *HostInfo) GetPlatform() string

func (*HostInfo) GetPlatformFamily

func (x *HostInfo) GetPlatformFamily() string

func (*HostInfo) GetPlatformVersion

func (x *HostInfo) GetPlatformVersion() string

func (*HostInfo) GetProcs

func (x *HostInfo) GetProcs() uint64

func (*HostInfo) GetUptime

func (x *HostInfo) GetUptime() uint64

func (*HostInfo) GetVirtualizationRole

func (x *HostInfo) GetVirtualizationRole() string

func (*HostInfo) GetVirtualizationSystem

func (x *HostInfo) GetVirtualizationSystem() string

func (*HostInfo) ProtoMessage

func (*HostInfo) ProtoMessage()

func (*HostInfo) ProtoReflect

func (x *HostInfo) ProtoReflect() protoreflect.Message

func (*HostInfo) Reset

func (x *HostInfo) Reset()

func (*HostInfo) String

func (x *HostInfo) String() string

type HostMonitor

type HostMonitor struct {
	CpuUsageRate    []float64 `protobuf:"fixed64,1,rep,packed,name=CpuUsageRate,proto3" json:"CpuUsageRate,omitempty"`       //Cpus使用率统计
	MemoryUsageRate []float64 `protobuf:"fixed64,2,rep,packed,name=MemoryUsageRate,proto3" json:"MemoryUsageRate,omitempty"` //内存使用率统计
	// contains filtered or unexported fields
}

主机监控信息

func (*HostMonitor) Descriptor deprecated

func (*HostMonitor) Descriptor() ([]byte, []int)

Deprecated: Use HostMonitor.ProtoReflect.Descriptor instead.

func (*HostMonitor) GetCpuUsageRate

func (x *HostMonitor) GetCpuUsageRate() []float64

func (*HostMonitor) GetMemoryUsageRate

func (x *HostMonitor) GetMemoryUsageRate() []float64

func (*HostMonitor) ProtoMessage

func (*HostMonitor) ProtoMessage()

func (*HostMonitor) ProtoReflect

func (x *HostMonitor) ProtoReflect() protoreflect.Message

func (*HostMonitor) Reset

func (x *HostMonitor) Reset()

func (*HostMonitor) String

func (x *HostMonitor) String() string

type HostMonitorComp

type HostMonitorComp struct {
	cbase.ModuleCompBase
	// contains filtered or unexported fields
}

主机信息监控

func (*HostMonitorComp) CpuInfo

func (this *HostMonitorComp) CpuInfo() []*CpuInfo

func (*HostMonitorComp) GetHostMonitorData

func (this *HostMonitorComp) GetHostMonitorData(queryTime QueryMonitorTime) (result *QueryHostMonitorDataResp)

读取主机监控数据

func (*HostMonitorComp) HostInfo

func (this *HostMonitorComp) HostInfo() *HostInfo

func (*HostMonitorComp) Init

func (this *HostMonitorComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error)

func (*HostMonitorComp) MemoryInfo

func (this *HostMonitorComp) MemoryInfo() *MemoryInfo

func (*HostMonitorComp) Monitor

func (this *HostMonitorComp) Monitor()

服务器监控

func (*HostMonitorComp) SaveMonitorData

func (this *HostMonitorComp) SaveMonitorData()

type ICache

type ICache interface {
	core.IModuleComp
	GetRedis() redis.IRedis
	QueryToken(token string) (uId uint32, err error)
	WriteToken(token string, uId uint32) (err error)
	CleanToken(token string) (err error)
	QueryUserData(uId uint32) (result *Cache_UserData, err error)
	WriteUserData(data *Cache_UserData) (err error)
	CleanUserData(uid uint32) (err error)
	AddNewClusterMonitor(data map[string]*ClusterMonitor)
	GetClusterMonitor(sIs string, timeleng int) (result []*ClusterMonitor, err error)
	AddNewHostMonitor(data *HostMonitor)
	GetHostMonitor(timeleng int) (result []*HostMonitor, err error)
}

type ICaptcha

type ICaptcha interface {
	core.IModuleComp
	SendEmailCaptcha(email, captcha string) (err error)
	QueryCaptcha(cId string, ctype CaptchaType) (captcha string, err error)
	WriteCaptcha(cId, captcha string, ctype CaptchaType)
}

type IClustermonitorcomp

type IClustermonitorcomp interface {
	core.IModuleComp
	GetClusterMonitorDataResp(queryTime QueryMonitorTime) (result map[string]map[string]interface{})
}

type IConsole

type IConsole interface {
	http.IHttp
	Options() IOptions
	Cache() ICache
	DB() IDB
	Captcha() ICaptcha
	Hostmonitorcomp() IHostmonitorcomp
	Clustermonitorcomp() IClustermonitorcomp
	ParamSign(param map[string]interface{}) (sign string)
	CheckToken(c *http.Context)
	HttpStatusOK(c *http.Context, code core.ErrorCode, data interface{})
	CreateToken(uId uint32) (token string)
	// contains filtered or unexported methods
}

type IDB

type IDB interface {
	core.IModuleComp
	GetMgo() mgo.IMongodb
	QueryUserDataById(uid uint32) (result *DB_UserData, err error)
	QueryUserDataByPhonOrEmail(phonoremail string) (result *DB_UserData, err error)
	LoginUserDataByPhonOrEmail(data *DB_UserData) (result *DB_UserData, err error)
	UpDataUserData(data *DB_UserData) (err error)
}

type IHostmonitorcomp

type IHostmonitorcomp interface {
	core.IModuleComp
	HostInfo() *HostInfo
	CpuInfo() []*CpuInfo
	MemoryInfo() *MemoryInfo
	GetHostMonitorData(queryTime QueryMonitorTime) (result *QueryHostMonitorDataResp)
}

type IOptions

type IOptions interface {
	http.IOptions
	GetRedisUrl() string
	GetRedisDB() int
	GetRedisPassword() string
	GetInitUserIdNum() int
	GetUserCacheExpirationDate() int
	GetTokenCacheExpirationDate() int
	GetMonitorTotalTime() int
	GetMongodbUrl() string
	GetMongodbDatabase() string
	GetMailServerhost() string
	GetMailFromemail() string
	GetMailFompasswd() string
	GetMailServerport() int
	GetCaptchaExpirationdate() int
	GetSignKey() string
	GetUserInitialPassword() string
	GetProjectName() string
	ToString() string
}

type LoginByCaptchaReq

type LoginByCaptchaReq struct {
	PhonOrEmail string `protobuf:"bytes,1,opt,name=PhonOrEmail,proto3" json:"PhonOrEmail,omitempty"`
	Captcha     string `protobuf:"bytes,2,opt,name=Captcha,proto3" json:"Captcha,omitempty"`
	Sign        string `protobuf:"bytes,3,opt,name=Sign,proto3" json:"Sign,omitempty"` //签名
	// contains filtered or unexported fields
}

登录请求 验证码

func (*LoginByCaptchaReq) Descriptor deprecated

func (*LoginByCaptchaReq) Descriptor() ([]byte, []int)

Deprecated: Use LoginByCaptchaReq.ProtoReflect.Descriptor instead.

func (*LoginByCaptchaReq) GetCaptcha

func (x *LoginByCaptchaReq) GetCaptcha() string

func (*LoginByCaptchaReq) GetPhonOrEmail

func (x *LoginByCaptchaReq) GetPhonOrEmail() string

func (*LoginByCaptchaReq) GetSign

func (x *LoginByCaptchaReq) GetSign() string

func (*LoginByCaptchaReq) ProtoMessage

func (*LoginByCaptchaReq) ProtoMessage()

func (*LoginByCaptchaReq) ProtoReflect

func (x *LoginByCaptchaReq) ProtoReflect() protoreflect.Message

func (*LoginByCaptchaReq) Reset

func (x *LoginByCaptchaReq) Reset()

func (*LoginByCaptchaReq) String

func (x *LoginByCaptchaReq) String() string

type LoginByPasswordReq

type LoginByPasswordReq struct {
	PhonOrEmail string `protobuf:"bytes,1,opt,name=PhonOrEmail,proto3" json:"PhonOrEmail,omitempty"`
	Password    string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"`
	Sign        string `protobuf:"bytes,3,opt,name=Sign,proto3" json:"Sign,omitempty"` //签名
	// contains filtered or unexported fields
}

登录请求 密码

func (*LoginByPasswordReq) Descriptor deprecated

func (*LoginByPasswordReq) Descriptor() ([]byte, []int)

Deprecated: Use LoginByPasswordReq.ProtoReflect.Descriptor instead.

func (*LoginByPasswordReq) GetPassword

func (x *LoginByPasswordReq) GetPassword() string

func (*LoginByPasswordReq) GetPhonOrEmail

func (x *LoginByPasswordReq) GetPhonOrEmail() string

func (*LoginByPasswordReq) GetSign

func (x *LoginByPasswordReq) GetSign() string

func (*LoginByPasswordReq) ProtoMessage

func (*LoginByPasswordReq) ProtoMessage()

func (*LoginByPasswordReq) ProtoReflect

func (x *LoginByPasswordReq) ProtoReflect() protoreflect.Message

func (*LoginByPasswordReq) Reset

func (x *LoginByPasswordReq) Reset()

func (*LoginByPasswordReq) String

func (x *LoginByPasswordReq) String() string

type LoginByTokenReq

type LoginByTokenReq struct {
	Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	Sign  string `protobuf:"bytes,2,opt,name=Sign,proto3" json:"Sign,omitempty"` //签名
	// contains filtered or unexported fields
}

登录请求 token

func (*LoginByTokenReq) Descriptor deprecated

func (*LoginByTokenReq) Descriptor() ([]byte, []int)

Deprecated: Use LoginByTokenReq.ProtoReflect.Descriptor instead.

func (*LoginByTokenReq) GetSign

func (x *LoginByTokenReq) GetSign() string

func (*LoginByTokenReq) GetToken

func (x *LoginByTokenReq) GetToken() string

func (*LoginByTokenReq) ProtoMessage

func (*LoginByTokenReq) ProtoMessage()

func (*LoginByTokenReq) ProtoReflect

func (x *LoginByTokenReq) ProtoReflect() protoreflect.Message

func (*LoginByTokenReq) Reset

func (x *LoginByTokenReq) Reset()

func (*LoginByTokenReq) String

func (x *LoginByTokenReq) String() string

type LoginOutReq

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

登出请求

func (*LoginOutReq) Descriptor deprecated

func (*LoginOutReq) Descriptor() ([]byte, []int)

Deprecated: Use LoginOutReq.ProtoReflect.Descriptor instead.

func (*LoginOutReq) ProtoMessage

func (*LoginOutReq) ProtoMessage()

func (*LoginOutReq) ProtoReflect

func (x *LoginOutReq) ProtoReflect() protoreflect.Message

func (*LoginOutReq) Reset

func (x *LoginOutReq) Reset()

func (*LoginOutReq) String

func (x *LoginOutReq) String() string

type LoginResp

type LoginResp struct {
	Token    string       `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	UserData *DB_UserData `protobuf:"bytes,2,opt,name=UserData,proto3" json:"UserData,omitempty"`
	// contains filtered or unexported fields
}

登录请求 token

func (*LoginResp) Descriptor deprecated

func (*LoginResp) Descriptor() ([]byte, []int)

Deprecated: Use LoginResp.ProtoReflect.Descriptor instead.

func (*LoginResp) GetToken

func (x *LoginResp) GetToken() string

func (*LoginResp) GetUserData

func (x *LoginResp) GetUserData() *DB_UserData

func (*LoginResp) ProtoMessage

func (*LoginResp) ProtoMessage()

func (*LoginResp) ProtoReflect

func (x *LoginResp) ProtoReflect() protoreflect.Message

func (*LoginResp) Reset

func (x *LoginResp) Reset()

func (*LoginResp) String

func (x *LoginResp) String() string

type MemoryInfo

type MemoryInfo struct {
	Total       uint64  `protobuf:"varint,1,opt,name=Total,proto3" json:"Total,omitempty"`
	Available   uint64  `protobuf:"varint,2,opt,name=Available,proto3" json:"Available,omitempty"`
	Used        uint64  `protobuf:"varint,3,opt,name=Used,proto3" json:"Used,omitempty"`
	UsedPercent float64 `protobuf:"fixed64,4,opt,name=UsedPercent,proto3" json:"UsedPercent,omitempty"`
	Free        uint64  `protobuf:"varint,5,opt,name=Free,proto3" json:"Free,omitempty"`
	Active      uint64  `protobuf:"varint,6,opt,name=Active,proto3" json:"Active,omitempty"`
	Inactive    uint64  `protobuf:"varint,7,opt,name=Inactive,proto3" json:"Inactive,omitempty"`
	Wired       uint64  `protobuf:"varint,8,opt,name=Wired,proto3" json:"Wired,omitempty"`
	Laundry     uint64  `protobuf:"varint,9,opt,name=Laundry,proto3" json:"Laundry,omitempty"`
	// contains filtered or unexported fields
}

内存信息

func (*MemoryInfo) Descriptor deprecated

func (*MemoryInfo) Descriptor() ([]byte, []int)

Deprecated: Use MemoryInfo.ProtoReflect.Descriptor instead.

func (*MemoryInfo) GetActive

func (x *MemoryInfo) GetActive() uint64

func (*MemoryInfo) GetAvailable

func (x *MemoryInfo) GetAvailable() uint64

func (*MemoryInfo) GetFree

func (x *MemoryInfo) GetFree() uint64

func (*MemoryInfo) GetInactive

func (x *MemoryInfo) GetInactive() uint64

func (*MemoryInfo) GetLaundry

func (x *MemoryInfo) GetLaundry() uint64

func (*MemoryInfo) GetTotal

func (x *MemoryInfo) GetTotal() uint64

func (*MemoryInfo) GetUsed

func (x *MemoryInfo) GetUsed() uint64

func (*MemoryInfo) GetUsedPercent

func (x *MemoryInfo) GetUsedPercent() float64

func (*MemoryInfo) GetWired

func (x *MemoryInfo) GetWired() uint64

func (*MemoryInfo) ProtoMessage

func (*MemoryInfo) ProtoMessage()

func (*MemoryInfo) ProtoReflect

func (x *MemoryInfo) ProtoReflect() protoreflect.Message

func (*MemoryInfo) Reset

func (x *MemoryInfo) Reset()

func (*MemoryInfo) String

func (x *MemoryInfo) String() string

type Options

type Options struct {
	http.Options
	RedisUrl                 string                 `json:"-"` //缓存地址 不显示控制台配置信息中
	RedisDB                  int                    `json:"-"` //缓存DB
	RedisPassword            string                 `json:"-"` //缓存密码
	InitUserIdNum            int                    `json:"-"` //初始化用户Id数
	UserCacheExpirationDate  int                    `json:"-"` //用户缓存过期时间 单位秒
	TokenCacheExpirationDate int                    `json:"-"` //Token缓存过期时间 单位秒
	MonitorTotalTime         int                    `json:"-"` //监控总时长 小时为单位
	MongodbUrl               string                 `json:"-"` //数据库
	MongodbDatabase          string                 `json:"-"` //数据集
	MailServerhost           string                 `json:"-"` //邮件系统配置
	MailFromemail            string                 `json:"-"` //邮件系统配置
	MailFompasswd            string                 `json:"-"` //邮件系统配置
	MailServerport           int                    `json:"-"` //邮件系统配置
	CaptchaExpirationdate    int                    `json:"-"` //Captcha缓存过期时间 单位秒
	SignKey                  string                 `json:"-"` //签名密钥
	UserInitialPassword      string                 `json:"-"` //用户初始密码
	ProjectName              string                 //项目名称
	ProjectDes               string                 //项目描述
	ProjectVersion           float64                //版本
	ProjectTime              string                 //立项时间
	ProjectMember            map[string]interface{} //项目经理 成员-职务
}

func (*Options) GetCaptchaExpirationdate

func (this *Options) GetCaptchaExpirationdate() int

func (*Options) GetInitUserIdNum

func (this *Options) GetInitUserIdNum() int

func (*Options) GetMailFompasswd

func (this *Options) GetMailFompasswd() string

func (*Options) GetMailFromemail

func (this *Options) GetMailFromemail() string

func (*Options) GetMailServerhost

func (this *Options) GetMailServerhost() string

func (*Options) GetMailServerport

func (this *Options) GetMailServerport() int

func (*Options) GetMongodbDatabase

func (this *Options) GetMongodbDatabase() string

func (*Options) GetMongodbUrl

func (this *Options) GetMongodbUrl() string

func (*Options) GetMonitorTotalTime

func (this *Options) GetMonitorTotalTime() int

func (*Options) GetProjectName

func (this *Options) GetProjectName() string

func (*Options) GetRedisDB

func (this *Options) GetRedisDB() int

func (*Options) GetRedisPassword

func (this *Options) GetRedisPassword() string

func (*Options) GetRedisUrl

func (this *Options) GetRedisUrl() string

func (*Options) GetSignKey

func (this *Options) GetSignKey() string

func (*Options) GetTokenCacheExpirationDate

func (this *Options) GetTokenCacheExpirationDate() int

func (*Options) GetUserCacheExpirationDate

func (this *Options) GetUserCacheExpirationDate() int

func (*Options) GetUserInitialPassword

func (this *Options) GetUserInitialPassword() string

func (*Options) LoadConfig

func (this *Options) LoadConfig(settings map[string]interface{}) (err error)

func (*Options) ToString

func (this *Options) ToString() string

type QueryClusterMonitorDataReq

type QueryClusterMonitorDataReq struct {
	QueryTime QueryMonitorTime `protobuf:"varint,1,opt,name=QueryTime,proto3,enum=QueryMonitorTime" json:"QueryTime,omitempty"`
	// contains filtered or unexported fields
}

查询主机监控数据

func (*QueryClusterMonitorDataReq) Descriptor deprecated

func (*QueryClusterMonitorDataReq) Descriptor() ([]byte, []int)

Deprecated: Use QueryClusterMonitorDataReq.ProtoReflect.Descriptor instead.

func (*QueryClusterMonitorDataReq) GetQueryTime

func (x *QueryClusterMonitorDataReq) GetQueryTime() QueryMonitorTime

func (*QueryClusterMonitorDataReq) ProtoMessage

func (*QueryClusterMonitorDataReq) ProtoMessage()

func (*QueryClusterMonitorDataReq) ProtoReflect

func (*QueryClusterMonitorDataReq) Reset

func (x *QueryClusterMonitorDataReq) Reset()

func (*QueryClusterMonitorDataReq) String

func (x *QueryClusterMonitorDataReq) String() string

type QueryHostMonitorDataReq

type QueryHostMonitorDataReq struct {
	QueryTime QueryMonitorTime `protobuf:"varint,1,opt,name=QueryTime,proto3,enum=QueryMonitorTime" json:"QueryTime,omitempty"`
	// contains filtered or unexported fields
}

查询主机监控数据

func (*QueryHostMonitorDataReq) Descriptor deprecated

func (*QueryHostMonitorDataReq) Descriptor() ([]byte, []int)

Deprecated: Use QueryHostMonitorDataReq.ProtoReflect.Descriptor instead.

func (*QueryHostMonitorDataReq) GetQueryTime

func (x *QueryHostMonitorDataReq) GetQueryTime() QueryMonitorTime

func (*QueryHostMonitorDataReq) ProtoMessage

func (*QueryHostMonitorDataReq) ProtoMessage()

func (*QueryHostMonitorDataReq) ProtoReflect

func (x *QueryHostMonitorDataReq) ProtoReflect() protoreflect.Message

func (*QueryHostMonitorDataReq) Reset

func (x *QueryHostMonitorDataReq) Reset()

func (*QueryHostMonitorDataReq) String

func (x *QueryHostMonitorDataReq) String() string

type QueryHostMonitorDataResp

type QueryHostMonitorDataResp struct {
	CurrCpuPer    float64   `protobuf:"fixed64,1,opt,name=CurrCpuPer,proto3" json:"CurrCpuPer,omitempty"`
	CurrMemoryPer float64   `protobuf:"fixed64,2,opt,name=CurrMemoryPer,proto3" json:"CurrMemoryPer,omitempty"`
	Keys          []string  `protobuf:"bytes,3,rep,name=Keys,proto3" json:"Keys,omitempty"`
	Cpu           []float64 `protobuf:"fixed64,4,rep,packed,name=Cpu,proto3" json:"Cpu,omitempty"`
	Memory        []float64 `protobuf:"fixed64,5,rep,packed,name=Memory,proto3" json:"Memory,omitempty"`
	// contains filtered or unexported fields
}

查询主机监控数据

func (*QueryHostMonitorDataResp) Descriptor deprecated

func (*QueryHostMonitorDataResp) Descriptor() ([]byte, []int)

Deprecated: Use QueryHostMonitorDataResp.ProtoReflect.Descriptor instead.

func (*QueryHostMonitorDataResp) GetCpu

func (x *QueryHostMonitorDataResp) GetCpu() []float64

func (*QueryHostMonitorDataResp) GetCurrCpuPer

func (x *QueryHostMonitorDataResp) GetCurrCpuPer() float64

func (*QueryHostMonitorDataResp) GetCurrMemoryPer

func (x *QueryHostMonitorDataResp) GetCurrMemoryPer() float64

func (*QueryHostMonitorDataResp) GetKeys

func (x *QueryHostMonitorDataResp) GetKeys() []string

func (*QueryHostMonitorDataResp) GetMemory

func (x *QueryHostMonitorDataResp) GetMemory() []float64

func (*QueryHostMonitorDataResp) ProtoMessage

func (*QueryHostMonitorDataResp) ProtoMessage()

func (*QueryHostMonitorDataResp) ProtoReflect

func (x *QueryHostMonitorDataResp) ProtoReflect() protoreflect.Message

func (*QueryHostMonitorDataResp) Reset

func (x *QueryHostMonitorDataResp) Reset()

func (*QueryHostMonitorDataResp) String

func (x *QueryHostMonitorDataResp) String() string

type QueryMonitorTime

type QueryMonitorTime int32

查询监控时长

const (
	QueryMonitorTime_OneHour  QueryMonitorTime = 0 //一小时
	QueryMonitorTime_SixHour  QueryMonitorTime = 1 //六小时
	QueryMonitorTime_OneDay   QueryMonitorTime = 2 //一天
	QueryMonitorTime_SevenDay QueryMonitorTime = 3 //七天
)

func (QueryMonitorTime) Descriptor

func (QueryMonitorTime) Enum

func (QueryMonitorTime) EnumDescriptor deprecated

func (QueryMonitorTime) EnumDescriptor() ([]byte, []int)

Deprecated: Use QueryMonitorTime.Descriptor instead.

func (QueryMonitorTime) Number

func (QueryMonitorTime) String

func (x QueryMonitorTime) String() string

func (QueryMonitorTime) Type

type RegisterByCaptchaReq

type RegisterByCaptchaReq struct {
	PhonOrEmail string `protobuf:"bytes,1,opt,name=PhonOrEmail,proto3" json:"PhonOrEmail,omitempty"`
	Password    string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"`
	Captcha     string `protobuf:"bytes,3,opt,name=Captcha,proto3" json:"Captcha,omitempty"`
	Sign        string `protobuf:"bytes,4,opt,name=Sign,proto3" json:"Sign,omitempty"` //签名
	// contains filtered or unexported fields
}

注册请求 验证码

func (*RegisterByCaptchaReq) Descriptor deprecated

func (*RegisterByCaptchaReq) Descriptor() ([]byte, []int)

Deprecated: Use RegisterByCaptchaReq.ProtoReflect.Descriptor instead.

func (*RegisterByCaptchaReq) GetCaptcha

func (x *RegisterByCaptchaReq) GetCaptcha() string

func (*RegisterByCaptchaReq) GetPassword

func (x *RegisterByCaptchaReq) GetPassword() string

func (*RegisterByCaptchaReq) GetPhonOrEmail

func (x *RegisterByCaptchaReq) GetPhonOrEmail() string

func (*RegisterByCaptchaReq) GetSign

func (x *RegisterByCaptchaReq) GetSign() string

func (*RegisterByCaptchaReq) ProtoMessage

func (*RegisterByCaptchaReq) ProtoMessage()

func (*RegisterByCaptchaReq) ProtoReflect

func (x *RegisterByCaptchaReq) ProtoReflect() protoreflect.Message

func (*RegisterByCaptchaReq) Reset

func (x *RegisterByCaptchaReq) Reset()

func (*RegisterByCaptchaReq) String

func (x *RegisterByCaptchaReq) String() string

type SendEmailCaptchaReq

type SendEmailCaptchaReq struct {
	PhonOrEmail string      `protobuf:"bytes,1,opt,name=PhonOrEmail,proto3" json:"PhonOrEmail,omitempty"`                   //手机或者邮箱
	CaptchaType CaptchaType `protobuf:"varint,2,opt,name=CaptchaType,proto3,enum=CaptchaType" json:"CaptchaType,omitempty"` //验证码类型
	Sign        string      `protobuf:"bytes,3,opt,name=Sign,proto3" json:"Sign,omitempty"`                                 //签名
	// contains filtered or unexported fields
}

发送验证码请求

func (*SendEmailCaptchaReq) Descriptor deprecated

func (*SendEmailCaptchaReq) Descriptor() ([]byte, []int)

Deprecated: Use SendEmailCaptchaReq.ProtoReflect.Descriptor instead.

func (*SendEmailCaptchaReq) GetCaptchaType

func (x *SendEmailCaptchaReq) GetCaptchaType() CaptchaType

func (*SendEmailCaptchaReq) GetPhonOrEmail

func (x *SendEmailCaptchaReq) GetPhonOrEmail() string

func (*SendEmailCaptchaReq) GetSign

func (x *SendEmailCaptchaReq) GetSign() string

func (*SendEmailCaptchaReq) ProtoMessage

func (*SendEmailCaptchaReq) ProtoMessage()

func (*SendEmailCaptchaReq) ProtoReflect

func (x *SendEmailCaptchaReq) ProtoReflect() protoreflect.Message

func (*SendEmailCaptchaReq) Reset

func (x *SendEmailCaptchaReq) Reset()

func (*SendEmailCaptchaReq) String

func (x *SendEmailCaptchaReq) String() string

type UserRole

type UserRole int32

用户角色

const (
	UserRole_Guester   UserRole = 0 //游客
	UserRole_Operator  UserRole = 1 //运营
	UserRole_Developer UserRole = 2 //开发
	UserRole_Master    UserRole = 3 //超级管理员
)

func (UserRole) Descriptor

func (UserRole) Descriptor() protoreflect.EnumDescriptor

func (UserRole) Enum

func (x UserRole) Enum() *UserRole

func (UserRole) EnumDescriptor deprecated

func (UserRole) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserRole.Descriptor instead.

func (UserRole) Number

func (x UserRole) Number() protoreflect.EnumNumber

func (UserRole) String

func (x UserRole) String() string

func (UserRole) Type

Jump to

Keyboard shortcuts

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