Documentation ¶
Index ¶
- func AddJoke(ctx context.Context, joke JokeDB) (id primitive.ObjectID, err error)
- func AddNewJokesFromHumorAPI(ctx context.Context)
- func CloseDb()
- func GetSingleTypeJoke(ctx context.Context, category types.JokeCategory) (types.JokeContainer, error)
- func GetTwoPartsTypeJoke(ctx context.Context, category types.JokeCategory) (types.JokeTwoPartsContainer, error)
- type HumorAPIJokeDB
- type JokeDB
- type JokeSearch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewJokesFromHumorAPI ¶
func GetSingleTypeJoke ¶
func GetSingleTypeJoke(ctx context.Context, category types.JokeCategory) (types.JokeContainer, error)
func GetTwoPartsTypeJoke ¶
func GetTwoPartsTypeJoke(ctx context.Context, category types.JokeCategory) (types.JokeTwoPartsContainer, error)
Types ¶
type HumorAPIJokeDB ¶
type HumorAPIJokeDB struct { Category types.JokeCategory Joke joke.HumorAPIRes }
type JokeDB ¶
type JokeDB struct { Question string `bson:"question"` ContentRes string `bson:"content"` Type types.JokeType `bson:"type"` Category types.JokeCategory `bson:"category"` GuildID string `bson:"guild_id"` ExternalID int64 `bson:"externalID"` // contains filtered or unexported fields }
func (JokeDB) ContentTwoPart ¶
type JokeSearch ¶
type JokeSearch struct { Type types.JokeType Category types.JokeCategory }
Click to show internal directories.
Click to hide internal directories.