fileserver

package
v0.0.0-...-4ddc45b Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cons

type Cons func() (File, error)

type File

type File interface {
	Read(int64, []byte) (int, error)
	Write(int64, []byte) (int, error)
	Close() error
}

type FileMap

type FileMap map[string]Cons

type FileServer

type FileServer struct {
	neinp.NopP2000
	// contains filtered or unexported fields
}

func NewFileServer

func NewFileServer(files FileMap) *FileServer

func (*FileServer) Attach

func (s *FileServer) Attach(ctx context.Context, msg message.TAttach) (message.RAttach, error)

func (*FileServer) Clunk

func (s *FileServer) Clunk(ctx context.Context, msg message.TClunk) (message.RClunk, error)

func (*FileServer) Open

func (s *FileServer) Open(ctx context.Context, msg message.TOpen) (message.ROpen, error)

func (*FileServer) Read

func (s *FileServer) Read(ctx context.Context, msg message.TRead) (message.RRead, error)

func (*FileServer) Stat

func (s *FileServer) Stat(ctx context.Context, msg message.TStat) (message.RStat, error)

func (*FileServer) Version

func (s *FileServer) Version(ctx context.Context, msg message.TVersion) (message.RVersion, error)

func (*FileServer) Walk

func (s *FileServer) Walk(ctx context.Context, msg message.TWalk) (message.RWalk, error)

func (*FileServer) Write

func (s *FileServer) Write(ctx context.Context, msg message.TWrite) (message.RWrite, error)

Jump to

Keyboard shortcuts

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