service

package
v0.0.0-...-e5cbba9 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidKey    = errors.New("invalid key")
	ErrNotFound      = errors.New("not found")
	ErrDuplicateFile = errors.New("file already exists on path")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	Create(ctx context.Context, user, size int, name, path, contentType string, file io.Reader, overwrite bool) (*entity.File, error)
	Get(ctx context.Context, id string) (*entity.File, error)
	GetByUser(ctx context.Context, user int, prefix string) ([]*entity.File, error)
	Delete(ctx context.Context, key string) error
	Move(ctx context.Context, user int, id, newPath string, overwrite bool) (*entity.File, error)
}

func NewS3Service

func NewS3Service(client storage.S3Client) Service

Jump to

Keyboard shortcuts

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