controller

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUDIT_POST = "post"
	AUDIT_DEL  = "del"
	AUDIT_PUT  = "update"
	AUDIT_IN   = "login"
	AUDIT_OUT  = "logout"
)
View Source
const (
	AUDIT_OBJ_USRGROUP = "usergroup"
	AUDIT_OBJ_USR      = "user"
	AUDIT_OBJ_PROXY    = "proxy"
	AUDIT_OBJ_ACCESS   = "access"
	AUDIT_OBJ_RULE     = "rule"
	AUDIT_OBJ_LOG      = "log"
	AUDIT_OBJ_ALARM    = "alarm"
	AUDIT_OBJ_SYS      = "sys"
)

Variables

This section is empty.

Functions

func AccessControllerDel

func AccessControllerDel(ctx *context.Context)

func AccessControllerGet

func AccessControllerGet(ctx *context.Context)

func AccessControllerPost

func AccessControllerPost(ctx *context.Context)

func AlarmControllerDel

func AlarmControllerDel(ctx *context.Context)

func AlarmControllerGet

func AlarmControllerGet(ctx *context.Context)

func AlarmControllerUpdate

func AlarmControllerUpdate(ctx *context.Context)

func AuditControllerGet

func AuditControllerGet(ctx *context.Context)

func AuditMake

func AuditMake(ctx *context.Context, opt string, obj string, result ...string)

func ChangePwdControllerPut

func ChangePwdControllerPut(ctx *context.Context)

func ConsoleControllerGet

func ConsoleControllerGet(ctx *context.Context)

func LoginControllerGet

func LoginControllerGet(ctx *context.Context)

func LoginControllerGetUsername

func LoginControllerGetUsername(ctx *context.Context)

func LoginControllerPost

func LoginControllerPost(ctx *context.Context)

func LoginSessionGet

func LoginSessionGet(ctx *context.Context) string

func LoginSessionInit

func LoginSessionInit(ctx *context.Context, user string)

func LogoutControllerGet

func LogoutControllerGet(ctx *context.Context)

func ProxyControllerBind

func ProxyControllerBind(ctx *context.Context)

func ProxyControllerDel

func ProxyControllerDel(ctx *context.Context)

func ProxyControllerGet

func ProxyControllerGet(ctx *context.Context)

func ProxyControllerPost

func ProxyControllerPost(ctx *context.Context)

func ProxyControllerUpdate

func ProxyControllerUpdate(ctx *context.Context)

func RuleControllerDel

func RuleControllerDel(ctx *context.Context)

func RuleControllerGet

func RuleControllerGet(ctx *context.Context)

func RuleControllerPost

func RuleControllerPost(ctx *context.Context)

func RuleControllerUpdate

func RuleControllerUpdate(ctx *context.Context)

func SysControllerInterfaceGet

func SysControllerInterfaceGet(ctx *context.Context)

func UserControllerDel

func UserControllerDel(ctx *context.Context)

func UserControllerGet

func UserControllerGet(ctx *context.Context)

func UserControllerPost

func UserControllerPost(ctx *context.Context)

func UserControllerUpdate

func UserControllerUpdate(ctx *context.Context)

func UsergroupControllerDel

func UsergroupControllerDel(ctx *context.Context)

func UsergroupControllerGet

func UsergroupControllerGet(ctx *context.Context)

func UsergroupControllerPost

func UsergroupControllerPost(ctx *context.Context)

func UsergroupControllerUpdate

func UsergroupControllerUpdate(ctx *context.Context)

Types

type AccessAddRequest

type AccessAddRequest struct {
	Name string `json:"name"`
	Type string `json:"type"`
	List string `json:"list"`
}

type AccessDelRequest

type AccessDelRequest struct {
	Code    int      `json:"code"`
	Count   int      `json:"count"`
	Message string   `json:"msg"`
	Data    []string `json:"data"`
}

type AccessGetRsponse

