users

package
v0.0.0-...-f02a2e5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func Init

func Init(db *sql.DB, l *zap.Logger) *Handler

func (*Handler) CheckPrivileges

func (h *Handler) CheckPrivileges(route string, next http.HandlerFunc) http.HandlerFunc

CheckPrivileges of user

func (*Handler) CheckTicket

func (h *Handler) CheckTicket(next http.HandlerFunc) http.HandlerFunc

CheckTicket to download for user

func (*Handler) Signin

func (h *Handler) Signin(response http.ResponseWriter, request *http.Request)

Signin Signin godoc @Summary Signin @Description Signin @Tags Users @Param Body body repo.Resource true "Email and password" @Accept json @Produce json @Success 200 {object} string @Failure 400 @Failure 422 @Failure 500 @Router /signin [post]

func (*Handler) Signup

func (h *Handler) Signup(response http.ResponseWriter, request *http.Request)

Signup Signup godoc @Summary Signup @Description Signup @Tags Users @Param Body body repo.Resource true "Email and password" @Accept json @Produce json @Success 201 @Failure 400 @Failure 422 @Failure 500 @Router /signup [post]

Jump to

Keyboard shortcuts

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