httpserver

package
v0.0.0-...-f403811 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteQuoteHandler

func DeleteQuoteHandler(service QuoteService) http.HandlerFunc

func GetQuotesHandler

func GetQuotesHandler(service QuoteService) http.HandlerFunc

func GetRandomQuoteHandler

func GetRandomQuoteHandler(service QuoteService) http.HandlerFunc

func New

func New(service QuoteService, router *mux.Router, listenAddr string) *http.Server

func PostQuoteHandler

func PostQuoteHandler(service QuoteService) http.HandlerFunc

Types

type QuoteService

type QuoteService interface {
	CreateNewQuote(ctx context.Context, author, quote string) error
	GetQuotesWithFilter(ctx context.Context, author string) ([]quoteService.Quote, error)
	GetRandomQuote(ctx context.Context) (*quoteService.Quote, error)
	DeleteQuoteByID(ctx context.Context, id uuid.UUID) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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