Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SizeSmall = ThumbDimension{ MaxWidth: 320, MaxHeight: 240, } SizeMedium = ThumbDimension{ MaxWidth: 640, MaxHeight: 480, } SizeLarge = ThumbDimension{ MaxWidth: 1024, MaxHeight: 768, } )
Functions ¶
This section is empty.
Types ¶
type ConversionService ¶
type ConversionService struct {
// contains filtered or unexported fields
}
func NewConversionService ¶
func NewConversionService(logger logger.Logger, repository dataaccess.Repository, thumbnailIndex *Index) *ConversionService
type Index ¶
type Index struct { Thumbs map[string]Thumbs `json:"thumbs"` // contains filtered or unexported fields }
func EmptyIndex ¶
func EmptyIndex() *Index
func (*Index) GetThumbnailFilepath ¶
func (*Index) GetThumbnailFolder ¶
type Thumb ¶
type Thumb struct { Route string `json:"route"` Path string `json:"path"` Dimensions ThumbDimension `json:"dimensions"` }
func (Thumb) ThumbRoute ¶
type ThumbDimension ¶
func GetThumbnailDimensionsFromRoute ¶
func GetThumbnailDimensionsFromRoute(routeWithDimensions route.Route) (baseRoute route.Route, dimensions ThumbDimension)
func (ThumbDimension) String ¶
func (t ThumbDimension) String() string
type Thumbs ¶
func (Thumbs) GetThumbBySize ¶
func (thumbs Thumbs) GetThumbBySize(dimensions ThumbDimension) (Thumb, bool)
Click to show internal directories.
Click to hide internal directories.