controller

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Images

type Images struct {
	img_storage_serv.UnimplementedImagesStorageServiceV1Server
	// contains filtered or unexported fields
}

func NewImagesStorageServiceHandler

func NewImagesStorageServiceHandler(
	logger log.Logger,
	service ImagesStorageService,
	maxImageSize int,
) Images

func (Images) DeleteImage

func (c Images) DeleteImage(ctx context.Context,
	in *img_storage_serv.ImageRequest) (res *emptypb.Empty, err error)

func (Images) GetImage

func (c Images) GetImage(ctx context.Context,
	in *img_storage_serv.ImageRequest) (res *httpbody.HttpBody, err error)

func (Images) IsImageExist

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

Jump to

Keyboard shortcuts

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