s3backend

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicBackend

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

func NewDynamicBackend

func NewDynamicBackend(log zerolog.Logger) (*DynamicBackend, error)

func (*DynamicBackend) DeleteRoute added in v0.0.3

func (db *DynamicBackend) DeleteRoute(log zerolog.Logger, path string) *Route

func (*DynamicBackend) Open

func (db *DynamicBackend) Open(name string) (http.File, error)

func (*DynamicBackend) PrependRoute

func (db *DynamicBackend) PrependRoute(log zerolog.Logger, route Route)

func (*DynamicBackend) WithContext added in v0.0.3

func (db *DynamicBackend) WithContext(ctx context.Context) *DynamicBackend

type FSWithCtx added in v0.0.3

type FSWithCtx interface {
	http.FileSystem
	WithContext(ctx context.Context) FSWithCtx
}

type Route

type Route struct {
	Path string
	FS   FSWithCtx
}

type S3BackendImpl

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

func NewS3Backend

func NewS3Backend(ctx ctx.AppCtx, cache *ristretto.Cache, s3Cfg ctx.S3BackendConfig) (*S3BackendImpl, error)

func (*S3BackendImpl) Open

func (sss *S3BackendImpl) Open(name string) (http.File, error)

func (*S3BackendImpl) WithContext added in v0.0.3

func (sss *S3BackendImpl) WithContext(ctx context.Context) FSWithCtx

type S3CachedFile added in v0.0.3

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

func (*S3CachedFile) Close added in v0.0.3

func (s3f *S3CachedFile) Close() error

func (*S3CachedFile) Read added in v0.0.3

func (s3f *S3CachedFile) Read(p []byte) (n int, err error)

func (*S3CachedFile) Readdir added in v0.0.3

func (s3f *S3CachedFile) Readdir(count int) ([]fs.FileInfo, error)

func (*S3CachedFile) Seek added in v0.0.3

func (s3f *S3CachedFile) Seek(offset int64, whence int) (int64, error)

func (*S3CachedFile) Stat added in v0.0.3

func (s3f *S3CachedFile) Stat() (fs.FileInfo, error)

type S3DirectFile added in v0.0.3

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

func (*S3DirectFile) Close added in v0.0.3

func (s3f *S3DirectFile) Close() error

func (*S3DirectFile) Read added in v0.0.3

func (s3f *S3DirectFile) Read(p []byte) (n int, err error)

func (*S3DirectFile) Readdir added in v0.0.3

func (s3f *S3DirectFile) Readdir(count int) ([]fs.FileInfo, error)

func (*S3DirectFile) Seek added in v0.0.3

func (s3f *S3DirectFile) Seek(offset int64, whence int) (int64, error)

func (*S3DirectFile) Stat added in v0.0.3

func (s3f *S3DirectFile) Stat() (fs.FileInfo, error)

type S3FileInfo

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

func (*S3FileInfo) IsDir

func (s3fi *S3FileInfo) IsDir() bool

func (*S3FileInfo) ModTime

func (s3fi *S3FileInfo) ModTime() time.Time

func (*S3FileInfo) Mode

func (s3fi *S3FileInfo) Mode() fs.FileMode

func (*S3FileInfo) Name

func (s3fi *S3FileInfo) Name() string

func (*S3FileInfo) Size

func (s3fi *S3FileInfo) Size() int64

func (*S3FileInfo) Sys

func (s3fi *S3FileInfo) Sys() any

Jump to

Keyboard shortcuts

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