handlers

package
v0.0.0-...-5f20ed3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeHandler

func InitializeHandler() (err error)

Types

type HandlerFunc

type HandlerFunc interface {
	// AUTH HANDLER
	AuthenticateUser(credentials datatransfers.UserLogin) (token string, err error)
	RegisterUser(credentials datatransfers.UserSignup) (err error)

	// USER HANDLER
	RetrieveUser(id uint) (user models.User, err error)
	UpdateUser(id uint, user datatransfers.UserUpdate) (err error)

	// TODO HANDLER
	GetAllUserTodo(user_id uint) (todo []models.Todo, err error)
	GETTodoByID(user_id uint, id uint, isAdmin bool) (todo models.Todo, err error)
	UpdateTodoUser(user_id uint, id uint, isAdmin bool, todo datatransfers.TodoUpdate) (err error)
	InsertTodo(user_id uint, newTodo datatransfers.TodoInsert) (todo models.Todo, err error)
	DeleteTodoById(user_id uint, id uint, isAdmin bool) (todo models.Todo, err error)
}
var Handler HandlerFunc

Jump to

Keyboard shortcuts

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