server

package
v0.0.0-...-9c194b7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextMiddleware

func ContextMiddleware(ctx context.Context, inner http.Handler) http.Handler

setting the context

func LoggerMiddleware

func LoggerMiddleware(name string, inner http.Handler) http.Handler

func NewRouter

func NewRouter(ctx context.Context) *mux.Router

Types

type PingRequest

type PingRequest struct {
	BorgId string `json:"borgid"`
	Addr   string `json:"addr"`
}

type Response

type Response struct {
	BorgId  string `json:"borgid"`
	Message string `json:"message"`
}

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

type Routes

type Routes []Route

type Server

type Server struct {
	X, Y float64
}

func (*Server) ListenAndServe

func (v *Server) ListenAndServe(ctx context.Context, addr string)

Jump to

Keyboard shortcuts

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