job

package
v0.0.0-...-06fc2c1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EnableOutputAnimatedGIF uint64 = 1 << iota
	EnableOutputAnimatedWEBP
	EnableOutputAnimatedAVIF
	EnableOutputStaticWEBP
	EnableOutputStaticAVIF
	EnableOutputStaticPNG
	EnableOutputAnimated
	EnableOutputAnimatedThumbanils
	AllSettings uint64 = (1 << iota) - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name        string        `json:"name"`
	Size        int           `json:"size"`
	ContentType string        `json:"content_type"`
	Animated    bool          `json:"animated"`
	TimeTaken   time.Duration `json:"time_taken"`
	Width       int           `json:"width"`
	Height      int           `json:"height"`
}

type ImageSize

type ImageSize struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

type ImageVariant

type ImageVariant struct {
	Name   string `json:"name"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

type Job

type Job struct {
	ID string `json:"id"`

	AspectRatioXY []int                `json:"aspect_ratio_xy"`
	Sizes         map[string]ImageSize `json:"sizes"`
	Settings      uint64               `json:"settings"`

	RawProvider           RawProvider         `json:"raw_provider"`
	RawProviderDetails    jsoniter.RawMessage `json:"raw_provider_details"`
	ResultConsumer        ResultConsumer      `json:"result_consumer"`
	ResultConsumerDetails jsoniter.RawMessage `json:"result_consumer_details"`
}

type RawProvider

type RawProvider string
const (
	AwsProvider   RawProvider = "aws"
	LocalProvider RawProvider = "local"
)

type RawProviderDetailsAws

type RawProviderDetailsAws struct {
	Bucket string `json:"bucket"`
	Key    string `json:"key"`
}

type RawProviderDetailsLocal

type RawProviderDetailsLocal struct {
	Path string `json:"path"`
}

type ResultConsumer

type ResultConsumer string
const (
	AwsConsumer   ResultConsumer = "aws"
	LocalConsumer ResultConsumer = "local"
)

type ResultConsumerDetailsAws

type ResultConsumerDetailsAws struct {
	Bucket    string `json:"bucket"`
	KeyFolder string `json:"key_folder"`
}

type ResultConsumerDetailsLocal

type ResultConsumerDetailsLocal struct {
	PathFolder string `json:"path_folder"`
}

Jump to

Keyboard shortcuts

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