Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DevServiceLimitExceededErr = errors.New("jokedev: current limit exceeded")
View Source
var HumorAPILimitExceededErr = errors.New("humorAPI: daily limit of jokes was exceeded")
Functions ¶
func NewHumorAPIService ¶
func NewHumorAPIService(globalCtx context.Context) joke.SearchService
func NewJokeDatabase ¶
func NewJokeDatabase(database db.MongodbService) joke.Database
func NewJokeDevService ¶
func NewJokeDevService(globalCtx context.Context) joke.SearchService
Types ¶
type DevService ¶
type DevService struct {
// contains filtered or unexported fields
}
func (*DevService) RandomJoke ¶
func (d *DevService) RandomJoke(ctx context.Context, params joke.SearchParams) (joke.Joke, error)
type HumorAPIService ¶
type HumorAPIService struct {
// contains filtered or unexported fields
}
func (*HumorAPIService) Active ¶
func (h *HumorAPIService) Active(ctx context.Context) (active bool)
func (*HumorAPIService) RandomJoke ¶
func (h *HumorAPIService) RandomJoke(ctx context.Context, search joke.SearchParams) (joke.Joke, error)
Click to show internal directories.
Click to hide internal directories.