handler

package
v0.0.0-...-0081ab5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 8 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 {
	H *chi.Mux
	// contains filtered or unexported fields
}

Business logic

func NewHandler

func NewHandler(i, e *log.Logger) *Handler

func (*Handler) CreateUser

func (h *Handler) CreateUser(w http.ResponseWriter, r *http.Request)

POST request For Create User

func (*Handler) DeleteUser

func (h *Handler) DeleteUser(w http.ResponseWriter, r *http.Request)

DELETE request for delete User

func (*Handler) Friends

func (h *Handler) Friends(w http.ResponseWriter, r *http.Request)

GET show all friends

func (*Handler) Home

func (h *Handler) Home(w http.ResponseWriter, r *http.Request)

PUT Change Age

func (*Handler) Init

func (h *Handler) Init() *chi.Mux

func (*Handler) InitApi

func (h *Handler) InitApi() *chi.Mux

func (*Handler) MakeFriends

func (h *Handler) MakeFriends(w http.ResponseWriter, r *http.Request)

POST link two users as friend

func (*Handler) ShowAll

func (h *Handler) ShowAll(w http.ResponseWriter, r *http.Request)

GET show all users for test

Jump to

Keyboard shortcuts

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