Documentation ¶
Index ¶
- Constants
- type Device
- type DeviceCapn
- func (s DeviceCapn) CreateTs() int64
- func (s DeviceCapn) DeviceType() (string, error)
- func (s DeviceCapn) DeviceTypeBytes() ([]byte, error)
- func (s DeviceCapn) DisplayName() (string, error)
- func (s DeviceCapn) DisplayNameBytes() ([]byte, error)
- func (s DeviceCapn) HasDeviceType() bool
- func (s DeviceCapn) HasDisplayName() bool
- func (s DeviceCapn) HasId() bool
- func (s DeviceCapn) HasIdentifier() bool
- func (s DeviceCapn) HasUserID() bool
- func (s DeviceCapn) Id() (string, error)
- func (s DeviceCapn) IdBytes() ([]byte, error)
- func (s DeviceCapn) Identifier() (string, error)
- func (s DeviceCapn) IdentifierBytes() ([]byte, error)
- func (s DeviceCapn) IsHuman() bool
- func (s DeviceCapn) LastActiveTs() int64
- func (s DeviceCapn) SetCreateTs(v int64)
- func (s DeviceCapn) SetDeviceType(v string) error
- func (s DeviceCapn) SetDisplayName(v string) error
- func (s DeviceCapn) SetId(v string) error
- func (s DeviceCapn) SetIdentifier(v string) error
- func (s DeviceCapn) SetIsHuman(v bool)
- func (s DeviceCapn) SetLastActiveTs(v int64)
- func (s DeviceCapn) SetUserID(v string) error
- func (s DeviceCapn) String() string
- func (s DeviceCapn) UserID() (string, error)
- func (s DeviceCapn) UserIDBytes() ([]byte, error)
- type DeviceCapn_List
- type DeviceCapn_Promise
- type IRoutableMsg
- type InputMsg
- type InputMsgCapn
- func (s InputMsgCapn) Device() (DeviceCapn, error)
- func (s InputMsgCapn) HasDevice() bool
- func (s InputMsgCapn) HasPayload() bool
- func (s InputMsgCapn) MsgType() int32
- func (s InputMsgCapn) NewDevice() (DeviceCapn, error)
- func (s InputMsgCapn) Payload() ([]byte, error)
- func (s InputMsgCapn) Reply() int64
- func (s InputMsgCapn) SetDevice(v DeviceCapn) error
- func (s InputMsgCapn) SetMsgType(v int32)
- func (s InputMsgCapn) SetPayload(v []byte) error
- func (s InputMsgCapn) SetReply(v int64)
- func (s InputMsgCapn) String() string
- type InputMsgCapn_List
- type InputMsgCapn_Promise
- type JSONArr
- type JSONMap
- type MatrixError
- type OutputMsg
- type OutputMsgCapn
- func (s OutputMsgCapn) Body() ([]byte, error)
- func (s OutputMsgCapn) BodyFormat() int64
- func (s OutputMsgCapn) Code() int64
- func (s OutputMsgCapn) HasBody() bool
- func (s OutputMsgCapn) HasHeaders() bool
- func (s OutputMsgCapn) Headers() ([]byte, error)
- func (s OutputMsgCapn) MsgType() int32
- func (s OutputMsgCapn) Reply() int64
- func (s OutputMsgCapn) SetBody(v []byte) error
- func (s OutputMsgCapn) SetBodyFormat(v int64)
- func (s OutputMsgCapn) SetCode(v int64)
- func (s OutputMsgCapn) SetHeaders(v []byte) error
- func (s OutputMsgCapn) SetMsgType(v int32)
- func (s OutputMsgCapn) SetReply(v int64)
- func (s OutputMsgCapn) String() string
- type OutputMsgCapn_List
- type OutputMsgCapn_Promise
- type RawBytes
- type RespMessage
Constants ¶
const ( MSG_GET_VERSIONS int32 = 0x00000000 MSG_RESP_MESSAGE int32 = 0x00000100 MSG_RESP_ERROR int32 = 0x00000101 MSG_GET_LOGIN int32 = 0x00010000 MSG_GET_LOGIN_ADMIN int32 = 0x00010001 MSG_POST_LOGIN int32 = 0x00010102 MSG_POST_LOGIN_ADMIN int32 = 0x00010103 MSG_POST_LOGOUT int32 = 0x00010202 MSG_POST_LOGOUT_ALL int32 = 0x00010302 MSG_POST_REGISTER int32 = 0x00020002 MSG_POST_REGISTER_LEGACY int32 = 0x00020003 MSG_POST_REGISTER_EMAIL int32 = 0x00020102 MSG_POST_REGISTER_MSISDN int32 = 0x00020202 MSG_POST_ACCOUT_PASS int32 = 0x00020302 MSG_POST_ACCOUT_PASS_EMAIL int32 = 0x00020402 MSG_POST_ACCOUT_PASS_MSISDN int32 = 0x00020502 MSG_POST_ACCOUNT_DEACTIVATE int32 = 0x00020602 MSG_GET_REGISTER_AVAILABLE int32 = 0x00020700 MSG_GET_ACCOUNT_3PID int32 = 0x00030000 MSG_POST_ACCOUNT_3PID int32 = 0x00030102 MSG_POST_ACCOUNT_3PID_DEL int32 = 0x00030202 MSG_POST_ACCOUNT_3PID_EMAIL int32 = 0x00030302 MSG_POST_ACCOUNT_3PID_MSISDN int32 = 0x00030402 MSG_GET_ACCOUNT_WHOAMI int32 = 0x00040000 MSG_POST_USER_FILTER int32 = 0x00050002 MSG_GET_USER_FILTER_WITH_ID int32 = 0x00050100 MSG_GET_SYNC int32 = 0x00060000 MSG_GET_EVENTS int32 = 0x00060100 MSG_GET_INITIAL_SYNC int32 = 0x00060200 MSG_GET_EVENTS_WITH_ID int32 = 0x00060300 MSG_GET_ROOM_EVENT_WITH_ID int32 = 0x00070000 MSG_GET_ROOM_EVENT_WITH_TYPE_AND_KEY int32 = 0x00070100 MSG_GET_ROOM_EVENT_WITH_TYPE int32 = 0x00070200 MSG_GET_ROOM_STATE int32 = 0x00070300 MSG_GET_ROOM_MEMBERS int32 = 0x00070400 MSG_GET_ROOM_JOIN_MEMBERS int32 = 0x00070500 MSG_GET_ROOM_MESSAGES int32 = 0x00070600 MSG_GET_ROOM_INITIAL_SYNC int32 = 0x00070700 MSG_POST_ROOM_INFO int32 = 0x00070602 MSG_INTERNAL_POST_ROOM_INFO int32 = 0x00070802 MSG_PUT_ROOM_STATE_WITH_TYPE_AND_KEY int32 = 0x00080001 MSG_PUT_ROOM_STATE_WITH_TYPE int32 = 0x00080101 MSG_PUT_ROOM_SEND_WITH_TYPE_AND_TXNID int32 = 0x00080201 MSG_PUT_ROOM_REDACT int32 = 0x00090001 MSG_PUT_ROOM_REDACT_WITH_TXNID int32 = 0x00090002 MSG_PUT_ROOM_UPDATE int32 = 0x00090003 MSG_PUT_ROOM_UPDATE_WITH_TXNID int32 = 0x00090004 MSG_POST_CREATEROOM int32 = 0x000a0002 MSG_PUT_DIRECTORY_ROOM_ALIAS int32 = 0x000b0001 MSG_GET_DIRECTORY_ROOM_ALIAS int32 = 0x000b0100 MSG_DEL_DIRECTORY_ROOM_ALIAS int32 = 0x000b0203 MSG_GET_JOIN_ROOMS int32 = 0x000c0000 MSG_POST_ROOM_INVITE int32 = 0x000d0002 MSG_POST_ROOM_MEMBERSHIP int32 = 0x000d0102 MSG_POST_JOIN_ALIAS int32 = 0x000d0202 MSG_POST_ROOM_LEAVE int32 = 0x000e0002 MSG_POST_ROOM_FORGET int32 = 0x000e0102 MSG_POST_ROOM_KICK int32 = 0x000e0202 MSG_POST_ROOM_DISMISS int32 = 0x000e0302 MSG_POST_ROOM_BAN int32 = 0x000f0202 MSG_POST_ROOM_UNBAN int32 = 0x000f0302 MSG_GET_DIRECTORY_LIST_ROOM int32 = 0x00100000 MSG_PUT_DIRECTORY_LIST_ROOM int32 = 0x00100101 MSG_GET_PUBLIC_ROOMS int32 = 0x00100200 MSG_POST_PUBLIC_ROOMS int32 = 0x00100302 MSG_POST_USER_DIRECTORY_SEARCH int32 = 0x00110002 MSG_PUT_PROFILE_DISPLAY_NAME int32 = 0x00120001 MSG_GET_PROFILE_DISPLAY_NAME int32 = 0x00120100 MSG_PUT_PROFILE_AVATAR int32 = 0x00120201 MSG_GET_PROFILE_AVATAR int32 = 0x00120300 MSG_GET_PROFILE int32 = 0x00120400 MSG_POST_PROFILES int32 = 0x00120500 MSG_GET_USER_INFO int32 = 0x00120600 MSG_PUT_USER_INFO int32 = 0x00120601 MSG_POST_USER_INFO int32 = 0x00120602 MSG_DELETE_USER_INFO int32 = 0x00120603 MSG_GET_TURN_SERVER int32 = 0x00130000 MSG_PUT_TYPING int32 = 0x00140001 MSG_POST_RECEIPT int32 = 0x00150002 MSG_POST_READMARK int32 = 0x00160002 MSG_GET_UNREAD int32 = 0x00160102 MSG_PUT_USR_PRESENCE int32 = 0x00170001 MSG_GET_USR_PRESENCE int32 = 0x00170100 MSG_POST_USR_LIST_PRESENCE int32 = 0x00170201 MSG_GET_USR_LIST_PRESENCE int32 = 0x00170300 MSG_POST_MEDIA_UPLOAD int32 = 0x00180002 MSG_GET_MEDIA_DOWNLOAD int32 = 0x00180100 MSG_GET_MEDIA_DOWNLOAD_BY_NAME int32 = 0x00180200 MSG_GET_MEDIA_THUMBNAIL int32 = 0x00180300 MSG_GET_MEDIA_PREVIEW_URL int32 = 0x00180400 MSG_GET_MEDIA_CONFIG int32 = 0x00180500 MSG_PUT_SENT_TO_DEVICE int32 = 0x00190001 MSG_POST_REPORT_ROOM int32 = 0x00190010 MSG_POST_REPORT_DEVICE_STATE int32 = 0x00190100 MSG_GET_DEVICES int32 = 0x001a0000 MSG_GET_DEVICES_BY_ID int32 = 0x001a0100 MSG_PUT_DEVICES_BY_ID int32 = 0x001a0201 MSG_DEL_DEVICES_BY_ID int32 = 0x001a0303 MSG_POST_DEL_DEVICES int32 = 0x001a0402 MSG_POST_KEYS_UPLOAD_BY_DEVICE_ID int32 = 0x001b0002 MSG_POST_KEYS_UPLOAD int32 = 0x001b0052 MSG_POST_KEYS_QUERY int32 = 0x001b0102 MSG_POST_KEYS_CLAIM int32 = 0x001b0202 MSG_GET_KEYS_CHANGES int32 = 0x001b0300 MSG_GET_VISIBILITY_RANGE int32 = 0x001b1000 MSG_GET_PUSHERS int32 = 0x001c0000 MSG_POST_PUSHERS int32 = 0x001c0102 MSG_GET_NOTIFICATIONS int32 = 0x001d0000 MSG_GET_PUSHRULES int32 = 0x001e0000 MSG_GET_PUSHRULES_GLOBAL int32 = 0x001e0050 MSG_GET_PUSHRULES_BY_ID int32 = 0x001e0100 MSG_DEL_PUSHRULES_BY_ID int32 = 0x001e0203 MSG_PUT_PUSHRULES_BY_ID int32 = 0x001e0301 MSG_GET_PUSHRULES_ENABLED int32 = 0x001e0400 MSG_PUT_PUSHRULES_ENABLED int32 = 0x001e0501 MSG_GET_PUSHRULES_ACTIONS int32 = 0x001e0600 MSG_PUT_PUSHRULES_ACTIONS int32 = 0x001e0701 MSG_POST_USERS_PUSH_KEY int32 = 0x001e0801 MSG_POST_SEARCH int32 = 0x001f0002 MSG_GET_ROOM_TAG_BY_ID int32 = 0x00200000 MSG_PUT_ROOM_TAG_BY_ID int32 = 0x00200101 MSG_DEL_ROOM_TAG_BY_ID int32 = 0x00200203 MSG_PUT_USER_ACCOUNT_DATA int32 = 0x00210001 MSG_PUT_ROOM_ACCOUNT_DATA int32 = 0x00210101 MSG_GET_USER_NEW_TOKEN int32 = 0x00210201 MSG_GET_SUPER_ADMIN_TOKEN int32 = 0x00210301 MSG_GET_WHO_IS int32 = 0x00220001 MSG_GET_ROOM_EVENT_CONTEXT int32 = 0x00230001 MSG_GET_CAS_LOGIN_REDIRECT int32 = 0x00240001 MSG_GET_CAS_LOGIN_TICKET int32 = 0x00240101 MSG_POST_ROOM_REPORT int32 = 0x00250002 MSG_GET_THIRDPARTY_PROTOS int32 = 0x00260001 MSG_GET_THIRDPARTY_PROTO_BY_NAME int32 = 0x00260101 MSG_GET_THIRDPARTY_LOCATION_BY_PROTO int32 = 0x00260201 MSG_GET_THIRDPARTY_USER_BY_PROTO int32 = 0x00260301 MSG_GET_THIRDPARTY_LOCATION int32 = 0x00260401 MSG_GET_THIRDPARTY_USER int32 = 0x00260501 MSG_POST_USER_OPENID int32 = 0x00270002 MSG_POST_SYSTEM_MANAGER int32 = 0x00280001 MSG_GET_FED_VER int32 = 0x00290001 MSG_GET_FED_DIRECTOR int32 = 0x00290101 MSG_GET_FED_PROFILE int32 = 0x00290201 MSG_PUT_FED_SEND int32 = 0x00290301 MSG_PUT_FED_INVITE int32 = 0x00290401 MSG_GET_FED_ROOM_STATE int32 = 0x00290501 MSG_GET_FED_BACKFILL int32 = 0x00290601 MSG_GET_FED_MISSING_EVENTS int32 = 0x00290611 MSG_GET_FED_MEDIA_DOWNLOAD int32 = 0x00290701 MSG_GET_FED_MEDIA_INFO int32 = 0x00290801 MSG_GET_FED_USER_INFO int32 = 0x00290901 MSG_GET_FED_MAKE_JOIN int32 = 0x00291901 MSG_PUT_FED_SEND_JOIN int32 = 0x00292001 MSG_GET_FED_MAKE_LEAVE int32 = 0x00293901 MSG_PUT_FED_SEND_LEAVE int32 = 0x00294001 MSG_GET_FED_EVENT_AUTH int32 = 0x00294101 MSG_POST_FED_QUERY_AUTH int32 = 0x00294201 MSG_GET_FED_EVENT int32 = 0x00294301 MSG_GET_FED_STATE_IDS int32 = 0x00294401 MSG_GET_FED_PUBLIC_ROOMS int32 = 0x00294501 MSG_POST_FED_PUBLIC_ROOMS int32 = 0x00294601 MSG_GET_FED_USER_DEVICES int32 = 0x00294701 MSG_GET_FED_CLIENT_KEYS int32 = 0x00294801 MSG_GET_FED_CLIENT_KEYS_CLAIM int32 = 0x00294901 MSG_PUT_FED_EXCHANGE_THIRD_PARTY_INVITE int32 = 0x00294901 MSG_GET_SETTING int32 = 0x00300001 MSG_PUT_SETTING int32 = 0x00300101 MSG_POST_SERVERNAME int32 = 0x00300002 MSG_GET_SERVERNAME int32 = 0x00300102 MSG_POST_REPORT_MISSING int32 = 0x00300202 MSG_POST_NOTARY_NOTICE int32 = 0x00400001 MSG_GET_RCS_FRIENDSHIPS int32 = 0x00500000 MSG_GET_RCS_ROOMID int32 = 0x00500100 )
最低byte表示调用方式,最高2byte为分类,中间byte为业务类型 0x00 --get 0x01 --put 0x02 --post 0x03 --del
const ( NONE_FORMAT = iota CAPN_FORMAT JSON_FORMAT )
const DeviceCapn_TypeID = 0xa8785d0d098fe93f
DeviceCapn_TypeID is the unique identifier for the type DeviceCapn.
const (
HTTP_RESP_DISCARD int = -100
)
const InputMsgCapn_TypeID = 0xa87a004f4cc80d69
InputMsgCapn_TypeID is the unique identifier for the type InputMsgCapn.
const MAX_PARTITION = 16
const OutputMsgCapn_TypeID = 0x909a87a85b9a186d
OutputMsgCapn_TypeID is the unique identifier for the type OutputMsgCapn.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { ID string `json:"id,omitempty"` UserID string `json:"user_id,omitempty"` DisplayName string `json:"display_name,omitempty"` DeviceType string `json:"device_type,omitempty"` IsHuman bool `json:"is_human,omitempty"` Identifier string `json:"identifier,omitempty"` CreateTs int64 `json:"create_ts,omitempty"` LastActiveTs int64 `json:"last_active_ts,omitempty"` }
Device represents a client's device (mobile, web, etc)
type DeviceCapn ¶
func NewDeviceCapn ¶
func NewDeviceCapn(s *capnp.Segment) (DeviceCapn, error)
func NewRootDeviceCapn ¶
func NewRootDeviceCapn(s *capnp.Segment) (DeviceCapn, error)
func ReadRootDeviceCapn ¶
func ReadRootDeviceCapn(msg *capnp.Message) (DeviceCapn, error)
func (DeviceCapn) CreateTs ¶
func (s DeviceCapn) CreateTs() int64
func (DeviceCapn) DeviceType ¶
func (s DeviceCapn) DeviceType() (string, error)
func (DeviceCapn) DeviceTypeBytes ¶
func (s DeviceCapn) DeviceTypeBytes() ([]byte, error)
func (DeviceCapn) DisplayName ¶
func (s DeviceCapn) DisplayName() (string, error)
func (DeviceCapn) DisplayNameBytes ¶
func (s DeviceCapn) DisplayNameBytes() ([]byte, error)
func (DeviceCapn) HasDeviceType ¶
func (s DeviceCapn) HasDeviceType() bool
func (DeviceCapn) HasDisplayName ¶
func (s DeviceCapn) HasDisplayName() bool
func (DeviceCapn) HasId ¶
func (s DeviceCapn) HasId() bool
func (DeviceCapn) HasIdentifier ¶
func (s DeviceCapn) HasIdentifier() bool
func (DeviceCapn) HasUserID ¶
func (s DeviceCapn) HasUserID() bool
func (DeviceCapn) Id ¶
func (s DeviceCapn) Id() (string, error)
func (DeviceCapn) IdBytes ¶
func (s DeviceCapn) IdBytes() ([]byte, error)
func (DeviceCapn) Identifier ¶
func (s DeviceCapn) Identifier() (string, error)
func (DeviceCapn) IdentifierBytes ¶
func (s DeviceCapn) IdentifierBytes() ([]byte, error)
func (DeviceCapn) IsHuman ¶
func (s DeviceCapn) IsHuman() bool
func (DeviceCapn) LastActiveTs ¶
func (s DeviceCapn) LastActiveTs() int64
func (DeviceCapn) SetCreateTs ¶
func (s DeviceCapn) SetCreateTs(v int64)
func (DeviceCapn) SetDeviceType ¶
func (s DeviceCapn) SetDeviceType(v string) error
func (DeviceCapn) SetDisplayName ¶
func (s DeviceCapn) SetDisplayName(v string) error
func (DeviceCapn) SetId ¶
func (s DeviceCapn) SetId(v string) error
func (DeviceCapn) SetIdentifier ¶
func (s DeviceCapn) SetIdentifier(v string) error
func (DeviceCapn) SetIsHuman ¶
func (s DeviceCapn) SetIsHuman(v bool)
func (DeviceCapn) SetLastActiveTs ¶
func (s DeviceCapn) SetLastActiveTs(v int64)
func (DeviceCapn) SetUserID ¶
func (s DeviceCapn) SetUserID(v string) error
func (DeviceCapn) String ¶
func (s DeviceCapn) String() string
func (DeviceCapn) UserID ¶
func (s DeviceCapn) UserID() (string, error)
func (DeviceCapn) UserIDBytes ¶
func (s DeviceCapn) UserIDBytes() ([]byte, error)
type DeviceCapn_List ¶
DeviceCapn_List is a list of DeviceCapn.
func NewDeviceCapn_List ¶
func NewDeviceCapn_List(s *capnp.Segment, sz int32) (DeviceCapn_List, error)
NewDeviceCapn creates a new list of DeviceCapn.
func (DeviceCapn_List) At ¶
func (s DeviceCapn_List) At(i int) DeviceCapn
func (DeviceCapn_List) Set ¶
func (s DeviceCapn_List) Set(i int, v DeviceCapn) error
func (DeviceCapn_List) String ¶
func (s DeviceCapn_List) String() string
type DeviceCapn_Promise ¶
DeviceCapn_Promise is a wrapper for a DeviceCapn promised by a client call.
func (DeviceCapn_Promise) Struct ¶
func (p DeviceCapn_Promise) Struct() (DeviceCapn, error)
type IRoutableMsg ¶
type IRoutableMsg interface { }
type InputMsg ¶
type InputMsg struct { Reply int64 `json:"reply"` MsgType int32 `json:"msg_type"` Device *Device `json:"device"` Payload json.RawMessage `json:"payload,omitempty"` }
func (*InputMsg) GetCategory ¶
type InputMsgCapn ¶
func NewInputMsgCapn ¶
func NewInputMsgCapn(s *capnp.Segment) (InputMsgCapn, error)
func NewRootInputMsgCapn ¶
func NewRootInputMsgCapn(s *capnp.Segment) (InputMsgCapn, error)
func ReadRootInputMsgCapn ¶
func ReadRootInputMsgCapn(msg *capnp.Message) (InputMsgCapn, error)
func (InputMsgCapn) Device ¶
func (s InputMsgCapn) Device() (DeviceCapn, error)
func (InputMsgCapn) HasDevice ¶
func (s InputMsgCapn) HasDevice() bool
func (InputMsgCapn) HasPayload ¶
func (s InputMsgCapn) HasPayload() bool
func (InputMsgCapn) MsgType ¶
func (s InputMsgCapn) MsgType() int32
func (InputMsgCapn) NewDevice ¶
func (s InputMsgCapn) NewDevice() (DeviceCapn, error)
NewDevice sets the device field to a newly allocated DeviceCapn struct, preferring placement in s's segment.
func (InputMsgCapn) Payload ¶
func (s InputMsgCapn) Payload() ([]byte, error)
func (InputMsgCapn) Reply ¶
func (s InputMsgCapn) Reply() int64
func (InputMsgCapn) SetDevice ¶
func (s InputMsgCapn) SetDevice(v DeviceCapn) error
func (InputMsgCapn) SetMsgType ¶
func (s InputMsgCapn) SetMsgType(v int32)
func (InputMsgCapn) SetPayload ¶
func (s InputMsgCapn) SetPayload(v []byte) error
func (InputMsgCapn) SetReply ¶
func (s InputMsgCapn) SetReply(v int64)
func (InputMsgCapn) String ¶
func (s InputMsgCapn) String() string
type InputMsgCapn_List ¶
InputMsgCapn_List is a list of InputMsgCapn.
func NewInputMsgCapn_List ¶
func NewInputMsgCapn_List(s *capnp.Segment, sz int32) (InputMsgCapn_List, error)
NewInputMsgCapn creates a new list of InputMsgCapn.
func (InputMsgCapn_List) At ¶
func (s InputMsgCapn_List) At(i int) InputMsgCapn
func (InputMsgCapn_List) Set ¶
func (s InputMsgCapn_List) Set(i int, v InputMsgCapn) error
func (InputMsgCapn_List) String ¶
func (s InputMsgCapn_List) String() string
type InputMsgCapn_Promise ¶
InputMsgCapn_Promise is a wrapper for a InputMsgCapn promised by a client call.
func (InputMsgCapn_Promise) Device ¶
func (p InputMsgCapn_Promise) Device() DeviceCapn_Promise
func (InputMsgCapn_Promise) Struct ¶
func (p InputMsgCapn_Promise) Struct() (InputMsgCapn, error)
type JSONArr ¶
type JSONArr []interface{}
JSONArr 用在api-gw和后端服务器之间作为传送中介,尽量少用 如果用在json的序列化和反序列化之间作为中介值,有可能会出现int64丢失精度问题
type JSONMap ¶
type JSONMap map[string]interface{}
JSONMap 用在api-gw和后端服务器之间作为传送中介,尽量少用 如果用在json的序列化和反序列化之间作为中介值,有可能会出现int64丢失精度问题
type MatrixError ¶
MatrixError represents the "standard error response" in Matrix. http://matrix.org/docs/spec/client_server/r0.2.0.html#api-standards
func (*MatrixError) Decode ¶
func (e *MatrixError) Decode(input []byte) error
func (*MatrixError) Encode ¶
func (e *MatrixError) Encode() ([]byte, error)
func (*MatrixError) Error ¶
func (e *MatrixError) Error() string
type OutputMsgCapn ¶
func NewOutputMsgCapn ¶
func NewOutputMsgCapn(s *capnp.Segment) (OutputMsgCapn, error)
func NewRootOutputMsgCapn ¶
func NewRootOutputMsgCapn(s *capnp.Segment) (OutputMsgCapn, error)
func ReadRootOutputMsgCapn ¶
func ReadRootOutputMsgCapn(msg *capnp.Message) (OutputMsgCapn, error)
func (OutputMsgCapn) Body ¶
func (s OutputMsgCapn) Body() ([]byte, error)
func (OutputMsgCapn) BodyFormat ¶
func (s OutputMsgCapn) BodyFormat() int64
func (OutputMsgCapn) Code ¶
func (s OutputMsgCapn) Code() int64
func (OutputMsgCapn) HasBody ¶
func (s OutputMsgCapn) HasBody() bool
func (OutputMsgCapn) HasHeaders ¶
func (s OutputMsgCapn) HasHeaders() bool
func (OutputMsgCapn) Headers ¶
func (s OutputMsgCapn) Headers() ([]byte, error)
func (OutputMsgCapn) MsgType ¶
func (s OutputMsgCapn) MsgType() int32
func (OutputMsgCapn) Reply ¶
func (s OutputMsgCapn) Reply() int64
func (OutputMsgCapn) SetBody ¶
func (s OutputMsgCapn) SetBody(v []byte) error
func (OutputMsgCapn) SetBodyFormat ¶
func (s OutputMsgCapn) SetBodyFormat(v int64)
func (OutputMsgCapn) SetCode ¶
func (s OutputMsgCapn) SetCode(v int64)
func (OutputMsgCapn) SetHeaders ¶
func (s OutputMsgCapn) SetHeaders(v []byte) error
func (OutputMsgCapn) SetMsgType ¶
func (s OutputMsgCapn) SetMsgType(v int32)
func (OutputMsgCapn) SetReply ¶
func (s OutputMsgCapn) SetReply(v int64)
func (OutputMsgCapn) String ¶
func (s OutputMsgCapn) String() string
type OutputMsgCapn_List ¶
OutputMsgCapn_List is a list of OutputMsgCapn.
func NewOutputMsgCapn_List ¶
func NewOutputMsgCapn_List(s *capnp.Segment, sz int32) (OutputMsgCapn_List, error)
NewOutputMsgCapn creates a new list of OutputMsgCapn.
func (OutputMsgCapn_List) At ¶
func (s OutputMsgCapn_List) At(i int) OutputMsgCapn
func (OutputMsgCapn_List) Set ¶
func (s OutputMsgCapn_List) Set(i int, v OutputMsgCapn) error
func (OutputMsgCapn_List) String ¶
func (s OutputMsgCapn_List) String() string
type OutputMsgCapn_Promise ¶
OutputMsgCapn_Promise is a wrapper for a OutputMsgCapn promised by a client call.
func (OutputMsgCapn_Promise) Struct ¶
func (p OutputMsgCapn_Promise) Struct() (OutputMsgCapn, error)
type RespMessage ¶
type RespMessage struct {
Message string `json:"message"`
}
func (*RespMessage) Decode ¶
func (m *RespMessage) Decode(input []byte) error
func (*RespMessage) Encode ¶
func (m *RespMessage) Encode() ([]byte, error)