handlers

package
v0.0.0-...-de9bcf7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExpressionHandler

func CreateExpressionHandler(ctx context.Context, expressionSaver storage.ExpressionInteractor) http.HandlerFunc

CreateExpressionHandler - post method handler which stores an expression

func DeleteExpressionHandler

func DeleteExpressionHandler(ctx context.Context, expressionSaver storage.ExpressionInteractor) http.HandlerFunc

DeleteExpressionHandler

func GetExpressionsHandler

func GetExpressionsHandler(ctx context.Context, expressionSaver storage.ExpressionInteractor) http.HandlerFunc

GetExpressionHandler - get method handler which writes all expressions from database

Types

type Request

type Request struct {
	Expression string `json:"expression"`
}

type ResponseData

type ResponseData struct {
	ID         int64  `json:"id"`
	Expression string `json:"expression"`
	Answer     string `json:"answer"`
	Date       string `json:"date"`
	Status     string `json:"status"`
}

Jump to

Keyboard shortcuts

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