server

package
v0.0.0-...-02222d8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultJWTSecret = "anythingbutthisplease"
)

Variables

This section is empty.

Functions

func WithLogging

func WithLogging() func(http.Handler) http.Handler

Types

type Exception

type Exception struct {
	Message string `json:"message"`
}

type Server

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

func NewServer

func NewServer(jwtKey string) *Server

func (*Server) GetServerWithMiddleware

func (s *Server) GetServerWithMiddleware() http.Handler

GetServerWithMiddleware returns the server with middleware applied.

func (*Server) ServeHTTP

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

func (*Server) Use

func (s *Server) Use(middleware func(http.Handler) http.Handler) error

Use adds middleware.

Jump to

Keyboard shortcuts

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