Documentation ¶
Index ¶
- type ImageStorage
- func (is *ImageStorage) GetRecordByID(ctx context.Context, id string) (*resize.Image, error)
- func (is *ImageStorage) ListUserRecords(ctx context.Context) ([]*model.ResizeResult, error)
- func (is *ImageStorage) RecordResizeResult(ctx context.Context, resizeResult resize.Result) (*model.ResizeResult, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageStorage ¶
type ImageStorage struct {
// contains filtered or unexported fields
}
ImageStorage encapsulates access to cloud and db It stores resize results transparently for user
func (*ImageStorage) GetRecordByID ¶
GetRecordByID acquires records of image resize process by ID
func (*ImageStorage) ListUserRecords ¶
func (is *ImageStorage) ListUserRecords(ctx context.Context) ([]*model.ResizeResult, error)
ListUserRecords shows list of resizes that are done by current user
func (*ImageStorage) RecordResizeResult ¶
func (is *ImageStorage) RecordResizeResult(ctx context.Context, resizeResult resize.Result) (*model.ResizeResult, error)
RecordResizeResult loads resized images to cloud and creates record about this operation in database
type Storage ¶
type Storage interface { RecordResizeResult(ctx context.Context, resizeResult resize.Result) (*model.ResizeResult, error) GetRecordByID(ctx context.Context, id string) (*resize.Image, error) ListUserRecords(ctx context.Context) ([]*model.ResizeResult, error) }
Storage encapsulates interaction of GraphQL with cloud with images and DB with resize records
Click to show internal directories.
Click to hide internal directories.