group

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGroupNameDup = errors.New("duplicated user group name")

ErrGroupNameDup ...

Functions

func AddUserGroup

func AddUserGroup(userGroup models.UserGroup) (int, error)

AddUserGroup - Add User Group

func DeleteUserGroup

func DeleteUserGroup(id int) error

DeleteUserGroup ...

func GetGroupIDByGroupName added in v1.8.2

func GetGroupIDByGroupName(groupName []string, groupType int) ([]int, error)

GetGroupIDByGroupName - Return the group ID by given group name. it is possible less group ID than the given group name if some group doesn't exist.

func GetUserGroup

func GetUserGroup(id int) (*models.UserGroup, error)

GetUserGroup ...

func OnBoardUserGroup

func OnBoardUserGroup(g *models.UserGroup) error

OnBoardUserGroup will check if a usergroup exists in usergroup table, if not insert the usergroup and put the id in the pointer of usergroup model, if it does exist, return the usergroup's profile.

func QueryUserGroup

func QueryUserGroup(query models.UserGroup) ([]*models.UserGroup, error)

QueryUserGroup - Query User Group

func UpdateUserGroupName

func UpdateUserGroupName(id int, groupName string) error

UpdateUserGroupName ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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