data

package
v0.0.0-...-e462338 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func (*Storage) AllocateNewFile

func (s *Storage) AllocateNewFile(ctx context.Context, fileInfo *models.AllocatedFile) (id string, err error)

func (*Storage) AllocatedFileInfo

func (s *Storage) AllocatedFileInfo(ctx context.Context, id string) (info *models.AllocatedFile, err error)

func (*Storage) Close

func (s *Storage) Close(ctx context.Context) (err error)

func (*Storage) DeleteFile

func (s *Storage) DeleteFile(ctx context.Context, id string) error

func (*Storage) DownloadFile

func (s *Storage) DownloadFile(id string, stream io.Writer) error

func (*Storage) FileSize

func (s *Storage) FileSize(ctx context.Context, id string) (size int, err error)

func (*Storage) MarkAsUnused

func (s *Storage) MarkAsUnused(ctx context.Context, fileId string) error

func (*Storage) Open

func (s *Storage) Open() (err error)

func (*Storage) RemoveFromUnused

func (s *Storage) RemoveFromUnused(ctx context.Context, fileId string) error

func (*Storage) UnusedFiles

func (s *Storage) UnusedFiles(ctx context.Context, until, limit int64) (ids []string, err error)

func (*Storage) UpdateStats

func (s *Storage) UpdateStats(ctx context.Context, fileId string, inUse bool) (uses int, err error)

func (*Storage) UploadFileContent

func (s *Storage) UploadFileContent(id string, content io.Reader) (err error)

Jump to

Keyboard shortcuts

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