Versions in this module Expand all Collapse all v0 v0.0.1 Jul 22, 2023 Changes in this version + const NamedTransformationPrefix + type Builder struct + func NewBuilder(dataStorage media.FileStorer) Builder + func (b *Builder) Build(ts []Transformation) ([]pipeline.Step, error) + type CropStrategy string + var ForcedCrop CropStrategy = "forced_crop" + var PadResizeCrop CropStrategy = "pad_resize_crop" + func ArgToCropStrategy(arg string) CropStrategy + type ExifReader struct + func NewExifReader() *ExifReader + func (r *ExifReader) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error) + type GoogleTagger struct + func NewGoogleTagger(c GoogleTaggerConfig) *GoogleTagger + func (w *GoogleTagger) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error) + type GoogleTaggerConfig struct + type MediaOptimization struct + func NewMediaOptimization() *MediaOptimization + func (o *MediaOptimization) GetSteps(contentType media.ContentType) ([]pipeline.Step, error) + type NamedTransformation struct + CreatedAt time.Time + Name string + Transformations string + UpdatedAt time.Time + type NamedTransformationReplacer struct + func NewNamedTransformationReplacer(c NamedTransformationReplacerConfig) NamedTransformationReplacer + func (r *NamedTransformationReplacer) Replace(transformations string) (*string, error) + type NamedTransformationReplacerConfig struct + NamedTransformationStorage Storer + type NamedTransformations = map[string]NamedTransformation + type OverlaySinkerFunc = func() (media.Body, error) + type Parser struct + func NewParser() Parser + func (p *Parser) Parse(str string) ([]Transformation, error) + type Scaler struct + func NewScaler(opts ...ScalerOptions) *Scaler + func (r *Scaler) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error) + type ScalerConfig struct + CropStrategy CropStrategy + PadColor color.RGBA + Size types.Size + type ScalerFactory struct + func (f *ScalerFactory) Build(args map[string]string) (*Scaler, error) + type ScalerOptions func(*scalerOptions) + func WithCropStrategy(cropStrategy CropStrategy) ScalerOptions + func WithPadColor(padColor color.RGBA) ScalerOptions + func WithSize(size types.Size) ScalerOptions + type Storer interface + Delete func(name string) error + DeleteAll func() error + Get func(name string) (*NamedTransformation, error) + GetAll func() (NamedTransformations, error) + Save func(t NamedTransformation) error + type Transformation struct + Args map[string]string + Name string + func NewTransformation(c Transformation) Transformation + func (t *Transformation) IsSame(name string) bool + func (t *Transformation) ToString() string + type Watermarker struct + func NewWatermarker(c WatermarkerConfig) *Watermarker + func (w *Watermarker) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error) + type WatermarkerConfig struct + Anchor types.Anchor + OverlaySinker OverlaySinkerFunc + Padding int + Size types.Size + type WatermarkerFactory struct + func NewWatermarkerFactory(dataStorage media.FileStorer) WatermarkerFactory + func (f *WatermarkerFactory) Build(args map[string]string) (*Watermarker, error) + type WebpConverter struct + func NewWebpConverter() *WebpConverter + func (c *WebpConverter) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)