Documentation
¶
Index ¶
Constants ¶
View Source
const (
GuildIDKey = "guildID"
)
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 ¶
This section is empty.
Types ¶
type ActiveChecker ¶
type DatabaseService ¶
type DatabaseService struct {
// contains filtered or unexported fields
}
func NewDatabaseJokeService ¶
func NewDatabaseJokeService(database db.MongodbService) DatabaseService
func (DatabaseService) Joke ¶
func (d DatabaseService) Joke(ctx context.Context, search SearchParams) (Joke, error)
Joke Try to find Joke from Mongodb database. If SearchParams is empty, then function will find 1 random joke
type DevService ¶
type DevService struct {
// contains filtered or unexported fields
}
func (*DevService) Joke ¶
func (d *DevService) Joke(ctx context.Context, params SearchParams) (Joke, error)
type HumorAPIService ¶
type HumorAPIService struct {
// contains filtered or unexported fields
}
func (*HumorAPIService) Joke ¶
func (h *HumorAPIService) Joke(ctx context.Context, search SearchParams) (Joke, error)
type SearchService ¶
type SearchService interface { Joke(ctx context.Context, search SearchParams) (Joke, error) ActiveChecker }
func NewHumorAPIService ¶
func NewHumorAPIService(globalCtx context.Context) SearchService
func NewJokeDevService ¶
func NewJokeDevService(globalCtx context.Context) SearchService
Click to show internal directories.
Click to hide internal directories.