Documentation
¶
Overview ¶
Package db ...
Package db ...
Package db ...
Package db ...
Index ¶
- Constants
- type Role
- type User
- type UserDB
- func (d *UserDB) AddRole(rl *Role) (bool, int64)
- func (d *UserDB) AddUser(us *User) bool
- func (d *UserDB) DeleteRole(id int64) bool
- func (d *UserDB) DeleteUser(username string, clientID int64) bool
- func (d *UserDB) GetNew() UserDatabase
- func (d *UserDB) GetRole(id int64) *Role
- func (d *UserDB) GetRoleList() *[]Role
- func (d *UserDB) GetUser(username string, clientID int64) *User
- func (d *UserDB) GetUserList() *[]User
- func (d *UserDB) SearchUserList(cid int64) *[]User
- func (d *UserDB) UpdateUser(us *User) bool
- type UserDatabase
Constants ¶
View Source
const (
//TimeFormat TimeFormat
TimeFormat = "2006-01-02"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
Username string `json:"username"`
Password string `json:"password"`
Enabled bool `json:"enabled"`
Entered time.Time `json:"dateEntered"`
Email string `json:"emailAddress"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
RoleID int64 `json:"roleId"`
ClientID int64 `json:"clientId"`
}
User User
type UserDB ¶
UserDB UserDB
func (*UserDB) DeleteUser ¶
DeleteUser DeleteUser
func (*UserDB) SearchUserList ¶
SearchUserList SearchUserList
type UserDatabase ¶
type UserDatabase interface {
AddRole(rl *Role) (bool, int64)
GetRole(id int64) *Role
GetRoleList() *[]Role
DeleteRole(id int64) bool
AddUser(us *User) bool
UpdateUser(us *User) bool
GetUser(username string, clientID int64) *User
GetUserList() *[]User
SearchUserList(cid int64) *[]User
DeleteUser(username string, clientID int64) bool
}
UserDatabase UserDatabase
Click to show internal directories.
Click to hide internal directories.