Documentation
¶
Index ¶
- func DeleteQuoteHandler(service QuoteService) http.HandlerFunc
- func GetQuotesHandler(service QuoteService) http.HandlerFunc
- func GetRandomQuoteHandler(service QuoteService) http.HandlerFunc
- func New(service QuoteService, router *mux.Router, listenAddr string) *http.Server
- func PostQuoteHandler(service QuoteService) http.HandlerFunc
- type QuoteService
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 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
}
Click to show internal directories.
Click to hide internal directories.