diff --git a/internal/imgcache/imgcache.go b/internal/imgcache/imgcache.go index 52ab00e..7e78f17 100644 --- a/internal/imgcache/imgcache.go +++ b/internal/imgcache/imgcache.go @@ -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"