Documentation
¶
Index ¶
- type App
- func (a App) CaptionGif(ctx context.Context, source *gif.GIF, text string) (*gif.GIF, error)
- func (a App) CaptionImage(ctx context.Context, source image.Image, text string) (image.Image, error)
- func (a App) DiscordHandler(ctx context.Context, webhook discord.InteractionRequest) (discord.InteractionResponse, func(context.Context) discord.InteractionResponse)
- func (a App) GetFromGiphy(ctx context.Context, id, caption string) (*gif.GIF, error)
- func (a App) GetFromURL(ctx context.Context, imageURL, caption string) (image.Image, error)
- func (a App) GetFromUnsplash(ctx context.Context, id, caption string) (image.Image, error)
- func (a App) GetGifFromURL(ctx context.Context, imageURL, caption string) (*gif.GIF, error)
- func (a App) GifHandler() http.Handler
- func (a App) Handler() http.Handler
- func (a App) SlackCommand(ctx context.Context, payload slack.SlashPayload) slack.Response
- func (a App) SlackInteract(ctx context.Context, payload slack.InteractivePayload) slack.Response
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App of package
func New ¶
func New(config Config, unsplashApp unsplash.App, giphyApp giphy.App, prometheusRegisterer prometheus.Registerer, tracer trace.Tracer, website string) App
New creates new App from Config
func (App) CaptionGif ¶
CaptionGif add caption on a gif
func (App) CaptionImage ¶
func (a App) CaptionImage(ctx context.Context, source image.Image, text string) (image.Image, error)
CaptionImage add caption on an image
func (App) DiscordHandler ¶
func (a App) DiscordHandler(ctx context.Context, webhook discord.InteractionRequest) (discord.InteractionResponse, func(context.Context) discord.InteractionResponse)
DiscordHandler handle discord request
func (App) GetFromGiphy ¶
GetFromGiphy generates a meme from the given id with caption text
func (App) GetFromURL ¶
GetFromURL a meme caption to the given image name from url
func (App) GetFromUnsplash ¶
GetFromUnsplash generates a meme from the given id with caption text
func (App) GetGifFromURL ¶
GetGifFromURL generates a meme gif from the given id with caption text
func (App) GifHandler ¶
GifHandler for gif request. Should be use with net/http
func (App) SlackCommand ¶
SlackCommand handler
func (App) SlackInteract ¶
SlackInteract handler
Click to show internal directories.
Click to hide internal directories.