type AccessGetRsponse struct {
	Code    int          `json:"code"`
	Count   int          `json:"count"`
	Message string       `json:"msg"`
	Data    []AccessNode `json:"data"`
}

type AccessNode

type AccessNode struct {
	ID     string `json:"id"`
	Date   string `json:"date"`
	Name   string `json:"name"`
	Type   string `json:"type"`
	List   string `json:"list"`
	Status string `json:"status"`
}

type AlarmDelRequest

type AlarmDelRequest struct {
	Code     int      `json:"code"`
	Count    int      `json:"count"`
	AlarmIdx []string `json:"alarmidx"`
}

type AlarmRsponse

type AlarmRsponse struct {
	Code    int             `json:"code"`
	Count   int             `json:"count"`
	Message string          `json:"msg"`
	Data    []manager.Alarm `json:"data"`
}

type AlarmUpdateRequest

type AlarmUpdateRequest struct {
	Code     int      `json:"code"`
	Count    int      `json:"count"`
	Tag      string   `json:"tag"`
	AlarmIdx []string `json:"alarmidx"`
}

type AuditRsponse

type AuditRsponse struct {
	Code    int             `json:"code"`
	Count   int             `json:"count"`
	Message string          `json:"msg"`
	Data    []manager.Audit `json:"data"`
}

type ChangePasswdRequest

type ChangePasswdRequest struct {
	User   string `json:"user"`
	OldPwd string `json:"oldpassword"`
	NewPwd string `json:"newpassword"`
}

type ConsoleData

type ConsoleData struct {
	TodayCnt int `json:"today_cnt"`
	TotalCnt int `json:"total_cnt"`

	TodayData string `json:"today_data"`
	TotalData string `json:"total_data"`

	ServerUsedRate string `json:"server_used_rate"`
	ServerTotal    string `json:"server_total"`

	UserToday int    `json:"user_today"`
	UserTotal string `json:"user_total"`

	CtrlNodeCPU  int `json:"ctrl_node_cpu"`
	CtrlNodeMEM  int `json:"ctrl_node_mem"`
	CtrlNodeDisk int `json:"ctrl_node_disk"`

	DataNodeCPU  int `json:"data_node_cpu"`
	DataNodeMEM  int `json:"data_node_mem"`
	DataNodeDisk int `json:"data_node_disk"`

	Version string `json:"version"`
}

type ConsoleRsponse

type ConsoleRsponse struct {
	Code    int           `json:"code"`
	Count   int           `json:"count"`
	Message string        `json:"msg"`
	Data    []ConsoleData `json:"data"`
}

type InfNode

type InfNode struct {
	Name string `json:"name"`
	Inf  string `json:"interface"`
}

type InfRsponse

type InfRsponse struct {
	Code    int       `json:"code"`
	Count   int       `json:"count"`
	Message string    `json:"msg"`
	Data    []InfNode `json:"data"`
}

type PostRsponse

type PostRsponse struct {
	Code    int    `json:"code"`
	Message string `json:"msg"`
}

type ProxyAddRequest

type ProxyAddRequest struct {
	Name     string `json:"name"`
	Protocal string `json:"protocal"`
	IP       string `json:"address"`
	Port     string `json:"port"`
	Instance string `json:"instance"`
	Auth     string `json:"auth"`
}

type ProxyBindRequest

type ProxyBindRequest struct {
	ID    string   `json:"id"`
	Type  string   `json:"type"`
	Count int      `json:"count"`
	Data  []string `json:"data"`
}

type ProxyDelRequest

type ProxyDelRequest struct {
	ID string `json:"id"`
}

type ProxyGetRequest

type ProxyGetRequest struct {
	ID []string `json:"id"`
}

type ProxyGetRsponse

type ProxyGetRsponse struct {
	Code    int         `json:"code"`
	Count   int         `json:"count"`
	Message string      `json:"msg"`
	Data    []ProxyNode `json:"data"`
}

