http

package
v1.21.12 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerMiddleware

func LoggerMiddleware(next http.Handler) http.Handler

func NewWrapResponseWriter

func NewWrapResponseWriter(w http.ResponseWriter) *responseWriter

Types

type Error

type Error struct {
	Topic  string
	Code   int
	Reason string
}

func Errorf

func Errorf(topic string, code int) Error

func (Error) String

func (p Error) String() string

func (Error) Title

func (p Error) Title() string

type ProjectsEmptyPage

type ProjectsEmptyPage struct {
	Topic string
}

func (ProjectsEmptyPage) String

func (p ProjectsEmptyPage) String() string

func (ProjectsEmptyPage) Title

func (p ProjectsEmptyPage) Title() string

type ProjectsHandler

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

func NewProjectsHandler

func NewProjectsHandler(t template.Renderer, pf josegpt.ProjectFinder) ProjectsHandler

func (ProjectsHandler) ServeHTTP

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

type ProjectsPage

type ProjectsPage struct {
	Topic    string
	Projects []*josegpt.Project
}

func (ProjectsPage) String

func (p ProjectsPage) String() string

func (ProjectsPage) Title

func (p ProjectsPage) Title() string

type Server

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

func NewServer

func NewServer(port uint, ps josegpt.ProjectService) (*Server, error)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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