bucketfs

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileServer

func NewFileServer(fs ContextFS) http.Handler

Types

type ContextFS

type ContextFS interface {
	fs.FS
	Context() context.Context
	WithContext(context.Context) ContextFS
}

func NewFS

func NewFS(bucket *blob.Bucket) ContextFS

type FS

type FS struct {
	*blob.Bucket
	// contains filtered or unexported fields
}

func (*FS) Context

func (f *FS) Context() context.Context

func (*FS) Open

func (f *FS) Open(name string) (fs.File, error)

func (*FS) WithContext

func (f *FS) WithContext(ctx context.Context) ContextFS

type File

type File struct {
	Path string
	*blob.Reader
}

func (*File) IsDir

func (f *File) IsDir() bool

func (*File) Mode

func (f *File) Mode() fs.FileMode

func (*File) Name

func (f *File) Name() string

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)

func (*File) Sys

func (f *File) Sys() any

Jump to

Keyboard shortcuts

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