uic

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountNumOfTeam

func CountNumOfTeam() (c int64, err error)

func DeleteSessionById

func DeleteSessionById(id int64) (int64, error)

func DeleteTeamById

func DeleteTeamById(id int64) (int64, error)

func DeleteUserById

func DeleteUserById(id int64) (int64, error)

func InsertRegisterUser

func InsertRegisterUser(name, password, email string) (int64, error)

func PutUsersInTeam

func PutUsersInTeam(tid int64, uids string) error

func QueryAllTeams

func QueryAllTeams(query string) orm.QuerySeter

func QueryMineTeams

func QueryMineTeams(query string, uid int64) (orm.QuerySeter, error)

func QueryUsers

func QueryUsers(query string) orm.QuerySeter

func ReadSessionByName

func ReadSessionByName(name string) (sig string, expired int)

func ReadSessionByUid

func ReadSessionByUid(uid int64) (sig string, expired int)

func ReadTeamIdByName

func ReadTeamIdByName(name string) int64

func ReadUserIdByName

func ReadUserIdByName(name string) int64

func RemoveSessionByUid

func RemoveSessionByUid(uid int64) (num int64, err error)

func SaveSessionAttrs

func SaveSessionAttrs(uid int64, sig string, expired int) (int64, error)

func SaveTeamAttrs

func SaveTeamAttrs(name, resume string, creator int64) (int64, error)

func SelectTeamIdByName

func SelectTeamIdByName(name string) int64

func SelectUserIdByName

func SelectUserIdByName(name string) int64

func Sessions

func Sessions() orm.QuerySeter

func Tids

func Tids(uid int64) ([]int64, error)

func Uids

func Uids(tid int64) ([]int64, error)

func UnlinkByTeamId

func UnlinkByTeamId(id int64) error

func UnlinkByUserId

func UnlinkByUserId(id int64) error

func UserIds

func UserIds(tid int64) []int64

func Users

func Users() orm.QuerySeter

Types

type RelTeamUser

type RelTeamUser struct {
	Id  int64
	Tid int64
	Uid int64
}

type Session

type Session struct {
	Id      int64
	Uid     int64
	Sig     string
	Expired int
}

func ReadSessionById

func ReadSessionById(id int64) (s *Session, err error)

func ReadSessionBySig

func ReadSessionBySig(sig string) *Session

func SelectSessionBySig

func SelectSessionBySig(sig string) *Session

func (*Session) Save

func (this *Session) Save() (int64, error)

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:"-" orm:"-"`
}

func ReadTeamById

func ReadTeamById(id int64) *Team

func ReadTeamByName

func ReadTeamByName(name string) *Team

func SelectTeamById

func SelectTeamById(id int64) *Team

func (*Team) Remove

func (this *Team) Remove() error

func (*Team) Save

func (this *Team) Save() (int64, error)

func (*Team) Update

func (this *Team) Update() (int64, error)

func (*Team) UpdateUsers

func (this *Team) UpdateUsers(userIdstr string) error

func (*Team) UserIds

func (this *Team) UserIds() string

type User

type User struct {
	Id      int64     `json:"id"`
	Name    string    `json:"name"`
	Cnname  string    `json:"cnname"`
	Passwd  string    `json:"-"`
	Email   string    `json:"email"`
	Phone   string    `json:"phone"`
	IM      string    `json:"im" orm:"column(im)"`
	QQ      string    `json:"qq" orm:"column(qq)"`
	Role    int       `json:"role"`
	Created time.Time `json:"-" orm:"-"`
}

func MembersByTeamId

func MembersByTeamId(tid int64) []*User

func MembersByTeamName

func MembersByTeamName(name string) []*User

func ReadUserById

func ReadUserById(id int64) *User

func ReadUserByName

func ReadUserByName(name string) *User

func SelectUserById

func SelectUserById(id int64) *User

func (*User) CanWrite

func (this *User) CanWrite(t *Team) bool

func (*User) Remove

func (this *User) Remove() (int64, error)

func (*User) Save

func (this *User) Save() (int64, error)

func (*User) Update

func (this *User) Update() (int64, error)

Jump to

Keyboard shortcuts

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