Documentation ¶
Index ¶
- type ResponseObject
- func (ro *ResponseObject) Bytes() []byte
- func (ro *ResponseObject) Close() error
- func (ro *ResponseObject) Fail()
- func (ro *ResponseObject) Flush()
- func (ro *ResponseObject) GetObjects() []*ResponseObject
- func (ro *ResponseObject) GetStorableContent() string
- func (ro *ResponseObject) Header() http.Header
- func (ro *ResponseObject) Read(p []byte) (int, error)
- func (ro *ResponseObject) SetName(name string)
- func (ro *ResponseObject) SetPreWriteCallback(fn func())
- func (ro *ResponseObject) Size() int
- func (ro *ResponseObject) String() string
- func (ro *ResponseObject) Success()
- func (ro *ResponseObject) Write(p []byte) (int, error)
- func (ro *ResponseObject) WriteHeader(statusCode int)
- func (ro *ResponseObject) WriteObject(object *ResponseObject) error
- type ResponseObjectType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseObject ¶
type ResponseObject struct { Name string `json:"name"` Data []byte `json:"payload"` Type ResponseObjectType `json:"type"` Result bool `json:"result"` HTTPHeader http.Header HTTPStatusCode int // contains filtered or unexported fields }
func NewResponseObject ¶
func NewResponseObject(objectType ResponseObjectType) *ResponseObject
func (*ResponseObject) Bytes ¶
func (ro *ResponseObject) Bytes() []byte
func (*ResponseObject) Close ¶
func (ro *ResponseObject) Close() error
func (*ResponseObject) Fail ¶
func (ro *ResponseObject) Fail()
func (*ResponseObject) Flush ¶
func (ro *ResponseObject) Flush()
func (*ResponseObject) GetObjects ¶
func (ro *ResponseObject) GetObjects() []*ResponseObject
func (*ResponseObject) GetStorableContent ¶
func (ro *ResponseObject) GetStorableContent() string
func (*ResponseObject) Header ¶
func (ro *ResponseObject) Header() http.Header
func (*ResponseObject) SetName ¶
func (ro *ResponseObject) SetName(name string)
func (*ResponseObject) SetPreWriteCallback ¶
func (ro *ResponseObject) SetPreWriteCallback(fn func())
func (*ResponseObject) Size ¶
func (ro *ResponseObject) Size() int
func (*ResponseObject) String ¶
func (ro *ResponseObject) String() string
func (*ResponseObject) Success ¶
func (ro *ResponseObject) Success()
func (*ResponseObject) WriteHeader ¶
func (ro *ResponseObject) WriteHeader(statusCode int)
func (*ResponseObject) WriteObject ¶
func (ro *ResponseObject) WriteObject(object *ResponseObject) error
type ResponseObjectType ¶
type ResponseObjectType string
const ( Text ResponseObjectType = "text" Image ResponseObjectType = "image" Audio ResponseObjectType = "audio" )
Click to show internal directories.
Click to hide internal directories.