gateway

package
v0.0.0-...-6253e15 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidFile        error = errors.New("invalid file")
	ErrNotFound           error = errors.New("not found")
	ErrFailedToUploadFile error = errors.New("failed to upload file")
	ErrFileTooLarge       error = errors.New("file too large")
	ErrFailedToRemoveFile error = errors.New("failed to remove file")
)

Functions

This section is empty.

Types

type CMS

type CMS interface {
	NotifyAssetDecompressed(ctx context.Context, assetID string, status *asset.ArchiveExtractionStatus) error
}

type Container

type Container struct {
	File File
	CMS  CMS
}

func NewGateway

func NewGateway(f File, cms CMS) *Container

type File

type File interface {
	Read(ctx context.Context, path string) (ReadAtCloser, int64, int64, error)
	WriteProceeded(ctx context.Context, path string, proceeded int64) error
	Upload(ctx context.Context, name string) (io.WriteCloser, error)
}

type ReadAtCloser

type ReadAtCloser interface {
	io.ReaderAt
	io.Closer
}

Jump to

Keyboard shortcuts

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