joke

package
v0.0.0-...-c76ee77 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

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) Active

func (d *DevService) Active(ctx context.Context) (active bool)

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)

Jump to

Keyboard shortcuts

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