httpfs

package module
v0.0.0-...-6ad20e9 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 19 Imported by: 0

README

go-httpfs

Package httpfs provide a file-system over HTTP, for the Go programming language.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-httpfs

GoDoc

Import

To import package httpfs use import code like the following:

import "github.com/reiver/go-httpfs"

Installation

To install package httpfs do the following:

GOPROXY=direct go get github.com/reiver/go-httpfs

Author

Package httpfs was written by Charles Iliya Krempeaux

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathJoin

func PathJoin(root string, subpath string) (path string, ok bool)

PathJoin returns the path resulting from joining the root path and the sub-path.

Typcally the root-path is a directory on the file-system, and the sub-path comes from the HTTP request.

Types

type AuthorizerFunc

type AuthorizerFunc func(context.Context, *http.Request) (bool, error)

AuthorizerFunc is a function that return true if an HTTP request is authorized and returns false if it isn't.

See also:

type ReadWriterHandler

type ReadWriterHandler struct {
	RootDir               string
	AuthorizerFunc        AuthorizerFunc
	HTTPBodyReadSizeLimit int64
	HTTPBodyReadTimeOut   time.Duration
}

func (ReadWriterHandler) ServeHTTP

func (receiver ReadWriterHandler) ServeHTTP(responseWriter http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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