user

package
v0.0.0-...-6c9b1ce Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID          primitive.ObjectID `bson:"_id,omitempty"`
	Name        string             `bson:"name"`
	Email       string             `bson:"email"`
	Phone       string             `bson:"phone"`
	MetaData    map[string]any     `bson:"metaData"`
	UsersGroups []struct {
		ID   string `bson:"_id"`
		Name string `bson:"name"`
	} `bson:"usersGroups"`
	UserGroupIds []string `bson:"userGroupIds"`
}

type UserModel

type UserModel struct {
	mongodb.UserGroup
	IdKey         string
	NameKey       string
	EmailKey      string
	PhoneKey      string
	MetaDataKey   string
	UserGroupsKey string
	UsgidsKey     string
}

func GetUserGroupModel

func GetUserGroupModel() *UserModel

func (UserModel) CollectionName

func (u UserModel) CollectionName() string

type UserStore

type UserStore interface {
	Create(u *User) error
	Update(u *User) error
	Delete(id primitive.ObjectID) error
	GetById(id string) (*User, error)
}

Jump to

Keyboard shortcuts

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