resizer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name = dep.Name("image", "resizer")
	Task = task.Of(Name, ResizeImage)
)

Functions

This section is empty.

Types

type Input

type Input struct {
	InputPath  string `json:"inputPath" validate:"required,file"`
	OutputPath string `json:"outputPath" validate:"required,file"`
	OutMime    string `json:"outMime" validate:"required,oneof=jpeg jpg png"`
	NewWidth   int    `json:"newWidth" validate:"gt=0"`
	NewHeight  int    `json:"newHeight" validate:"gt=0"`
}

type Output

type Output struct {
	Size int `json:"size"`
}

func ResizeImage

func ResizeImage(ctx context.Context, args Input) (*Output, error)

Jump to

Keyboard shortcuts

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