community: github.com/documize/community/model/group Index | Files

package group

import "github.com/documize/community/model/group"

Index

Package Files

group.go

func UserHasGroupMembership Uses

func UserHasGroupMembership(r []Record, groupID, userID string) bool

UserHasGroupMembership returns true if user belongs to specified group.

type Group Uses

type Group struct {
    model.BaseEntity
    OrgID   string `json:"orgId"`
    Name    string `json:"name"`
    Purpose string `json:"purpose"`
    Members int    `json:"members"` // read-only info
}

Group defines a user group.

type Member Uses

type Member struct {
    ID        uint64 `json:"id"`
    OrgID     string `json:"orgId"`
    GroupID   string `json:"groupId"`
    UserID    string `json:"userId"`
    Firstname string `json:"firstname"` //read-only info
    Lastname  string `json:"lastname"`  //read-only info
}

Member defines user membership of a user group.

type Record Uses

type Record struct {
    ID      uint64 `json:"id"`
    OrgID   string `json:"orgId"`
    GroupID string `json:"groupId"`
    UserID  string `json:"userId"`
    Name    string `json:"name"`
    Purpose string `json:"purpose"`
}

Record details user membership of a user group.

func FilterGroupRecords Uses

func FilterGroupRecords(r []Record, groupID string) (m []Record)

FilterGroupRecords returns only those records matching group ID.

Package group imports 1 packages (graph) and is imported by 6 packages. Updated 2018-11-08. Refresh now. Tools for package owners.