response

package
v0.0.0-...-31f5ead Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	// Empty json tags because we need to omit those fields when generating the docs
	// and we do not plan to support json
	Payload []byte        `json:"-" msgpack:"payload"`
	Error   *oerror.Error `json:"-" msgpack:"error"`
}

Response from the service

func New

func New() *Response

New reponse

func (Response) GetError

func (r Response) GetError() *oerror.Error

GetError for res

func (*Response) ParsePayload

func (r *Response) ParsePayload(to interface{}) error

ParsePayload as type

func (*Response) SetError

func (r *Response) SetError(e *oerror.Error) interfaces.Response

SetError for response

func (*Response) SetPayload

func (r *Response) SetPayload(payload interface{}) error

SetPayload for type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