Documentation ¶
Index ¶
- Variables
- type Area
- func (area *Area) CountAreas() (count int, err error)
- func (area *Area) CountAreasByID(column, id string) (count int, err error)
- func (p *Area) Delete(areaId string) (err error)
- func (p *Area) GetAreaByAreaId(areaId string) (area map[string]string, err error)
- func (area *Area) GetAreasByIDAndLimit(column, id string, limit int, number int) (areas []map[string]string, err error)
- func (area *Area) GetAreasByLimit(limit int, number int) (areas []map[string]string, err error)
- func (p *Area) Insert(area map[string]interface{}) (id int64, err error)
- func (p *Area) Update(areaId string, area map[string]interface{}) (id int64, err error)
- type Client
- func (client *Client) CountClients() (count int, err error)
- func (client *Client) CountClientsByUserID(userID string) (count int, err error)
- func (p *Client) Delete(clientId string) (err error)
- func (this *Client) GetAllClients() (clients []map[string]string, err error)
- func (p *Client) GetClientByClientId(clientId string) (client map[string]string, err error)
- func (client *Client) GetClientsByLimit(limit int, number int) (clients []map[string]string, err error)
- func (client *Client) GetClientsByUserIDAndLimit(userID string, limit int, number int) (clients []map[string]string, err error)
- func (p *Client) HasTunnelRef(clientId string) (has bool, err error)
- func (p *Client) Insert(client map[string]interface{}) (id int64, err error)
- func (p *Client) Offline(serverId string) (err error)
- func (p *Client) Reset(clientId string) (err error)
- func (p *Client) Update(clientId string, client map[string]interface{}) (id int64, err error)
- type Cluster
- func (p *Cluster) Delete(clusterId string) (err error)
- func (p *Cluster) Forbidden(clusterId string) (err error)
- func (this *Cluster) GetAllClusters() (clusters []map[string]string, err error)
- func (p *Cluster) GetClusterByClusterId(clusterId string) (cluster map[string]string, err error)
- func (p *Cluster) HasTunnel(clusterId string) (has bool, err error)
- func (p *Cluster) Insert(cluster map[string]interface{}) (id int64, err error)
- func (p *Cluster) Review(clusterId string) (err error)
- func (p *Cluster) Update(clusterId string, cluster map[string]interface{}) (id int64, err error)
- type Conn
- func (conn *Conn) CountConns() (count int, err error)
- func (conn *Conn) CountConnsByUserID(col, keyword string) (count int, err error)
- func (p *Conn) Delete(connId string) (err error)
- func (p *Conn) GetConnByConnId(connId string) (conn map[string]string, err error)
- func (conn *Conn) GetConnsByLimit(limit int, number int, orderby string) (conns []map[string]string, err error)
- func (conn *Conn) GetConnsByUserIDAndLimit(col, keyword, orderby string, limit int, number int) (conns []map[string]string, err error)
- func (p *Conn) HasTunnelRef(connId string) (has bool, err error)
- func (p *Conn) Insert(conn map[string]interface{}) (id int64, err error)
- func (p *Conn) Offline(connId string) (err error)
- func (p *Conn) Reset(connId string) (err error)
- func (p *Conn) Update(connId string, conn map[string]interface{}) (id int64, err error)
- type IpList
- func (ip_list *IpList) CountIpLists() (count int, err error)
- func (ip_list *IpList) CountIpListsByID(column, id string) (count int, err error)
- func (p *IpList) Delete(ip_listId string) (err error)
- func (p *IpList) GetIpListByIpListId(ip_listId string) (ip_list map[string]string, err error)
- func (ip_list *IpList) GetIpListsByIDAndLimit(column, id string, limit int, number int) (ip_lists []map[string]string, err error)
- func (ip_list *IpList) GetIpListsByLimit(limit int, number int) (ip_lists []map[string]string, err error)
- func (p *IpList) Insert(ip_list map[string]interface{}) (id int64, err error)
- func (p *IpList) Update(ip_listId string, ip_list map[string]interface{}) (id int64, err error)
- type Online
- func (online *Online) CountOnlines(cs string) (count int, err error)
- func (online *Online) CountOnlinesByID(cs, column, id string) (count int, err error)
- func (p *Online) Delete(onlineId string) (err error)
- func (p *Online) GetOnlineByOnlineId(onlineId string) (online map[string]string, err error)
- func (online *Online) GetOnlinesByIDAndLimit(cs, column, id string, limit int, number int) (onlines []map[string]string, err error)
- func (online *Online) GetOnlinesByLimit(cs string, limit int, number int) (onlines []map[string]string, err error)
- func (p *Online) Insert(online map[string]interface{}) (id int64, err error)
- func (p *Online) Update(onlineId string, online map[string]interface{}) (id int64, err error)
- type PackageModel
- func (p *PackageModel) CountPackages() (count int, err error)
- func (p *PackageModel) CountPackagesByID(column, id string) (count int, err error)
- func (p *PackageModel) Delete(packageId string) (err error)
- func (p *PackageModel) GetPackageByPackageId(packageId string) (PackageModel map[string]string, err error)
- func (p *PackageModel) GetPackagesByIDAndLimit(column, id string, limit int, number int) (packages []map[string]string, err error)
- func (p *PackageModel) GetPackagesByLimit(limit int, number int) (packages []map[string]string, err error)
- func (p *PackageModel) Insert(_package map[string]interface{}) (id int64, err error)
- func (p *PackageModel) Update(packageId string, _package map[string]interface{}) (id int64, err error)
- type Region
- func (p *Region) Delete(regionId string) (err error)
- func (this *Region) GetAllRegions() (regions []map[string]string, err error)
- func (p *Region) GetRegionByRegionId(regionId string) (region map[string]string, err error)
- func (this *Region) GetSubRegions() (regions []map[string]string, err error)
- func (this *Region) GetTopRegions() (regions map[string]map[string]string, err error)
- func (p *Region) HasCluster(regionId string) (has bool, err error)
- func (p *Region) HasRole(regionId string) (has bool, err error)
- func (p *Region) HasSubRegion(regionId string) (has bool, err error)
- func (p *Region) Insert(region map[string]interface{}) (id int64, err error)
- func (p *Region) Update(regionId string, region map[string]interface{}) (id int64, err error)
- type Role
- func (p *Role) Delete(roleId string) (err error)
- func (this *Role) GetAllRoles() (roles []map[string]string, err error)
- func (p *Role) GetRoleByRoleId(roleId string) (role map[string]string, err error)
- func (this *Role) GetRoleRegionIds(roleId string) (ids []string, err error)
- func (this *Role) GetRolesByUserId(userId string) (roles []map[string]string, err error)
- func (p *Role) HasUser(roleId string) (has bool, err error)
- func (p *Role) Insert(role map[string]interface{}) (id int64, err error)
- func (this *Role) SetRegions(roleId string, region_ids []string) (err error)
- func (p *Role) Update(roleId string, role map[string]interface{}) (id int64, err error)
- type Server
- func (server *Server) CountServers() (count int, err error)
- func (server *Server) CountServersByUserID(userID string) (count int, err error)
- func (p *Server) Delete(serverId string) (err error)
- func (p *Server) GetServerByServerId(serverId string) (server map[string]string, err error)
- func (server *Server) GetServersByLimit(limit int, number int) (servers []map[string]string, err error)
- func (server *Server) GetServersByUserIDAndLimit(userID string, limit int, number int) (servers []map[string]string, err error)
- func (p *Server) HasTunnelRef(serverId string) (has bool, err error)
- func (p *Server) Insert(server map[string]interface{}) (id int64, err error)
- func (p *Server) Offline(serverId string) (err error)
- func (p *Server) Reset(serverId string) (err error)
- func (p *Server) Update(serverId string, server map[string]interface{}) (id int64, err error)
- type Tunnel
- func (tunnel *Tunnel) CountTunnels() (count int, err error)
- func (tunnel *Tunnel) CountTunnelsByID(column, id string) (count int, err error)
- func (p *Tunnel) Delete(tunnelId string) (err error)
- func (p *Tunnel) GetTunnelByTunnelId(tunnelId string) (tunnel map[string]string, err error)
- func (tunnel *Tunnel) GetTunnelsByIDAndLimit(column, id string, limit int, number int) (tunnels []map[string]string, err error)
- func (tunnel *Tunnel) GetTunnelsByLimit(limit int, number int) (tunnels []map[string]string, err error)
- func (p *Tunnel) Insert(tunnel map[string]interface{}) (id int64, err error)
- func (p *Tunnel) Update(tunnelId string, tunnel map[string]interface{}) (id int64, err error)
- type User
- func (p *User) ChangePassword(userId, newpassword, oldpassword string) (err error)
- func (user *User) CountUsers() (count int, err error)
- func (user *User) CountUsersByKeyword(keyword string) (count int, err error)
- func (p *User) EncodePassword(password string) (passwordHash string)
- func (p *User) Forbidden(userId string) (err error)
- func (p *User) GetUserByName(username string) (user map[string]string, err error)
- func (p *User) GetUserByUserId(userId string) (user map[string]string, err error)
- func (user *User) GetUsersByKeywordAndLimit(keyword string, limit int, number int) (users []map[string]string, err error)
- func (user *User) GetUsersByLimit(limit int, number int) (users []map[string]string, err error)
- func (p *User) HasSameUsername(userId, username string) (has bool, err error)
- func (p *User) HasUsername(username string) (has bool, err error)
- func (p *User) Insert(user map[string]interface{}) (id int64, err error)
- func (p *User) Review(userId string) (err error)
- func (p *User) Update(userId string, user map[string]interface{}) (id int64, err error)
- type UserRole
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *mysql.DB
View Source
var G *mysql.DBGroup
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area struct { }
func (*Area) CountAreas ¶
func (*Area) CountAreasByID ¶
func (*Area) GetAreaByAreaId ¶
func (*Area) GetAreasByIDAndLimit ¶
func (area *Area) GetAreasByIDAndLimit(column, id string, limit int, number int) (areas []map[string]string, err error)
根据搜索分页获取Area
func (*Area) GetAreasByLimit ¶
分页获取Area
type Client ¶
type Client struct { }
func (*Client) CountClients ¶
func (*Client) CountClientsByUserID ¶
func (*Client) GetAllClients ¶
获取所有的Client
func (*Client) GetClientByClientId ¶
func (*Client) GetClientsByLimit ¶
func (client *Client) GetClientsByLimit(limit int, number int) (clients []map[string]string, err error)
分页获取Client
func (*Client) GetClientsByUserIDAndLimit ¶
func (client *Client) GetClientsByUserIDAndLimit(userID string, limit int, number int) (clients []map[string]string, err error)
根据user_id分页获取Client
type Cluster ¶
type Cluster struct { }
func (*Cluster) GetAllClusters ¶
获取所有的
func (*Cluster) GetClusterByClusterId ¶
type Conn ¶
type Conn struct { }
func (*Conn) CountConns ¶
func (*Conn) CountConnsByUserID ¶
func (*Conn) GetConnByConnId ¶
func (*Conn) GetConnsByLimit ¶
func (conn *Conn) GetConnsByLimit(limit int, number int, orderby string) (conns []map[string]string, err error)
分页获取Conn
type IpList ¶
type IpList struct { }
func (*IpList) CountIpLists ¶
func (*IpList) CountIpListsByID ¶
func (*IpList) GetIpListByIpListId ¶
func (*IpList) GetIpListsByIDAndLimit ¶
func (ip_list *IpList) GetIpListsByIDAndLimit(column, id string, limit int, number int) (ip_lists []map[string]string, err error)
根据搜索分页获取IpList
func (*IpList) GetIpListsByLimit ¶
func (ip_list *IpList) GetIpListsByLimit(limit int, number int) (ip_lists []map[string]string, err error)
分页获取IpList
type Online ¶
type Online struct { }
func (*Online) CountOnlinesByID ¶
func (*Online) GetOnlineByOnlineId ¶
func (*Online) GetOnlinesByIDAndLimit ¶
func (online *Online) GetOnlinesByIDAndLimit(cs, column, id string, limit int, number int) (onlines []map[string]string, err error)
根据搜索分页获取Online
func (*Online) GetOnlinesByLimit ¶
func (online *Online) GetOnlinesByLimit(cs string, limit int, number int) (onlines []map[string]string, err error)
分页获取Online
type PackageModel ¶
type PackageModel struct { }
func (*PackageModel) CountPackages ¶
func (p *PackageModel) CountPackages() (count int, err error)
func (*PackageModel) CountPackagesByID ¶
func (p *PackageModel) CountPackagesByID(column, id string) (count int, err error)
func (*PackageModel) Delete ¶
func (p *PackageModel) Delete(packageId string) (err error)
func (*PackageModel) GetPackageByPackageId ¶
func (p *PackageModel) GetPackageByPackageId(packageId string) (PackageModel map[string]string, err error)
func (*PackageModel) GetPackagesByIDAndLimit ¶
func (p *PackageModel) GetPackagesByIDAndLimit(column, id string, limit int, number int) (packages []map[string]string, err error)
根据搜索分页获取Package
func (*PackageModel) GetPackagesByLimit ¶
func (p *PackageModel) GetPackagesByLimit(limit int, number int) (packages []map[string]string, err error)
分页获取Package
type Region ¶
type Region struct { }
func (*Region) GetAllRegions ¶
获取所有的Region
func (*Region) GetRegionByRegionId ¶
func (*Region) GetSubRegions ¶
获取所有二级Region
func (*Region) GetTopRegions ¶
获取所有顶级Region
type Role ¶
type Role struct { }
func (*Role) GetAllRoles ¶
获取所有的角色
func (*Role) GetRoleByRoleId ¶
func (*Role) GetRoleRegionIds ¶
func (*Role) GetRolesByUserId ¶
根据用户名查找所有的角色
func (*Role) SetRegions ¶
type Server ¶
type Server struct { }
func (*Server) CountServers ¶
func (*Server) CountServersByUserID ¶
func (*Server) GetServerByServerId ¶
func (*Server) GetServersByLimit ¶
func (server *Server) GetServersByLimit(limit int, number int) (servers []map[string]string, err error)
分页获取Server
func (*Server) GetServersByUserIDAndLimit ¶
func (server *Server) GetServersByUserIDAndLimit(userID string, limit int, number int) (servers []map[string]string, err error)
根据user_id分页获取Server
type Tunnel ¶
type Tunnel struct { }
func (*Tunnel) CountTunnels ¶
func (*Tunnel) CountTunnelsByID ¶
func (*Tunnel) GetTunnelByTunnelId ¶
func (*Tunnel) GetTunnelsByIDAndLimit ¶
func (tunnel *Tunnel) GetTunnelsByIDAndLimit(column, id string, limit int, number int) (tunnels []map[string]string, err error)
根据搜索分页获取Tunnel
func (*Tunnel) GetTunnelsByLimit ¶
func (tunnel *Tunnel) GetTunnelsByLimit(limit int, number int) (tunnels []map[string]string, err error)
分页获取Tunnel
type User ¶
type User struct { }
func (*User) ChangePassword ¶
func (*User) CountUsers ¶
func (*User) CountUsersByKeyword ¶
func (*User) EncodePassword ¶
func (*User) GetUserByName ¶
func (*User) GetUserByUserId ¶
func (*User) GetUsersByKeywordAndLimit ¶
func (user *User) GetUsersByKeywordAndLimit(keyword string, limit int, number int) (users []map[string]string, err error)
根据关键字分页获取用户
func (*User) GetUsersByLimit ¶
分页获取用户
func (*User) HasSameUsername ¶
Click to show internal directories.
Click to hide internal directories.