handlers

package
v0.0.0-...-4462aca Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HomeHandler

func HomeHandler(s server.Server) http.HandlerFunc

func InsertPostHandler

func InsertPostHandler(s server.Server) http.HandlerFunc

func LoginHandler

func LoginHandler(s server.Server) http.HandlerFunc

func MeHandler

func MeHandler(s server.Server) http.HandlerFunc

func SignUpHandler

func SignUpHandler(s server.Server) http.HandlerFunc

Types

type HomeResponse

type HomeResponse struct {
	Message string `json:"message"`
	Status  bool   `json:"status"`
}

type InsertPostRequest

type InsertPostRequest struct {
	PostContent string `json:"post_content"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

type PostResponse

type PostResponse struct {
	Id          string `json:"id"`
	PostContent string `json:"post_content"`
}

type SignUpRequest

type SignUpRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type SignUpResponse

type SignUpResponse struct {
	Id    int64  `json:"id"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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