Documentation ¶
Index ¶
- type Scope
- func (s Scope) Add(ctx domain.RequestContext, g group.Group) (err error)
- func (s Scope) Delete(ctx domain.RequestContext, refID string) (rows int64, err error)
- func (s Scope) Get(ctx domain.RequestContext, refID string) (g group.Group, err error)
- func (s Scope) GetAll(ctx domain.RequestContext) (groups []group.Group, err error)
- func (s Scope) GetGroupMembers(ctx domain.RequestContext, groupID string) (members []group.Member, err error)
- func (s Scope) GetMembers(ctx domain.RequestContext) (r []group.Record, err error)
- func (s Scope) JoinGroup(ctx domain.RequestContext, groupID, userID string) (err error)
- func (s Scope) LeaveGroup(ctx domain.RequestContext, groupID, userID string) (err error)
- func (s Scope) Update(ctx domain.RequestContext, g group.Group) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
Scope provides data access to MySQL.
func (Scope) GetGroupMembers ¶
func (s Scope) GetGroupMembers(ctx domain.RequestContext, groupID string) (members []group.Member, err error)
GetGroupMembers returns all user associated with given group.
func (Scope) GetMembers ¶
GetMembers returns members for every group. Useful when you need to bulk fetch membership records for subsequent processing.
func (Scope) JoinGroup ¶
func (s Scope) JoinGroup(ctx domain.RequestContext, groupID, userID string) (err error)
JoinGroup adds user to group.
func (Scope) LeaveGroup ¶
func (s Scope) LeaveGroup(ctx domain.RequestContext, groupID, userID string) (err error)
LeaveGroup removes user from group.
Click to show internal directories.
Click to hide internal directories.