server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHeader = errors.New("invalid request header")
View Source
var ErrInvalidPath error = errors.New("invalid path")

Functions

func ShiftPath

func ShiftPath(pathIn string) (head, tail string)

ShiftPath splits off the front portion of the provided path into head and then returns the remainder in tail

Types

type Server

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

func NewServer

func NewServer(lib *library.Library, titledb *titledb.TitlesDB, settings *settings.Settings) *Server

func (*Server) GenerateVirtualFilePath

func (server *Server) GenerateVirtualFilePath(file library.FileOnDiskRecord, hostNameToUse string, useHTTPS bool) string

func (*Server) LookupVirtualFilePath

func (server *Server) LookupVirtualFilePath(path string) (uint64, uint32, error)

func (*Server) Run

func (server *Server) Run()

func (*Server) ServeHTTP

func (server *Server) ServeHTTP(res http.ResponseWriter, req *http.Request)

func (*Server) StartHTTP

func (server *Server) StartHTTP()

func (*Server) Stop

func (server *Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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