type ProxyNode

type ProxyNode struct {
	ID       string `json:"id"`
	Date     string `json:"date"`
	Name     string `json:"name"`
	Protocal string `json:"protocal"`
	IP       string `json:"ipaddr"`
	Port     int    `json:"port"`
	Instance string `json:"instance"`
	Stat     string `json:"stat"`
	Alive    string `json:"alive"`
	Status   string `json:"status"`
	Auth     string `json:"auth"`

	Usergroup []string `json:"usergroup"`
	Access    []string `json:"access"`
	Rule      []string `json:"rule"`
}

type ProxyUpdateRequest

type ProxyUpdateRequest struct {
	ID       string `json:"id"`
	Protocal string `json:"protocal"`
	IP       string `json:"address"`
	Port     string `json:"port"`
	Instance string `json:"instance"`
	Auth     string `json:"auth"`
}

type RuleAddRequest

type RuleAddRequest struct {
	Prior    string `json:"prior"`
	Name     string `json:"name"`
	Address  string `json:"address"`
	Protocal string `json:"protocal"`
	User     string `json:"user"`
	Token    string `json:"token"`
}

type RuleDelRequest

type RuleDelRequest struct {
	Name string `json:"name"`
}

type RuleGetRsponse

type RuleGetRsponse struct {
	Code    int        `json:"code"`
	Count   int        `json:"count"`
	Message string     `json:"msg"`
	Data    []RuleNode `json:"data"`
}

type RuleNode

type RuleNode struct {
	ID       string `json:"id"`
	Prior    string `json:"prior"`
	Date     string `json:"date"`
	Name     string `json:"name"`
	Protocal string `json:"protocal"`
	Address  string `json:"address"`
	Auth     string `json:"auth"`
	Stat     string `json:"stat"`
	Alive    string `json:"alive"`
	Status   string `json:"status"`
}

type RuleUpdateRequest

type RuleUpdateRequest struct {
	Prior    string `json:"prior"`
	Name     string `json:"name"`
	Address  string `json:"address"`
	Protocal string `json:"protocal"`
	User     string `json:"user"`
	Token    string `json:"token"`
}

type UserDelRequest

type UserDelRequest struct {
	Code     int      `json:"code"`
	Count    int      `json:"count"`
	UserList []string `json:"userlist"`
}

type UserNode

type UserNode struct {
	ID     string `json:"id"`
	Date   string `json:"date"`
	Name   string `json:"username"`
	Stat   string `json:"stats"`
	Auth   string `json:"auth"`
	Status string `json:"status"`
}

type UserPostRequest

type UserPostRequest struct {
	Name     string `json:"name"`
	Password string `json:"password"`
}

type UserRsponse

type UserRsponse struct {
	Code    int        `json:"code"`
	Count   int        `json:"count"`
	Message string     `json:"msg"`
	Data    []UserNode `json:"data"`
}

type UserUpdateRequest

type UserUpdateRequest struct {
	Code     int      `json:"code"`
	Count    int      `json:"count"`
	Usergoup string   `json:"usergroup"`
	UserList []string `json:"userlist"`
}

type UsergroupNode

type UsergroupNode struct {
	ID     string `json:"id"`
	Date   string `json:"date"`
	Name   string `json:"usergroup"`
	Stat   string `json:"stats"`
	Number int    `json:"number"`
	Status string `json:"status"`
	Users  string `json:"userlist"`
}

type UsergroupRequest

type UsergroupRequest struct {
	Code  int      `json:"code"`
	Count int      `json:"count"`
	Name  string   `json:"usergroup"`
	User  []string `json:"user"`
}

type UsergroupRsponse

type UsergroupRsponse struct {
	Code    int             `json:"code"`
	Count   int             `json:"count"`
	Message string          `json:"msg"`
	Data    []UsergroupNode `json:"data"`
}

Jump to

Keyboard shortcuts

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