mock

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationHeader = "Authorization"
)

Variables

This section is empty.

Functions

func NewBasicAuthHandler

func NewBasicAuthHandler() *basicAuthHandler

func NewHeadersHandler

func NewHeadersHandler() *headersHandler

func NewQueryParamsHandler

func NewQueryParamsHandler() *queryParamsHandler

func StatusOK

func StatusOK(w http.ResponseWriter, r *http.Request)

Types

type AppMockServer

type AppMockServer struct {
	http.Server
	// contains filtered or unexported fields
}

func NewAppMockServer

func NewAppMockServer(port int32) *AppMockServer

func (*AppMockServer) Kill

func (ams *AppMockServer) Kill() error

func (*AppMockServer) Start

func (ams *AppMockServer) Start()

type ErrorHandler

type ErrorHandler struct {
	Message string
	Code    int
}

func NewErrorHandler

func NewErrorHandler(code int, message string) *ErrorHandler

func (*ErrorHandler) ServeHTTP

func (eh *ErrorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ErrorResponse

type ErrorResponse struct {
	Code  int
	Error string
}

Jump to

Keyboard shortcuts

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