Documentation ¶
Index ¶
- Constants
- type Builder
- type CropStrategy
- type ExifReader
- type GoogleTagger
- type GoogleTaggerConfig
- type MediaOptimization
- type NamedTransformation
- type NamedTransformationReplacer
- type NamedTransformationReplacerConfig
- type NamedTransformations
- type OverlaySinkerFunc
- type Parser
- type Scaler
- type ScalerConfig
- type ScalerFactory
- type ScalerOptions
- type Storer
- type Transformation
- type Watermarker
- type WatermarkerConfig
- 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
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) Run ¶
func (r *ExifReader) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type GoogleTagger ¶
type GoogleTagger struct { }
func NewGoogleTagger ¶
func NewGoogleTagger(c GoogleTaggerConfig) *GoogleTagger
func (*GoogleTagger) Run ¶
func (w *GoogleTagger) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type GoogleTaggerConfig ¶
type GoogleTaggerConfig struct { }
type MediaOptimization ¶
type MediaOptimization struct { }
func NewMediaOptimization ¶
func NewMediaOptimization() *MediaOptimization
func (*MediaOptimization) GetSteps ¶
func (o *MediaOptimization) GetSteps(contentType media.ContentType) ([]pipeline.Step, error)
type NamedTransformation ¶
type NamedTransformationReplacer ¶
type NamedTransformationReplacer struct {
// contains filtered or unexported fields
}
func NewNamedTransformationReplacer ¶
func NewNamedTransformationReplacer(c NamedTransformationReplacerConfig) NamedTransformationReplacer
type NamedTransformationReplacerConfig ¶
type NamedTransformationReplacerConfig struct {
NamedTransformationStorage Storer
}
type NamedTransformations ¶
type NamedTransformations = map[string]NamedTransformation
type OverlaySinkerFunc ¶
type Scaler ¶
type Scaler struct {
// contains filtered or unexported fields
}
func NewScaler ¶
func NewScaler(opts ...ScalerOptions) *Scaler
func (*Scaler) Run ¶
func (r *Scaler) Run(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() (NamedTransformations, 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(c WatermarkerConfig) *Watermarker
func (*Watermarker) Run ¶
func (w *Watermarker) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
type WatermarkerConfig ¶
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) Run ¶
func (c *WebpConverter) Run(ctx pipeline.PipelineCtx) (pipeline.PipelineCtx, error)
Click to show internal directories.
Click to hide internal directories.