Documentation ¶
Index ¶
- Variables
- func Init()
- func QueryAgentList(queryDto QueryAgentDto, pageInfo *PageInfo) ([]Agent, *PageInfo)
- func QueryEndpointList(queryDto QueryEndpointDto, pageInfo *PageInfo) ([]Endpoint, *PageInfo)
- func QueryHostGroupList(queryDto QueryHostGroupDto, pageInfo *PageInfo) ([]HostGroup, *PageInfo)
- func QueryRelEndpointGroupList(queryDto QueryRelEndpointGroupDto, pageInfo *PageInfo) ([]RelEndpointGroup, *PageInfo)
- func QueryUserList(queryDto QueryUserDto, pageInfo *PageInfo) ([]User, *PageInfo)
- type Agent
- type Endpoint
- type EndpointAgent
- type HostGroup
- type PageInfo
- type QueryAgentDto
- type QueryEndpointDto
- type QueryHostGroupDto
- type QueryRelEndpointGroupDto
- type QueryUserDto
- type RelAgentGroup
- type RelAgentGroupDto
- type RelEndpointGroup
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PAGES_PER_TIME = 5 PAGE_SIZE_DEFAULT = 10 )
Functions ¶
func QueryAgentList ¶
func QueryAgentList(queryDto QueryAgentDto, pageInfo *PageInfo) ([]Agent, *PageInfo)
func QueryEndpointList ¶
func QueryEndpointList(queryDto QueryEndpointDto, pageInfo *PageInfo) ([]Endpoint, *PageInfo)
func QueryHostGroupList ¶
func QueryHostGroupList(queryDto QueryHostGroupDto, pageInfo *PageInfo) ([]HostGroup, *PageInfo)
func QueryRelEndpointGroupList ¶
func QueryRelEndpointGroupList(queryDto QueryRelEndpointGroupDto, pageInfo *PageInfo) ([]RelEndpointGroup, *PageInfo)
func QueryUserList ¶
func QueryUserList(queryDto QueryUserDto, pageInfo *PageInfo) ([]User, *PageInfo)
Types ¶
type Agent ¶
type Agent struct { Id int64 GmtCreate time.Time `orm:"auto_now_add;type(datetime)"` GmtModified time.Time `orm:"auto_now_add;type(datetime)"` Name string Version string Tarball string `orm:"null"` Md5 string `orm:"null"` Cmd string `orm:"null"` RunUser string `orm:"null"` WorkDir string `orm:"null"` ConfigFileName string `orm:"null"` ConfigRemoteUrl string `orm:"null"` }
func (*Agent) CheckExists ¶
func (*Agent) DeleteByCond ¶
func (*Agent) DeleteByPK ¶
func (*Agent) TableUnique ¶
type Endpoint ¶
type Endpoint struct { Id int64 GmtCreate time.Time `orm:"type(datetime)"` GmtModified time.Time `orm:"type(datetime)"` Hostname string `form:"hostname"` Ip string `form:"ip"` UpdaterVersion string `form:"updaterVersion" orm:"null"` RunUser string `form:"runUser" orm:"null"` }
func (*Endpoint) DeleteByCond ¶
func (*Endpoint) DeleteByPK ¶
func (*Endpoint) TableUnique ¶
type EndpointAgent ¶
type EndpointAgent struct { Id int64 GmtCreate time.Time `orm:"auto_now_add;type(datetime)"` GmtModified time.Time `orm:"auto_now_add;type(datetime)"` Hostname string `json:"hostname"` AgentName string `json:"agentName"` AgentVersion string `json:"agentVersion" orm:"null"` RunUser string `json:"runUser" orm:"null"` WorkDir string `json:"workDir" orm:"null"` Status string `json:"status" orm:"null"` GmtReport time.Time `orm:"auto_now_add;type(datetime)"` }
func QueryEndpointAgentList ¶
func QueryEndpointAgentList(hostname string) []EndpointAgent
func (*EndpointAgent) Insert ¶
func (this *EndpointAgent) Insert() (int64, error)
func (*EndpointAgent) TableUnique ¶
func (this *EndpointAgent) TableUnique() [][]string
type HostGroup ¶
type HostGroup struct { Id int64 GmtCreate time.Time `orm:"auto_now_add;type(datetime)"` GmtModified time.Time `orm:"auto_now_add;type(datetime)"` GroupName string `form:"groupName"` }
func (*HostGroup) CheckExists ¶
func (*HostGroup) DeleteByCond ¶
func (*HostGroup) DeleteByPK ¶
func (*HostGroup) TableUnique ¶
type PageInfo ¶
type PageInfo struct { PageSize int `form:"pageSize"` PageIndex int `form:"pageIndex"` RowCount int64 Sort string `form:"sort"` Order string `form:"order"` }
func NewPageInfo ¶
func (*PageInfo) GetStartIndex ¶
func (*PageInfo) SetPageSize ¶
func (*PageInfo) SetRowCount ¶
type QueryAgentDto ¶
type QueryEndpointDto ¶
type QueryHostGroupDto ¶
type QueryHostGroupDto struct {
GroupName string `form:"groupName"`
}
type QueryUserDto ¶
type RelAgentGroup ¶
type RelAgentGroup struct { Id int64 GmtCreate time.Time `orm:"auto_now_add;type(datetime)"` GmtModified time.Time `orm:"auto_now_add;type(datetime)"` AgentId int64 `form:"agentId"` HostGroupId int64 `form:"hostGroupId"` }
func (*RelAgentGroup) DeleteByCond ¶
func (this *RelAgentGroup) DeleteByCond() (int64, error)
func (*RelAgentGroup) DeleteByPK ¶
func (this *RelAgentGroup) DeleteByPK() (int64, error)
func (*RelAgentGroup) Insert ¶
func (this *RelAgentGroup) Insert() (int64, error)
func (*RelAgentGroup) TableUnique ¶
func (this *RelAgentGroup) TableUnique() [][]string
type RelAgentGroupDto ¶
type RelAgentGroupDto struct { Id int64 GmtCreate time.Time GmtModified time.Time AgentId int64 HostGroupId int64 GroupName string }
func QueryRelAgentGroupList ¶
func QueryRelAgentGroupList(agentId int64) ([]RelAgentGroupDto, error)
type RelEndpointGroup ¶
type RelEndpointGroup struct { Id int64 GmtCreate time.Time `orm:"auto_now_add;type(datetime)"` GmtModified time.Time `orm:"auto_now_add;type(datetime)"` HostGroupId int64 `form:"hostGroupId"` RelType string `form:"relType"` PropName string `form:"propName"` PropValue string `form:"propValue"` }
* RelType - fixed 固定值, regex 正则
func (*RelEndpointGroup) DeleteByCond ¶
func (this *RelEndpointGroup) DeleteByCond() (int64, error)
func (*RelEndpointGroup) DeleteByPK ¶
func (this *RelEndpointGroup) DeleteByPK() (int64, error)
func (*RelEndpointGroup) Get ¶
func (this *RelEndpointGroup) Get() (*RelEndpointGroup, error)
func (*RelEndpointGroup) Insert ¶
func (this *RelEndpointGroup) Insert() (int64, error)
type User ¶
type User struct { Id int64 UserName string `form:"userName"` LoginPwd string `form:"loginPwd"` RealName string `form:"realName"` PhoneNo string `form:"phoneNo"` Email string `form:"email"` RoleName string `form:"roleName" orm:"default(NORMAL)"` AccountStatus int8 `orm:"default(1)"` }
func CheckLogin ¶
func GetUserById ¶
func (*User) ChangeLoginPasswd ¶
func (*User) CheckExists ¶
func (*User) TableUnique ¶
Click to show internal directories.
Click to hide internal directories.