mysql

package
v1.64.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Runtime *env.Runtime
}

Scope provides data access to MySQL.

func (Scope) Add

func (s Scope) Add(ctx domain.RequestContext, g group.Group) (err error)

Add inserts new user group into store.

func (Scope) Delete

func (s Scope) Delete(ctx domain.RequestContext, refID string) (rows int64, err error)

Delete removes group from store.

func (Scope) Get

func (s Scope) Get(ctx domain.RequestContext, refID string) (g group.Group, err error)

Get returns requested group.

func (Scope) GetAll

func (s Scope) GetAll(ctx domain.RequestContext) (groups []group.Group, err error)

GetAll returns all user groups for current orgID.

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

func (s Scope) GetMembers(ctx domain.RequestContext) (r []group.Record, err error)

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.

func (Scope) Update

func (s Scope) Update(ctx domain.RequestContext, g group.Group) (err error)

Update group name and description.

Jump to

Keyboard shortcuts

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