Documentation ¶
Index ¶
- Constants
- func MakeCreateImagesPipeline1Transform1Filter(service ImageService) *pipe.Pipeline
- func MakeCreateImagesPipelineBoundedFilters(service ImageService) *pipe.Pipeline
- func MakeCreateImagesPipelineNTransform1Filter(service ImageService) *pipe.Pipeline
- func MakeGetAllImagesPipeline(service ImageService) *pipe.Pipeline
- func MakeGetImagePipeline(service ImageService) *pipe.Pipeline
- func NewImageService(db *sql.DB) *imageService
- type Base64EncodeWorker
- type CreateThumbnailWorker
- type GetMetadataWorker
- type Image
- type ImageBase64
- type ImageService
- type LoadFullWorker
- type LoadThumbnailWorker
- type PersistWorker
- type RemoveFullImageWorker
- type SaveMetadataWorker
- type TransformFileHeaderWorker
Constants ¶
View Source
const ( ThumbnailWidth = uint(200) ThumbnailHeight = uint(200) )
Variables ¶
This section is empty.
Functions ¶
func MakeCreateImagesPipeline1Transform1Filter ¶
func MakeCreateImagesPipeline1Transform1Filter(service ImageService) *pipe.Pipeline
func MakeCreateImagesPipelineBoundedFilters ¶
func MakeCreateImagesPipelineBoundedFilters(service ImageService) *pipe.Pipeline
func MakeCreateImagesPipelineNTransform1Filter ¶
func MakeCreateImagesPipelineNTransform1Filter(service ImageService) *pipe.Pipeline
func MakeGetAllImagesPipeline ¶
func MakeGetAllImagesPipeline(service ImageService) *pipe.Pipeline
func MakeGetImagePipeline ¶
func MakeGetImagePipeline(service ImageService) *pipe.Pipeline
func NewImageService ¶
Types ¶
type Base64EncodeWorker ¶
type Base64EncodeWorker struct { }
type CreateThumbnailWorker ¶
type CreateThumbnailWorker struct {
ImageService
}
type GetMetadataWorker ¶
type GetMetadataWorker struct {
ImageService
}
type Image ¶
type ImageBase64 ¶
type ImageBase64 struct { Id int `json:"id,omitempty"` Name string `json:"name"` FullBase64 string `json:"fullBase64,omitempty"` FullPath string `json:"fullPath"` Resolution image.Point `json:"resolution,omitempty"` ThumbnailBase64 string `json:"thumbnailBase64,omitempty"` ThumbnailPath string `json:"thumbnailPath"` }
func NewImageBase64 ¶
func NewImageBase64(img *Image) *ImageBase64
type ImageService ¶
type ImageService interface { CreateThumbnail(ctx context.Context, image *Image) error Persist(ctx context.Context, image *Image) error SaveMetadata(ctx context.Context, image *Image) error GetAllMetadata(ctx context.Context) (<-chan *Image, <-chan error, error) GetMetadata(ctx context.Context, imageIds []int) ([]*Image, error) LoadThumbnail(ctx context.Context, img *Image) error LoadFull(ctx context.Context, img *Image) error }
type LoadFullWorker ¶
type LoadFullWorker struct {
ImageService
}
type LoadThumbnailWorker ¶
type LoadThumbnailWorker struct {
ImageService
}
type PersistWorker ¶
type PersistWorker struct {
ImageService
}
type RemoveFullImageWorker ¶
type RemoveFullImageWorker struct { }
type SaveMetadataWorker ¶
type SaveMetadataWorker struct {
ImageService
}
Click to show internal directories.
Click to hide internal directories.