Documentation ¶
Index ¶
- func AddTeam(name, resume string, creator int64, uids []int64) (int64, error)
- func AdminRegister() error
- func GetAllStrategyCount(mine int, query, username string) (int64, error)
- func IsCreatorOfTeam(uid, tid int64) (bool, error)
- func IsMemberOfTeam(uid, tid int64) (bool, error)
- func RemoveTeamById(tid int64) error
- func TeamCountOfUser(query string, uid int64) (int64, error)
- func UserLogin(name, password string) (int64, error)
- func UserRegister(name, password string) (int64, error)
- type Event
- type ItemStatus
- type RelSidIp
- type RelTeamUser
- type Strategy
- type Team
- type User
- func CheckPw(name string, passwd string) (*User, error)
- func GetUserById(id int64) (*User, error)
- func GetUserByName(name string) (*User, error)
- func GetUserPwById(id int64) (*User, error)
- func QueryUsers(query string, limit int) ([]*User, error)
- func UsersInfoOfTeam(tid int64) ([]*User, error)
- func UsersOfTeam(tid int64) ([]*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminRegister ¶
func AdminRegister() error
func GetAllStrategyCount ¶
func IsCreatorOfTeam ¶
func IsMemberOfTeam ¶
func RemoveTeamById ¶
func UserRegister ¶
Types ¶
type Event ¶
type Event struct { Id int64 `json:"id"` EventId string `json:"event_id"` Status string `json:"status"` Url string `json:"url"` Ip string `json:"ip"` EventTime int64 `json:"event_time"` StrategyId int64 `json:"strategy_id"` RespTime int `json:"resp_time"` RespCode string `json:"resp_code"` Result int64 `json:"result"` CurrentStep int `json:"current_step"` MaxStep int `json:"max_step"` }
var EventRepo *Event
func (*Event) GetByStrategyId ¶
type ItemStatus ¶
type ItemStatus struct { Id int64 `json:"id"` Sid int64 `json:"sid"` Ip string `json:"ip"` RespTime int `json:"resp_time"` RespCode string `json:"resp_code"` PushTime int64 `json:"push_time"` Result int64 `json:"result"` }
var ItemStatusRepo *ItemStatus
func (*ItemStatus) DeleteOld ¶
func (this *ItemStatus) DeleteOld(d int64) error
func (*ItemStatus) GetByIpAndSid ¶
func (this *ItemStatus) GetByIpAndSid(ip string, sid int64) ([]*ItemStatus, error)
func (*ItemStatus) PK ¶
func (this *ItemStatus) PK() string
func (*ItemStatus) Save ¶
func (this *ItemStatus) Save() error
type RelSidIp ¶
type RelSidIp struct { Id int64 `json:"id"` Sid int64 `json:"sid"` Ip string `json:"ip"` Ts int64 `json:"ts"` }
var RelSidIpRepo *RelSidIp
type RelTeamUser ¶
type Strategy ¶
type Strategy struct { Id int64 `json:"id"` Url string `json:"url"` Enable int `json:"enable"` IP string `json:"ip" xorm:"ip"` Keywords string `json:"keywords"` Timeout int `json:"timeout"` Creator string `json:"creator"` ExpectCode string `json:"expect_code"` Note string `json:"note"` Data string `json:"data"` Tag string `json:"tag"` MaxStep int `json:"max_step"` Times int `json:"times"` Teams string `json:"teams"` }
func GetAllStrategy ¶
func GetAllStrategyByCron ¶
func GetStrategyById ¶
type Team ¶
type Team struct { Id int64 `json:"id"` Name string `json:"name"` Resume string `json:"resume"` Creator int64 `json:"creator"` Created time.Time `json:"-" xorm:"<-"` CreatorName string `json:"-" xorm:"-"` }
func GetTeamById ¶
func GetTeamsByIds ¶
type User ¶
type User struct { Id int64 `json:"id"` Name string `json:"name"` Cnname string `json:"cnname"` Password string `json:"-"` Email string `json:"email"` Phone string `json:"phone"` Wechat string `json:"wechat"` Role int `json:"role"` Created time.Time `json:"-" xorm:"<-"` }
func GetUserById ¶
func GetUserPwById ¶
func UsersInfoOfTeam ¶
func UsersOfTeam ¶
func (*User) ChangePasswd ¶
func (*User) UpdateProfile ¶
Click to show internal directories.
Click to hide internal directories.