http

package
v0.0.0-...-b9374fd Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

An Option is options func that can be set up when creating a new server.

func Routers

func Routers(routers ...Router) Option

Routers registers routers.

type Router

type Router func(*mux.Router)

Router route the service using github.com/gorilla/mux.

func OMDbRouter

func OMDbRouter(service omdb.Service) Router

OMDbRouter register omdb service to /omdb.

type Server

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

Server is an HTTP server for OMDb.

func NewServer

func NewServer(options ...Option) *Server

NewServer returns an OMDb server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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