Documentation ¶
Index ¶
- Constants
- type Action
- type Response
- func NewErrorResponse(msg interface{}, data ...interface{}) (Response, error)
- func NewNoopResponse() (Response, error)
- func NewResponse(kind string, payload interface{}) Response
- func NewResponseWithIndex(kind string, payload interface{}, index uint64) (Response, error)
- func NewSuccessResponse(msg string, data ...interface{}) (Response, error)
- type Responser
Constants ¶
View Source
const ( KeepAlive = "INTERNAL_KEEP_ALIVE" ErrorNotification = "APP_ERROR_NOTIFICATION" SuccessNotification = "APP_SUCCESS_NOTIFICATION" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action represents a Redux action that is dispatched or received from the store via a websocket connection.
type Response ¶ added in v0.19.0
type Response struct {
// contains filtered or unexported fields
}
Response implementation
func NewErrorResponse ¶ added in v0.19.0
NewErrorResponse will return a Response with error message attached
func NewNoopResponse ¶ added in v1.0.0
func NewResponse ¶ added in v0.19.0
NewResponse will create a new Response instance
func NewResponseWithIndex ¶ added in v0.19.0
NewResponseWithIndex will create a new response with an action with Index value
func NewSuccessResponse ¶ added in v0.19.0
NewSuccessResponse will return a new Response with a Success message attached and no error
func (*Response) Actions ¶ added in v0.19.0
Actions will return all actions buffered in the response
func (*Response) AddError ¶ added in v0.19.0
func (r *Response) AddError(payload interface{})
AddError will append a new error action to the response
func (*Response) AddSuccess ¶ added in v0.19.0
func (r *Response) AddSuccess(payload interface{})
AddSuccess will append a new success action to the response
Click to show internal directories.
Click to hide internal directories.