user

package
v0.0.0-...-73eed44 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserRequest

type CreateUserRequest struct {
	Email             string
	Password          string
	AvatarId          string
	Roles             []string
	EmailConfirmation bool
	FirstName         string
	LastName          string
	KycVerified       bool
}

type GetUserRequest

type GetUserRequest struct {
	Id string
}

type GetUsersByRole

type GetUsersByRole struct {
	Skip  int64
	Limit int64
	Role  string
}

type GetUsersRequest

type GetUsersRequest struct {
	Skip  int64
	Limit int64
}

type IUserRepository

type IUserRepository interface {
	Create(user *User) (*User, error)
	GetUser(id string) (*User, error)
	GetUsers(filter interface{}, options *options.FindOptions) (*[]User, error)
	GetUserByEmail(email string) (*User, error)
	UserExists(email string) bool
	UpdateUser(user *User) (*User, error)
}

type UpdateUserRequest

type UpdateUserRequest struct {
	Id                string
	AvatarId          string
	Roles             []string
	IsActive          bool
	Email             string
	Password          string
	EmailConfirmation bool
	FirstName         string
	LastName          string
	KycVerified       bool
}

type User

type User struct {
	Id                primitive.ObjectID `json:"_id" bson:"_id"`
	AvatarId          string
	Roles             []string
	IsActive          bool
	Email             string
	Password          string
	EmailConfirmation bool
	FirstName         string
	LastName          string
	KycVerified       bool
	TotpSecret        string
	CreatedAt         int64
	UpdatedAt         int64
}

type UserController

type UserController struct {
	// contains filtered or unexported fields
}

func (UserController) ForgetPassword

func (uc UserController) ForgetPassword(c *gin.Context)

func (UserController) GetUser

func (uc UserController) GetUser(c *gin.Context)

func (UserController) GetUserByRole

func (uc UserController) GetUserByRole(c *gin.Context)

func (UserController) GetUsers

func (uc UserController) GetUsers(c *gin.Context)

func (UserController) InsertUser

func (uc UserController) InsertUser(c *gin.Context)

func (UserController) SignIn

func (uc UserController) SignIn(c *gin.Context)

func (UserController) SignUp

func (uc UserController) SignUp(c *gin.Context)

func (UserController) UpdateUser

func (uc UserController) UpdateUser(c *gin.Context)

func (UserController) VerifyEmail

func (uc UserController) VerifyEmail(c *gin.Context)

func (UserController) VerifyForgetPassword

func (uc UserController) VerifyForgetPassword(c *gin.Context)

type UserEmailConfirmationRequest

type UserEmailConfirmationRequest struct {
	ConfirmationToken string
}

type UserForgetPasswordRequest

type UserForgetPasswordRequest struct {
	Email string
}

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(client *mongo.Client) UserRepository

func (UserRepository) Create

func (ur UserRepository) Create(user *User) (*User, error)

func (UserRepository) GetUser

func (ur UserRepository) GetUser(id string) (*User, error)

func (UserRepository) GetUserByEmail

func (ur UserRepository) GetUserByEmail(email string) (*User, error)

func (UserRepository) GetUsers

func (ur UserRepository) GetUsers(filter interface{}, options *options.FindOptions) (*[]User, error)

func (UserRepository) UpdateUser

func (ur UserRepository) UpdateUser(user *User) (*User, error)

func (UserRepository) UserExists

func (ur UserRepository) UserExists(email string) bool

type UserSignInRequest

type UserSignInRequest struct {
	Email    string
	Password string
}

type UserSignUpRequest

type UserSignUpRequest struct {
	Email    string
	Password string
}

type UserSignUpResponse

type UserSignUpResponse struct {
	Id    string
	Email string
}

type UserVerifyForgetPasswordRequest

type UserVerifyForgetPasswordRequest struct {
	Token    string
	Email    string
	Password string
}

Jump to

Keyboard shortcuts

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