Documentation ¶
Index ¶
- Constants
- type PhotoDBRepository
- func (r *PhotoDBRepository) Close()
- func (r *PhotoDBRepository) Connect(readOnly bool)
- func (r *PhotoDBRepository) CountPhotos(ctx context.Context) (int, error)
- func (r *PhotoDBRepository) CreateOrReplace(ctx context.Context, photo model.Photo) error
- func (r *PhotoDBRepository) Delete(ctx context.Context, path string) error
- func (r *PhotoDBRepository) DeleteAll(ctx context.Context) error
- func (r *PhotoDBRepository) DeleteAllPhotoInPath(ctx context.Context, path string) error
- func (r *PhotoDBRepository) Exists(ctx context.Context, hash string) bool
- func (r *PhotoDBRepository) Get(ctx context.Context, hash string) (model.Photo, error)
- func (r *PhotoDBRepository) List(ctx context.Context, page int32, pageSize int32) ([]model.Photo, error)
- func (r *PhotoDBRepository) ReadContent(ctx context.Context, hash string, reader repository.ImageReader) error
- func (r *PhotoDBRepository) ReadThumbnail(ctx context.Context, hash string, reader repository.ImageReader) error
- func (r *PhotoDBRepository) SetThumbnail(ctx context.Context, hash string, thumbnail []byte) error
Constants ¶
View Source
const BufferSize = 1024 * 1024 * 2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PhotoDBRepository ¶
type PhotoDBRepository struct { repository.PhotoRepository // contains filtered or unexported fields }
func New ¶
func New(localDb bool, photosPath string) *PhotoDBRepository
func (*PhotoDBRepository) Close ¶
func (r *PhotoDBRepository) Close()
func (*PhotoDBRepository) Connect ¶
func (r *PhotoDBRepository) Connect(readOnly bool)
func (*PhotoDBRepository) CountPhotos ¶ added in v0.6.0
func (r *PhotoDBRepository) CountPhotos(ctx context.Context) (int, error)
func (*PhotoDBRepository) CreateOrReplace ¶
func (*PhotoDBRepository) Delete ¶ added in v0.6.0
func (r *PhotoDBRepository) Delete(ctx context.Context, path string) error
func (*PhotoDBRepository) DeleteAll ¶ added in v0.6.0
func (r *PhotoDBRepository) DeleteAll(ctx context.Context) error
func (*PhotoDBRepository) DeleteAllPhotoInPath ¶ added in v0.6.0
func (r *PhotoDBRepository) DeleteAllPhotoInPath(ctx context.Context, path string) error
func (*PhotoDBRepository) Exists ¶
func (r *PhotoDBRepository) Exists(ctx context.Context, hash string) bool
func (*PhotoDBRepository) ReadContent ¶
func (r *PhotoDBRepository) ReadContent(ctx context.Context, hash string, reader repository.ImageReader) error
func (*PhotoDBRepository) ReadThumbnail ¶ added in v0.7.0
func (r *PhotoDBRepository) ReadThumbnail(ctx context.Context, hash string, reader repository.ImageReader) error
func (*PhotoDBRepository) SetThumbnail ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.