Documentation ¶
Index ¶
- Constants
- type Builder
- type CropStrategy
- type ExifReader
- type GoogleTagger
- type MediaOptimization
- type NamedTransformation
- type NamedTransformationMap
- type OverlaySinkerFunc
- type Scaler
- type ScalerConfig
- type ScalerFactory
- type ScalerOptions
- type Storer
- type Transformation
- type Watermark
- type Watermarker
- type WatermarkerFactory
- type WebpConverter
Constants ¶
View Source
const NamedTransformationPrefix = "t_"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(dataStorage media.FileStorer) Builder
func (*Builder) Build ¶
func (b *Builder) Build(ts []Transformation) ([]pipeline.PipelineStep, error)
type CropStrategy ¶
type CropStrategy string
var ( PadResizeCrop CropStrategy = "pad_resize_crop" ForcedCrop CropStrategy = "forced_crop" )
func ArgToCropStrategy ¶
func ArgToCropStrategy(arg string) CropStrategy
type ExifReader ¶
type ExifReader struct { }
func NewExifReader ¶
func NewExifReader() ExifReader
func (*ExifReader) Execute ¶
func (r *ExifReader) Execute(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type GoogleTagger ¶
type GoogleTagger struct { }
func NewGoogleTagger ¶
func NewGoogleTagger() GoogleTagger
func (*GoogleTagger) Run ¶
func (w *GoogleTagger) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type MediaOptimization ¶
type MediaOptimization struct { }
func NewMediaOptimization ¶
func NewMediaOptimization() *MediaOptimization
func (*MediaOptimization) GetSteps ¶
func (o *MediaOptimization) GetSteps(contentType media.ContentType) ([]pipeline.PipelineStep, error)
type NamedTransformation ¶
type NamedTransformationMap ¶
type NamedTransformationMap = map[string]NamedTransformation
type OverlaySinkerFunc ¶
type Scaler ¶
type Scaler struct {
// contains filtered or unexported fields
}
func NewScaler ¶
func NewScaler(opts ...ScalerOptions) Scaler
func (*Scaler) Execute ¶
func (r *Scaler) Execute(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type ScalerConfig ¶
type ScalerConfig struct { Size types.Size CropStrategy CropStrategy PadColor color.RGBA }
type ScalerFactory ¶
type ScalerFactory struct { }
type ScalerOptions ¶
type ScalerOptions func(*scalerOptions)
func WithCropStrategy ¶
func WithCropStrategy(cropStrategy CropStrategy) ScalerOptions
func WithPadColor ¶
func WithPadColor(padColor color.RGBA) ScalerOptions
func WithSize ¶
func WithSize(size types.Size) ScalerOptions
type Storer ¶
type Storer interface { GetAll() (NamedTransformationMap, error) Get(name string) (*NamedTransformation, error) Save(t NamedTransformation) error Delete(name string) error DeleteAll() error }
type Transformation ¶
func NewTransformation ¶
func NewTransformation(c Transformation) Transformation
func (*Transformation) IsSame ¶
func (t *Transformation) IsSame(name string) bool
func (*Transformation) ToString ¶
func (t *Transformation) ToString() string
type Watermarker ¶
type Watermarker struct {
// contains filtered or unexported fields
}
func NewWatermarker ¶
func NewWatermarker(size types.Size, anchor types.Anchor, padding int, overlaySinker OverlaySinkerFunc) Watermarker
func (*Watermarker) Execute ¶
func (w *Watermarker) Execute(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type WatermarkerFactory ¶
type WatermarkerFactory struct {
// contains filtered or unexported fields
}
func NewWatermarkerFactory ¶
func NewWatermarkerFactory(dataStorage media.FileStorer) WatermarkerFactory
func (*WatermarkerFactory) Build ¶
func (f *WatermarkerFactory) Build(args map[string]string) (*Watermarker, error)
type WebpConverter ¶
type WebpConverter struct { }
func NewWebpConverter ¶
func NewWebpConverter() WebpConverter
func (*WebpConverter) Execute ¶
func (c *WebpConverter) Execute(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
Click to show internal directories.
Click to hide internal directories.