mongo

package
v0.0.1-0...-6deec57 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRepository

func NewUserRepository(ctx context.Context, mongoDB *mongo.Database) (persistence.UserRepository, error)

NewUserRepository returns mongo view model repository for user

Types

type User

type User struct {
	ID         string      `json:"id" bson:"user_id"`
	Email      string      `json:"email" bson:"email_address"`
	FacebookID string      `json:"facebook_id" bson:"facebook_id,omitempty"`
	GoogleID   string      `json:"google_id" bson:"google_id,omitempty"`
	Role       access.Role `json:"role" bson:"role"`
}

User model

func (User) GetEmail

func (u User) GetEmail() string

GetEmail the email

func (User) GetFacebookID

func (u User) GetFacebookID() string

GetFacebookID facebook id

func (User) GetGoogleID

func (u User) GetGoogleID() string

GetGoogleID google id

func (User) GetID

func (u User) GetID() string

GetID the id

func (User) GetRole

func (u User) GetRole() access.Role

GetRole returns user role

Jump to

Keyboard shortcuts

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