mongodbevent

package
v0.0.0-...-d2ef8e1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUserById

func DeleteUserById(userId string) (interface{}, error)

func InsertUser

func InsertUser(userData *UserJson) (interface{}, error)

func IsUserEmailHave

func IsUserEmailHave(emailName string) (bool, error)

func UpdateUserById

func UpdateUserById(userId string, userData *UserJson) error

Types

type UserJson

type UserJson struct {
	Id          interface{} `bson:"_id,omitempty"`
	Name        string      `bson:"name"`
	AvatarType  string      `bson:"avatar_type"`
	AvatarName  string      `bson:"avatar_name"`
	Age         int         `bson:"age"`
	YearOfBirth int         `bson:"year_of_birth"`
	Note        string      `bson:"note,omitempty"`
	Email       string      `bson:"email"`
	CreatedAt   time.Time   `bson:"created_at"`
	UpdatedAt   time.Time   `bson:"updated_at"`
}

func GetUserById

func GetUserById(userId string) (*UserJson, error)

func GetUserLimitPage

func GetUserLimitPage(limit int, page int) ([]UserJson, int, error)

Jump to

Keyboard shortcuts

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