fileserver

package
v0.0.0-...-38a4c7e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error, w http.ResponseWriter)

ErrorHandler writes error content to the response and logs the error.

Types

type FileServer

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

FileServer is a struct that contains the necessary information to serve files.

var FileServerInstance FileServer

FileServerInstance is the main file server instance.

func (*FileServer) DeleteFileHandler

func (s *FileServer) DeleteFileHandler(w http.ResponseWriter, r *http.Request)

DeleteFileHandler is a function that handles DELETE requests.

func (*FileServer) EnsureDir

func (s *FileServer) EnsureDir(fileName string) error

func (*FileServer) GetFileHandler

func (s *FileServer) GetFileHandler(w http.ResponseWriter, r *http.Request)

GetFileHandler is a function that handles GET requests.

func (*FileServer) PostFileHandler

func (s *FileServer) PostFileHandler(w http.ResponseWriter, r *http.Request)

PostFileHandler is a function that handles POST requests.

func (*FileServer) Serve

func (s *FileServer) Serve()

Serve is a function that starts the file server.

func (*FileServer) SetupArgs

func (s *FileServer) SetupArgs(args argparse.Args)

SetupArgs is a function that sets up the arguments for the fileserver.

type Node

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

Node is a struct that contains the necessary information to connect to a node.

Jump to

Keyboard shortcuts

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