Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UgStore = userGroupStore{}
Functions ¶
This section is empty.
Types ¶
type UserGroup ¶
type UserGroup struct { ID primitive.ObjectID `bson:"_id,omitempty"` Name string `bson:"name,omitempty"` MetaData map[string]any `bson:"metaData,omitempty"` Users []struct { ID string `bson:"_id,omitempty"` Name string `bson:"name,omitempty"` Email string `bson:"email,omitempty"` Phone string `bson:"phone,omitempty"` } `bson:"users,omitempty"` UserIds []string `bson:"userIds,omitempty"` }
type UserGroupModel ¶
type UserGroupModel struct { mongodb.UserGroup IdKey string NameKey string UsersKey string UserIdsKey string MetaDataKey string }
func GetUserGroupModel ¶
func GetUserGroupModel() *UserGroupModel
func (UserGroupModel) CollectionName ¶
func (u UserGroupModel) CollectionName() string
type UserGroupStore ¶
type UserGroupStore interface { Create(group *UserGroup) error UpdateNameUpdateName(id primitive.ObjectID, name string) error AddUser(id primitive.ObjectID, userId primitive.ObjectID) error RemoveUser(id primitive.ObjectID, userId primitive.ObjectID) error DeleteById(ids primitive.ObjectID) error GetById(id string) (*UserGroup, error) }
Click to show internal directories.
Click to hide internal directories.