service

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuoteDto

type QuoteDto struct {
	Id     string `json:"id"`
	Text   string `json:"text"`
	Source string `json:"source"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(dsn string, logger echo.Logger) (*Service, error)

func (*Service) AddQuote

func (s *Service) AddQuote(quoteDto QuoteDto) (QuoteDto, error)

func (*Service) GetQuotes

func (s *Service) GetQuotes(pagination database.Pagination) ([]QuoteDto, int64, error)

func (*Service) RandomQuote added in v1.3.0

func (s *Service) RandomQuote() (QuoteDto, error)

func (*Service) SetQuotes

func (s *Service) SetQuotes(quotesDto []QuoteDto) ([]QuoteDto, error)

Jump to

Keyboard shortcuts

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