Documentation ¶
Index ¶
- func Marshal(v interface{}) ([]byte, error)
- func Unmarshal(d []byte, v interface{}) error
- type File
- type Message
- func (msg *Message) Del(key string)
- func (msg *Message) Get(key string) (value interface{}, ok bool)
- func (msg *Message) GetBodyBytes() (value []byte)
- func (msg *Message) GetBool(key string) (value bool, ok bool)
- func (msg *Message) GetBytes(key string) (value []byte, ok bool)
- func (msg *Message) GetFloat(key string) (value float64, ok bool)
- func (msg *Message) GetInt(key string) (value int64, ok bool)
- func (msg *Message) GetObjectID(key string) (value bson.ObjectId, ok bool)
- func (msg *Message) GetOrigin() string
- func (msg *Message) GetString(key string) (value string, ok bool)
- func (msg *Message) GetUser() bson.ObjectId
- func (msg *Message) HasOrigin() bool
- func (msg *Message) HasUser() bool
- func (msg *Message) OriginContains(s string) bool
- func (msg *Message) ParseHTTPRequest(r *http.Request, replyTo string, contextID string, ...) (*Message, error)
- func (msg *Message) Set(key string, value interface{})
- func (msg *Message) WriteHTTPResponse(rw http.ResponseWriter, response *Message)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct { //HTTP request mandatory fields Method string `json:"method,omitempty"` Path string `json:"path,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` //Internal request fields ReplyTo string `json:"replyTo,omitempty"` Node string `json:"node,omitempty"` ContextID string `json:"contextID,omitempty"` //Internal response fields StatusCode int `json:"statusCode,omitempty"` //Common fields Type string `json:"type,omitempty"` Header http.Header `json:"header,omitempty"` RawBody []byte `json:"rawBody,omitempty"` Body map[string]interface{} `json:"body,omitempty"` }
func NewFileMessage ¶
func NewJsonResponse ¶
func NewMessage ¶
func NewOrderStatusMessage ¶
func NewResponse ¶
NewResponse creates Response Message object.
func (*Message) GetBodyBytes ¶
func (*Message) GetObjectID ¶
func (*Message) OriginContains ¶
func (*Message) ParseHTTPRequest ¶
func (*Message) WriteHTTPResponse ¶
func (msg *Message) WriteHTTPResponse(rw http.ResponseWriter, response *Message)
Click to show internal directories.
Click to hide internal directories.