Documentation ¶
Index ¶
- func GetGroupPath(tx *sql.Tx, gid wa.ID) ([]byte, error)
- func NewDB(ctx context.Context, wg *sync.WaitGroup, config *wa.Config, logger *log.Logger) (*sql.DB, error)
- type ClaimDAO
- type GroupDAO
- func (a *GroupDAO) CheckGroup(pid, gid wa.ID) error
- func (a *GroupDAO) Create(group *wa.Group) (*wa.Group, error)
- func (a *GroupDAO) Delete(gid wa.ID) error
- func (a *GroupDAO) Find(code string) (*wa.Group, error)
- func (a *GroupDAO) Get(gid wa.ID) (*wa.Group, error)
- func (a *GroupDAO) Query(gid wa.ID, keyword string) (groups []*wa.Group, err error)
- func (a *GroupDAO) Update(group *wa.Group) (*wa.Group, error)
- type UserDAO
- func (a *UserDAO) Create(user *wa.User) (*wa.User, error)
- func (a *UserDAO) Delete(uid wa.ID) error
- func (a *UserDAO) Find(code string) (*wa.User, error)
- func (a *UserDAO) Get(uid wa.ID) (*wa.User, error)
- func (a *UserDAO) GetAuthToken(uid wa.ID) (token []byte, err error)
- func (a *UserDAO) GetSessionToken(uid wa.ID) (token []byte, err error)
- func (a *UserDAO) Query(gid wa.ID, key string, value string, keyword string) (users []*wa.User, err error)
- func (a *UserDAO) SetAuthToken(uid wa.ID, token []byte) error
- func (a *UserDAO) SetSessionToken(uid wa.ID, token []byte) error
- func (a *UserDAO) Update(user *wa.User) (*wa.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGroupPath ¶
GetGroupPath returns the group path.
Types ¶
type ClaimDAO ¶
type ClaimDAO struct {
// contains filtered or unexported fields
}
ClaimDAO represents the claim DAO.
func NewClaimDAO ¶
NewClaimDAO creates a new claim DAO.
type GroupDAO ¶
type GroupDAO struct {
// contains filtered or unexported fields
}
GroupDAO represents the group DAO.
func NewGroupDAO ¶
NewGroupDAO creates a new group DAO.
func (*GroupDAO) CheckGroup ¶
CheckGroup checks the group.
type UserDAO ¶
type UserDAO struct {
// contains filtered or unexported fields
}
UserDAO represents the user DAO.
func NewUserDAO ¶
NewUserDAO creates a new user DAO.
func (*UserDAO) GetAuthToken ¶
GetAuthToken gets the user auth token.
func (*UserDAO) GetSessionToken ¶
GetSessionToken gets the user session token.
func (*UserDAO) Query ¶
func (a *UserDAO) Query(gid wa.ID, key string, value string, keyword string) (users []*wa.User, err error)
Query queries the users by keyword.
func (*UserDAO) SetAuthToken ¶
SetAuthToken sets the user auth token.
func (*UserDAO) SetSessionToken ¶
SetSessionToken sets the user session token.
Click to show internal directories.
Click to hide internal directories.