Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUninitializedBuffer = errors.New("uninitialized buffer")
ErrUninitializedBuffer is returned when *bytes.Buffer is nil
Functions ¶
This section is empty.
Types ¶
type BannerService ¶
type BannerService interface { Create(ctx context.Context, arg params.InsertBannerParamsItem) (*domain.Banner, error) CreateMany(ctx context.Context, arg params.InsertBannerParams) ([]*domain.Banner, error) First(ctx context.Context, arg params.FirstBannerParams) (*domain.Banner, error) Filter(ctx context.Context, arg params.FilterBannerParams) ([]*domain.Banner, error) Count(ctx context.Context, arg params.CountBannerParams) (int64, error) Update(ctx context.Context, arg params.UpdateBannerParams) (int64, error) Delete(ctx context.Context, arg params.DeleteBannerParams) (int64, error) DeleteUnused(ctx context.Context) (int64, error) CreateFromReader(ctx context.Context, arg params.CreateFromReaderImageParams) (*domain.Banner, error) }
func NewBannerService ¶
func NewBannerService( querier database.QuerierExtended, cacher cacher.Cacher, fs *fs.FileSystem, ) BannerService
type ImageService ¶
type ImageService interface { Banner() BannerService Poster() PosterService Thumbnail() ThumbnailService Processor() ProcessorService DeleteUnused(ctx context.Context) (*domain.UnusedImages, error) }
func NewImageService ¶
func NewImageService( banner BannerService, poster PosterService, thumbnail ThumbnailService, processor ProcessorService, ) ImageService
type PosterService ¶
type PosterService interface { Create(ctx context.Context, arg params.InsertPosterParamsItem) (*domain.Poster, error) CreateMany(ctx context.Context, arg params.InsertPosterParams) ([]*domain.Poster, error) First(ctx context.Context, arg params.FirstPosterParams) (*domain.Poster, error) Filter(ctx context.Context, arg params.FilterPosterParams) ([]*domain.Poster, error) Count(ctx context.Context, arg params.CountPosterParams) (int64, error) Update(ctx context.Context, arg params.UpdatePosterParams) (int64, error) Delete(ctx context.Context, arg params.DeletePosterParams) (int64, error) DeleteUnused(ctx context.Context) (int64, error) CreateFromReader(ctx context.Context, arg params.CreateFromReaderImageParams) (*domain.Poster, error) }
func NewPosterService ¶
func NewPosterService( querier database.QuerierExtended, cacher cacher.Cacher, fs *fs.FileSystem, ) PosterService
type ProcessorService ¶
type ProcessorService interface { DominantColour(ctx context.Context, reader io.Reader) *string ReadImage(ctx context.Context, uri string) (imageBytes []byte, err error) }
func NewProcessorService ¶
func NewProcessorService() ProcessorService
type ThumbnailService ¶
type ThumbnailService interface { Create(ctx context.Context, arg params.InsertThumbnailParamsItem) (*domain.Thumbnail, error) CreateMany(ctx context.Context, arg params.InsertThumbnailParams) ([]*domain.Thumbnail, error) First(ctx context.Context, arg params.FirstThumbnailParams) (*domain.Thumbnail, error) Filter(ctx context.Context, arg params.FilterThumbnailParams) ([]*domain.Thumbnail, error) Count(ctx context.Context, arg params.CountThumbnailParams) (int64, error) Update(ctx context.Context, arg params.UpdateThumbnailParams) (int64, error) Delete(ctx context.Context, arg params.DeleteThumbnailParams) (int64, error) DeleteUnused(ctx context.Context) (int64, error) CreateFromReader(ctx context.Context, arg params.CreateFromReaderImageParams) (*domain.Thumbnail, error) }
func NewThumbnailService ¶
func NewThumbnailService( querier database.QuerierExtended, cacher cacher.Cacher, fs *fs.FileSystem, ) ThumbnailService
Click to show internal directories.
Click to hide internal directories.