resource

package
v0.0.0-...-4b76107 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(w http.ResponseWriter, r *http.Request)

Types

type User

type User struct {
	ID        primitive.ObjectID `bson:"_id" json:"id"`
	Name      string             `bson:"name" json:"name" validate:"required"`
	Email     string             `bson:"email" json:"email" validate:"email,required"`
	Password  string             `bson:"password" json:"password" validate:"required,min=6"`
	Salt      string             `bson:"salt" json:"salt"`
	Roles     []string           `bson:"roles" json:"roles"`
	Active    bool               `bson:"active" json:"active"`
	CreatedAt time.Time          `bson:"created_at"`
	UpdatedAt time.Time          `bson:"updated_at"`
}

func (User) Create

func (rs User) Create(w http.ResponseWriter, r *http.Request)

func (User) Delete

func (rs User) Delete(w http.ResponseWriter, r *http.Request)

func (User) Get

func (rs User) Get(w http.ResponseWriter, r *http.Request)

func (User) List

func (rs User) List(w http.ResponseWriter, r *http.Request)

func (User) Routes

func (rs User) Routes() chi.Router

func (User) Update

func (rs User) Update(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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