localfileserver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fileserver

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

func New

func New(dir string, sites []string, host, bucket map[string]string) *Fileserver

func (*Fileserver) Exists

func (f *Fileserver) Exists(ctx context.Context, bucket, name string) (bool, error)

func (*Fileserver) Read

func (f *Fileserver) Read(ctx context.Context, bucket, name string, writer io.Writer) (found bool, err error)

func (*Fileserver) Write

func (f *Fileserver) Write(ctx context.Context, bucket, name string, reader io.Reader, overwrite bool, contentType, cacheControl string) (saved bool, err error)

Jump to

Keyboard shortcuts

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