Back to

Package user

Latest Go to latest

The highest tagged major version is .

Published: Feb 29, 2020 | License: MIT | Module:


func AddUser

func AddUser(c echo.Context) error

func InitUser

func InitUser(g *echo.Group)

type User

type User struct {
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	Name      string             `json:"name" bson:"name" validate:"required"`
	Email     string             `json:"email" bson:"email" validate:"required"`
	Password  string             `json:"password" bson:"password" validate:"required"`
	CreatedAt time.Time          `json:"createdAt" bson:"createdAt"`
	UpdatedAt time.Time          `json:"updatedAt" bson:"updatedAt"`

User struct

func (*User) AddUser

func (u *User) AddUser() error

AddUser to db and return error if anything went wrong

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier