mock

package
v0.0.0-...-ac34368 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationHeader = "Authorization"
)
View Source
const (
	HeaderCSRFToken = "X-csrf-token"
)

Variables

This section is empty.

Functions

func NewBasicAuthHandler

func NewBasicAuthHandler() *basicAuthHandler

func NewCsrfHandler

func NewCsrfHandler() *csrfHandler

func NewHeadersHandler

func NewHeadersHandler() *headersHandler

func NewOauthHandler

func NewOauthHandler() *oauthHandler

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