Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ImageTypes = map[string]vips.ImageType{ "gif": vips.ImageTypeGIF, "jpeg": vips.ImageTypeJPEG, "jpg": vips.ImageTypeJPEG, "png": vips.ImageTypePNG, "tiff": vips.ImageTypeTIFF, "webp": vips.ImageTypeWEBP, "heif": vips.ImageTypeHEIF, "svg": vips.ImageTypeSVG, "psd": vips.ImageTypePSD, }
ImageTypes defines the various image types supported by govips
View Source
var Version = "v0.0.0"
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DevelopmentMode bool
DebugMode bool
EtagAlgorithm string
EnvironmentConfig
}
type EdgeControl ¶
type EdgeControl struct {
DownstreamTtl int `env:"DIMS_EDGE_CONTROL_DOWNSTREAM_TTL" envDefault:"0"`
}
type EnvironmentConfig ¶
type EnvironmentConfig struct {
Timeout
EdgeControl
Signing
Error
OriginCacheControl
OutputFormat
Options
}
func ReadConfig ¶
func ReadConfig() EnvironmentConfig
type Image ¶
type Image struct {
Bytes []byte // The downloaded image.
Size int // The original image size in bytes.
Format string // The original image format.
Status int // The HTTP status code of the downloaded image.
CacheControl string // The cache headers from the downloaded image.
EdgeControl string // The edge control headers from the downloaded image.
LastModified string // The last modified header from the downloaded image.
Etag string // The etag header from the downloaded image.
}
type OriginCacheControl ¶
type OriginCacheControl struct {
UseOrigin bool `env:"DIMS_CACHE_CONTROL_USE_ORIGIN" envDefault:"false"`
Min int `env:"DIMS_CACHE_CONTROL_MIN" envDefault:"0"`
Max int `env:"DIMS_CACHE_CONTROL_MAX" envDefault:"0"`
Default int `env:"DIMS_CACHE_CONTROL_DEFAULT" envDefault:"31536000"`
Error int `env:"DIMS_CACHE_CONTROL_ERROR" envDefault:"60"`
}
type OutputFormat ¶
type StatusError ¶
func NewStatusError ¶
func NewStatusError(statusCode int, message string) *StatusError
func (*StatusError) Error ¶
func (e *StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.