http

package
v0.0.0-...-7d6f566 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestContext

func CreateTestContext() (*http.Context, *httptest.ResponseRecorder)

Types

type MockMiddleware

type MockMiddleware struct {
	mock.Mock
}

func (*MockMiddleware) AbortTransaction

func (t *MockMiddleware) AbortTransaction()

func (*MockMiddleware) AbortTransactionWithError

func (t *MockMiddleware) AbortTransactionWithError(err error)

func (*MockMiddleware) AbortTransactionWithStatus

func (t *MockMiddleware) AbortTransactionWithStatus(code int, jsonObj interface{})

func (*MockMiddleware) GetValue

func (t *MockMiddleware) GetValue(key string) interface{}

func (*MockMiddleware) IsAborted

func (t *MockMiddleware) IsAborted() bool

func (*MockMiddleware) NextHandler

func (t *MockMiddleware) NextHandler()

func (*MockMiddleware) SetValue

func (t *MockMiddleware) SetValue(key string, value interface{})

type MockReader

type MockReader struct {
	mock.Mock
}

func (*MockReader) GetFormData

func (m *MockReader) GetFormData(key string) (string, bool)

func (*MockReader) GetHeader

func (m *MockReader) GetHeader(key string) string

func (*MockReader) GetMethod

func (m *MockReader) GetMethod() string

func (*MockReader) GetParameter

func (m *MockReader) GetParameter(key string) string

func (*MockReader) GetUrl

func (m *MockReader) GetUrl() string

func (*MockReader) ReadBody

func (m *MockReader) ReadBody(obj interface{}) error

type MockWriter

type MockWriter struct {
	mock.Mock
}

func (*MockWriter) WriteJson

func (t *MockWriter) WriteJson(code int, obj interface{})

func (*MockWriter) WriteStatus

func (t *MockWriter) WriteStatus(code int)

func (*MockWriter) WriteString

func (t *MockWriter) WriteString(code int, format string, values ...interface{})

Jump to

Keyboard shortcuts

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