Add package and const block comments to imgcache
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Package imgcache provides interfaces and types for the image caching proxy.
|
||||
package imgcache
|
||||
|
||||
import (
|
||||
@@ -7,9 +8,10 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ImageFormat represents supported output image formats
|
||||
// ImageFormat represents supported output image formats.
|
||||
type ImageFormat string
|
||||
|
||||
// Supported image output formats.
|
||||
const (
|
||||
FormatOriginal ImageFormat = "orig"
|
||||
FormatJPEG ImageFormat = "jpeg"
|
||||
@@ -30,9 +32,10 @@ func (s Size) OriginalSize() bool {
|
||||
return s.Width == 0 && s.Height == 0
|
||||
}
|
||||
|
||||
// FitMode represents how to fit image into requested dimensions
|
||||
// FitMode represents how to fit image into requested dimensions.
|
||||
type FitMode string
|
||||
|
||||
// Supported image fit modes.
|
||||
const (
|
||||
FitCover FitMode = "cover"
|
||||
FitContain FitMode = "contain"
|
||||
@@ -89,9 +92,10 @@ type ImageResponse struct {
|
||||
CacheStatus CacheStatus
|
||||
}
|
||||
|
||||
// CacheStatus indicates whether the response was served from cache
|
||||
// CacheStatus indicates whether the response was served from cache.
|
||||
type CacheStatus string
|
||||
|
||||
// Cache status values for response headers.
|
||||
const (
|
||||
CacheHit CacheStatus = "HIT"
|
||||
CacheMiss CacheStatus = "MISS"
|
||||
|
||||
Reference in New Issue
Block a user