rest

package
v1.29.0-mobile.5 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 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 HijackOutput added in v1.27.0

type HijackOutput struct {
	Connection net.Conn
	ReadWriter *bufio.ReadWriter
	Error      error
}

type ResponseWriter

type ResponseWriter struct {
	HeaderInvocations      int
	HeaderStub             func() http.Header
	HeaderOutputs          []http.Header
	HeaderOutput           *http.Header
	WriteJsonInvocations   int
	WriteJsonInputs        []interface{}
	WriteJsonStub          func(object interface{}) error
	WriteJsonOutputs       []error
	WriteJsonOutput        *error
	EncodeJsonInvocations  int
	EncodeJsonInputs       []interface{}
	EncodeJsonStub         func(object interface{}) ([]byte, error)
	EncodeJsonOutputs      []EncodeJsonOutput
	EncodeJsonOutput       *EncodeJsonOutput
	WriteHeaderInvocations int
	WriteHeaderInputs      []int
	WriteHeaderStub        func(statusCode int)
	WriteInvocations       int
	WriteInputs            [][]byte
	WriteStub              func(bytes []byte) (int, error)
	WriteOutputs           []WriteOutput
	WriteOutput            *WriteOutput
	FlushInvocations       int
	FlushStub              func()
	CloseNotifyInvocations int
	CloseNotifyStub        func() <-chan bool
	CloseNotifyOutputs     []<-chan bool
	CloseNotifyOutput      *<-chan bool
	HijackInvocations      int
	HijackStub             func() (net.Conn, *bufio.ReadWriter, error)
	HijackOutputs          []HijackOutput
	HijackOutput           *HijackOutput
}

func NewResponseWriter

func NewResponseWriter() *ResponseWriter

func (*ResponseWriter) AssertOutputsEmpty added in v1.27.0

func (r *ResponseWriter) AssertOutputsEmpty()

func (*ResponseWriter) CloseNotify added in v1.27.0

func (r *ResponseWriter) CloseNotify() <-chan bool

func (*ResponseWriter) EncodeJson

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

func (*ResponseWriter) Flush added in v1.27.0

func (r *ResponseWriter) Flush()

func (*ResponseWriter) Header

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

func (*ResponseWriter) Hijack added in v1.27.0

func (r *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)

func (*ResponseWriter) Write added in v1.26.0

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

func (*ResponseWriter) WriteHeader

func (r *ResponseWriter) WriteHeader(statusCode 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