provider.go 557 B

123456789101112131415161718
  1. // auximagedata exposes an interface for retreiving auxiliary images
  2. // such as watermarks and fallbacks. Default implementation stores those in memory.
  3. package auximageprovider
  4. import (
  5. "context"
  6. "net/http"
  7. "github.com/imgproxy/imgproxy/v3/imagedata"
  8. "github.com/imgproxy/imgproxy/v3/options"
  9. )
  10. // Provider is an interface that provides image data and headers based
  11. // on options. It is used to retrieve WatermarkImage and FallbackImage.
  12. type Provider interface {
  13. Get(context.Context, *options.Options) (imagedata.ImageData, http.Header, error)
  14. }