localstore

package
v0.0.0-...-6e85980 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFilehandle

func FromFilehandle(fh *os.File) (store.Stream, error)

FromFilehandle wraps an open FH into a gcode stream.

Types

type LocalStore

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

func New

func New(base string) *LocalStore

func (*LocalStore) ReadFile

func (ls *LocalStore) ReadFile(path, file string) (store.Stream, error)

ReadFile returns a gcode stream from a configured local store.

func (*LocalStore) UploadFile

func (ls *LocalStore) UploadFile(path, file string, r io.ReadCloser) error

type LocalStoreFile

type LocalStoreFile struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*LocalStoreFile) Close

func (lsf *LocalStoreFile) Close() error

func (*LocalStoreFile) Name

func (lsf *LocalStoreFile) Name() string

func (*LocalStoreFile) Pos

func (lsf *LocalStoreFile) Pos() int64

func (*LocalStoreFile) Read

func (lsf *LocalStoreFile) Read(b []byte) (int, error)

func (*LocalStoreFile) Size

func (lsf *LocalStoreFile) Size() int64

Jump to

Keyboard shortcuts

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