infra_repository

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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) (uint32, error)

func (*PhotoDBRepository) CreateOrReplace

func (r *PhotoDBRepository) CreateOrReplace(ctx context.Context, photo model.Photo) error

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) Get

func (r *PhotoDBRepository) Get(ctx context.Context, hash string) (model.Photo, error)

func (*PhotoDBRepository) List

func (r *PhotoDBRepository) List(ctx context.Context, offset uint32, limit uint32) ([]model.Photo, error)

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, width uint32, height uint32, reader repository.ImageReader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL