server

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHeaders added in v0.5.0

func AddHeaders(headers HeaderList, next http.Handler) http.Handler

Types

type Handler

type Handler struct {
	http.Handler
}

Handler handles requests for the server

func NewHandler

func NewHandler(locations []config.Location) *Handler

NewHandler returns a Handler created by the slice of locations

type Header struct {
	Name  string
	Value string
}

type HeaderList added in v0.5.0

type HeaderList []Header

func (*HeaderList) Set added in v0.5.0

func (h *HeaderList) Set(value string) error

func (*HeaderList) String added in v0.5.0

func (h *HeaderList) String() string

type ZipHandler

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

ZipHandler implements http.Handler interface to serve contents of a zip file

func NewZipHandler

func NewZipHandler(zipfile string) *ZipHandler

func (*ZipHandler) GetFile

func (z *ZipHandler) GetFile(w http.ResponseWriter, r *http.Request)

GetFile acts as http.HandleFunc to serve contents of a zip file

Jump to

Keyboard shortcuts

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