kitten

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 39 Imported by: 0

Documentation

Index

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

func (a App) CaptionGif(ctx context.Context, source *gif.GIF, text string) (*gif.GIF, error)

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

DiscordHandler handle discord request

func (App) GetFromGiphy

func (a App) GetFromGiphy(ctx context.Context, id, caption string) (*gif.GIF, error)

GetFromGiphy generates a meme from the given id with caption text

func (App) GetFromURL

func (a App) GetFromURL(ctx context.Context, imageURL, caption string) (image.Image, error)

GetFromURL a meme caption to the given image name from url

func (App) GetFromUnsplash

func (a App) GetFromUnsplash(ctx context.Context, id, caption string) (image.Image, error)

GetFromUnsplash generates a meme from the given id with caption text

func (App) GetGifFromURL

func (a App) GetGifFromURL(ctx context.Context, imageURL, caption string) (*gif.GIF, error)

GetGifFromURL generates a meme gif from the given id with caption text

func (App) GifHandler

func (a App) GifHandler() http.Handler

GifHandler for gif request. Should be use with net/http

func (App) Handler

func (a App) Handler() http.Handler

Handler for image request. Should be use with net/http

func (App) SlackCommand

func (a App) SlackCommand(ctx context.Context, payload slack.SlashPayload) slack.Response

SlackCommand handler

func (App) SlackInteract

func (a App) SlackInteract(ctx context.Context, payload slack.InteractivePayload) slack.Response

SlackInteract handler

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) Config

Flags adds flags for configuring package

Jump to

Keyboard shortcuts

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