generator

package
v0.0.0-...-ee9263c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: GPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCollage

func CreateCollage[T Drawable](ctx context.Context, collageElements []T, displayOptions DisplayOptions) (*image.Image, *bytes.Buffer, error)

func DownloadImage

func DownloadImage(ctx context.Context, entity Downloadable) error

func DownloadImageWithRetry

func DownloadImageWithRetry(ctx context.Context, entity Downloadable) error

func DownloadImages

func DownloadImages[T Downloadable](ctx context.Context, entities []T) error

Types

type DisplayOptions

type DisplayOptions struct {
	TextLocation   constants.TextLocation
	Height         uint
	ImageDimension int
	Columns        int
	Rows           int
	FontSize       float64
	Width          uint
	PlayCount      bool
	Resize         bool
	BoldFont       bool
	Grayscale      bool
	Compress       bool
	ArtistName     bool
	TrackName      bool
	Webp           bool
	AlbumName      bool
}

type Downloadable

type Downloadable interface {
	GetImageUrl() string
	SetImage(*image.Image)
	GetIdentifier() string
	GetCacheEntry() cache.CacheEntry
}

type Drawable

type Drawable interface {
	GetImage() *image.Image
	GetParameters() map[string]string
	ClearImage()
}

Jump to

Keyboard shortcuts

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