handlers

package
v0.0.0-...-159e443 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(r *http.Request) (user models.User, err error)

GetUser returns current user

Types

type BaseHandler

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

BaseHandler will hold everything that controller needs

func NewBaseHandler

func NewBaseHandler(db *gorm.DB) *BaseHandler

NewBaseHandler returns a new BaseHandler

func (*BaseHandler) CreateAccessToken

func (h *BaseHandler) CreateAccessToken(w http.ResponseWriter, r *http.Request)

CreateAccessToken API Creates user Access token

func (*BaseHandler) CreateMessage

func (h *BaseHandler) CreateMessage(w http.ResponseWriter, r *http.Request)

CreateMessage creates message

func (*BaseHandler) GetCurrentUser

func (h *BaseHandler) GetCurrentUser(w http.ResponseWriter, r *http.Request)

GetCurrentUser handler returns authanticated user informations

func (*BaseHandler) GetMessages

func (h *BaseHandler) GetMessages(w http.ResponseWriter, r *http.Request)

GetMessages returns user messages

func (*BaseHandler) GetUserList

func (h *BaseHandler) GetUserList(w http.ResponseWriter, r *http.Request)

GetUserList handler returns list of user

func (*BaseHandler) Signup

func (h *BaseHandler) Signup(w http.ResponseWriter, r *http.Request)

Signup API Creates user

Jump to

Keyboard shortcuts

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