Documentation ¶
Index ¶
- Variables
- func NewImageCache(store libcache.Store) *libcache.Map[model.InternalID, modelchesed.Image]
- type Chesed
- func (c *Chesed) DownloadImage(ctx context.Context, id model.InternalID) (string, *errors.Error)
- func (c *Chesed) ListImages(ctx context.Context, paging model.Paging) ([]model.InternalID, int64, *errors.Error)
- func (c *Chesed) ScanImage(ctx context.Context)
- func (c *Chesed) SearchImages(ctx context.Context, paging model.Paging, keywords string) ([]model.InternalID, *errors.Error)
- func (c *Chesed) UploadImage(ctx context.Context, image modelchesed.Image, metadata modelbinah.FileMetadata) (string, *errors.Error)
- func (c *Chesed) UploadImageCallback(ctx context.Context, id model.InternalID) error
- type ChesedRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewChesed, NewImageCache, )
Functions ¶
func NewImageCache ¶
func NewImageCache( store libcache.Store, ) *libcache.Map[model.InternalID, modelchesed.Image]
Types ¶
type Chesed ¶
type Chesed struct {
// contains filtered or unexported fields
}
func NewChesed ¶
func NewChesed( repo ChesedRepo, cron *libcron.Cron, mClient mapper.LibrarianMapperServiceClient, pClient porter.LibrarianPorterServiceClient, sClient searcher.LibrarianSearcherServiceClient, miClient miner.LibrarianMinerServiceClient, block *modelbinah.ControlBlock, imageCache *libcache.Map[model.InternalID, modelchesed.Image], ) (*Chesed, error)
func (*Chesed) DownloadImage ¶ added in v0.1.4
func (*Chesed) ListImages ¶ added in v0.1.4
func (*Chesed) SearchImages ¶ added in v0.1.4
func (*Chesed) UploadImage ¶
func (c *Chesed) UploadImage(ctx context.Context, image modelchesed.Image, metadata modelbinah.FileMetadata) (string, *errors.Error)
func (*Chesed) UploadImageCallback ¶ added in v0.1.4
type ChesedRepo ¶
type ChesedRepo interface { CreateImage(context.Context, model.InternalID, *modelchesed.Image) error ListImages(context.Context, model.InternalID, model.Paging) ([]*modelchesed.Image, int64, error) ListImageNeedScan(context.Context) ([]*modelchesed.Image, error) SetImageStatus(context.Context, model.InternalID, modelchesed.ImageStatus) error GetImage(context.Context, model.InternalID, model.InternalID) (*modelchesed.Image, error) }
Click to show internal directories.
Click to hide internal directories.