service

package
v0.0.0-...-9e351bc Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

type FileStorage interface {
	GetFileReader(ctx context.Context, fileID file.ID) (io.ReadCloser, error)
	UploadImageFile(ctx context.Context, reader io.Reader) ([]file.ImageSize, error)
	GetStorageType() file.StorageType
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewFileService

func NewFileService(storagesByPriority []FileStorage) *Service

func (*Service) Download

func (s *Service) Download(ctx context.Context, link file.Link) (io.ReadCloser, error)

func (*Service) UploadPhoto

func (s *Service) UploadPhoto(ctx context.Context, reader io.Reader) ([]file.ImageSize, error)

Jump to

Keyboard shortcuts

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