handler

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTP

func NewHTTP(l *zap.Logger, repo *repo.Repo, opts ...HTTPOption) http.Handler

NewHTTP returns a shiny new web server

Types

type HTTP

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

func (*HTTP) ServeHTTP

func (h *HTTP) ServeHTTP(w http.ResponseWriter, r *http.Request)

type HTTPOption

type HTTPOption func(*HTTP)

func WithBasePath

func WithBasePath(v string) HTTPOption

type Route

type Route string

Route type

const (
	// RouteGetURIs get uris, many at once, to keep it fast
	RouteGetURIs Route = "getURIs"
	// RouteGetContent get (site) content
	RouteGetContent Route = "getContent"
	// RouteGetNodes get nodes
	RouteGetNodes Route = "getNodes"
	// RouteUpdate update repo
	RouteUpdate Route = "update"
	// RouteGetRepo get the whole repo
	RouteGetRepo Route = "getRepo"
)

type Socket

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

func NewSocket

func NewSocket(l *zap.Logger, repo *repo.Repo) *Socket

NewSocket returns a shiny new socket server

func (*Socket) Serve

func (h *Socket) Serve(conn net.Conn)

Jump to

Keyboard shortcuts

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