rest

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest() *rest.Request

Types

type EncodeJsonOutput

type EncodeJsonOutput struct {
	Bytes []byte
	Error error
}

type ResponseWriter

type ResponseWriter struct {
	*test.Mock
	HeaderImpl             http.Header
	WriteJsonInvocations   int
	WriteJsonInputs        []interface{}
	WriteJsonOutputs       []error
	EncodeJsonInvocations  int
	EncodeJsonInputs       []interface{}
	EncodeJsonOutputs      []EncodeJsonOutput
	WriteHeaderInvocations int
	WriteHeaderInputs      []int
	WriteInvocations       int
	WriteInputs            [][]byte
	WriteOutputs           []WriteOutput
}

func NewResponseWriter

func NewResponseWriter() *ResponseWriter

func (*ResponseWriter) EncodeJson

func (r *ResponseWriter) EncodeJson(object interface{}) ([]byte, error)

func (*ResponseWriter) Expectations

func (r *ResponseWriter) Expectations()

func (*ResponseWriter) Header

func (r *ResponseWriter) Header() http.Header

func (*ResponseWriter) Write added in v1.26.0

func (r *ResponseWriter) Write(data []byte) (int, error)

func (*ResponseWriter) WriteHeader

func (r *ResponseWriter) WriteHeader(code int)

func (*ResponseWriter) WriteJson

func (r *ResponseWriter) WriteJson(object interface{}) error

type WriteOutput added in v1.26.0

type WriteOutput struct {
	BytesWritten int
	Error        error
}

Jump to

Keyboard shortcuts

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