service

package
v0.0.0-...-bc40552 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxImageSize int
}

type ImagesStorageService

type ImagesStorageService interface {
	SaveImage(ctx context.Context, img []byte, category string) (string, error)
	GetImage(ctx context.Context, imageId string, category string) ([]byte, error)
	IsImageExist(ctx context.Context, imageId string, category string) (bool, error)
	DeleteImage(ctx context.Context, imageId string, category string) error
	RewriteImage(ctx context.Context, img []byte, imageId string, category string, createImageIfNotExist bool) (string, error)
}

func NewImagesStorageService

func NewImagesStorageService(logger *logrus.Logger,
	metrics Metrics,
	storage repository.ImageStorage,
	cfg Config) ImagesStorageService

type Metrics

type Metrics interface {
	IncBytesUploaded(bytesUploaded int)
}

Directories

Path Synopsis
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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