Documentation ¶
Index ¶
- type Database
- func (db *Database) Auth(id uint64, pass string) (bool, error)
- func (db *Database) Close()
- func (db *Database) GroupAdd(group *Group) error
- func (db *Database) GroupDel(id uint64) error
- func (db *Database) GroupGet(id uint64) (*Group, error)
- func (db *Database) GroupList(pageno int, count int) (int64, []*Group, error)
- func (db *Database) GroupMemberAdd(groupMember *GroupMember) error
- func (db *Database) GroupMemberDel(id uint64) error
- func (db *Database) GroupMemberGet(id uint64) (*GroupMember, error)
- func (db *Database) GroupMemberList(groupId uint64, pageno int, count int) (int64, []*GroupMember, error)
- func (db *Database) GroupUpdate(group *Group) error
- func (db *Database) IsGroup(name string) ([]string, error)
- func (db *Database) UserAdd(user *User) error
- func (db *Database) UserDel(id uint64) error
- func (db *Database) UserGet(id uint64) (*User, error)
- func (db *Database) UserGetByName(name string) (*User, error)
- func (db *Database) UserList(pageno int, count int, ids []uint64, column string, order string, match string) (int64, []*User, error)
- func (db *Database) UserUpdate(user *User) error
- type Group
- type GroupMember
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) GroupMemberAdd ¶
func (db *Database) GroupMemberAdd(groupMember *GroupMember) error
func (*Database) GroupMemberDel ¶
func (*Database) GroupMemberGet ¶
func (db *Database) GroupMemberGet(id uint64) (*GroupMember, error)
func (*Database) GroupMemberList ¶
func (*Database) GroupUpdate ¶
func (*Database) UserUpdate ¶
type GroupMember ¶
type User ¶
type User struct { Id uint64 `xorm:"pk autoincr" json:"id"` Username string `xorm:"varchar(255) not null unique 'username'" json:"username"` Password string `xorm:"varchar(255) not null 'password'" json:"password"` Domain string `xorm:"varchar(255) not null 'domain'" json:"domain"` Created time.Time `xorm:"created" json:"created"` Updated time.Time `xorm:"updated" json:"updated"` }
Click to show internal directories.
Click to hide internal directories.