thumbnail

package
v0.0.0-...-976c434 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, factory GeneratorFactory)

Types

type Generator

type Generator interface {
	Generate(context.Context, io.ReadSeeker, int64) (io.ReadCloser, error)
}

func NewImageGenerator

func NewImageGenerator(opt *ImageOption) (Generator, error)

type GeneratorFactory

type GeneratorFactory = func() Option

type ImageOption

type ImageOption struct {
	Width   int
	Height  int
	Quality int
}

func (*ImageOption) Match

func (opt *ImageOption) Match(mimeType string) bool

func (*ImageOption) New

func (opt *ImageOption) New() (Generator, error)

type Option

type Option interface {
	New() (Generator, error)
	Match(string) bool
}

Jump to

Keyboard shortcuts

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