httpfile

package
v0.0.0-...-56cfde8 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFS = &FS{
	Client: http.DefaultClient,
}
View Source
var (
	ErrNotFound = os.ErrNotExist
)

Functions

func GetLength

func GetLength(url string) (ret int64, err error)

Returns the length of the resource in bytes.

Types

type FS

type FS struct {
	Client *http.Client
}

func (*FS) Delete

func (fs *FS) Delete(urlStr string) (err error)

func (*FS) GetLength

func (fs *FS) GetLength(url string) (ret int64, err error)

func (*FS) Open

func (fs *FS) Open(url string, flags int) (ret *File, err error)

func (*FS) OpenSectionReader

func (fs *FS) OpenSectionReader(url string, off, n int64) (ret io.ReadCloser, err error)

type File

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

func (*File) Close

func (me *File) Close() error

func (*File) Read

func (me *File) Read(b []byte) (n int, err error)

func (*File) Seek

func (me *File) Seek(offset int64, whence int) (ret int64, err error)

func (*File) Write

func (me *File) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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