Documentation ¶
Index ¶
- Constants
- Variables
- type ActDataStreamUpdate
- type AlHolder
- type Annotation
- type Annotations
- type CompressContent
- type DeviceKeyChanges
- type DeviceKeys
- type DeviceState
- type EventContent
- type EventRelations
- type FilterTokenContent
- type HttpReq
- type InRelayTo
- type JoinedRoomContent
- type KeyChangeContent
- type KeyChangeStream
- type KeyHolder
- type KeyObject
- type KeyUpdateContent
- type LoginInfoContent
- type MInRelayTo
- type NotifyDeviceState
- type NotifyUserState
- type OneTimeKeySpecific
- type OnlinePresence
- type OriginInRelayTo
- type PresenceJSON
- type PresenceShowJSON
- type PresenceStream
- type ProfileContent
- type ProfileStreamUpdate
- type PushKeyContent
- type RCSFriendship
- type RCSInputEventContent
- type RCSOutputEventContent
- type ReactionContent
- type ReceiptContent
- type ReceiptStream
- type RedactUnsigned
- type RoomInitSyncContent
- type RoomMemberContent
- type RoomMsgContent
- type RoomStateByTypeContent
- type RoomStateContent
- type RoomStateExt
- type StdContent
- type StdEvent
- type StdRequest
- type SyncContent
- type SysManageContent
- type TypingContent
- type UnreadReqContent
- type Unsigned
- type UploadEncrypt
- type UploadEncryptSpecific
- type UserReceipt
- type VerifyTokenRequest
- type VerifyTokenResponse
- type VisibilityRangeContent
Constants ¶
View Source
const ( //proxy -> front PUSH_API_GROUP = "pushapi" ENCRY_API_GROUP = "encryptoapi" CLIENT_API_GROUP = "clientapi" PUBLICROOM_API_GROUP = "publicroomapi" RCSSERVER_API_GROUP = "rcsserverapi" //other server -> front PROFILE_RPC_GROUP = "profilerpc" PUBLICROOM_RPC_GROUP = "publicroomrpc" RCSSERVER_RPC_GROUP = "rcsserverrpc" ROOMINPUT_RPC_GROUP = "roominputrpc" ROOOMALIAS_RPC_GROUP = "roomaliasrpc" ROOMQRY_PRC_GROUP = "roomqryrpc" )
View Source
const ( LOCK_INSTANCE_PREFIX = "dist_lock_instance:" LOCK_ROOMSTATE_PREFIX = "dist_lock_roomstate:" LOCK_ROOMSTATE_EXT_PREFIX = "dist_lock_roomstate_ext:" )
dist_lock prefix
View Source
const ( DEVICEKEYUPDATE = "DeviceKeyUpdate" ONETIMEKEYUPDATE = "OneTimeKeyUpdate" )
View Source
const ( FILTERTOKENADD = "FilterTokenAdd" FILTERTOKENDEL = "FilterTokenDel" )
View Source
const ( DB_EXCEED_TIME = 1000 CHECK_LOAD_EXCEED_TIME = 5000 )
View Source
const ( BODYDEVICEKEY = iota BODYONETIMEKEY ONETIMEKEYSTRING ONETIMEKEYOBJECT )
Variables ¶
View Source
var DeviceStateUpdateDef = "sync-device-state-update-topic"
View Source
var EduTopicDef = "fed-edu-topic"
View Source
var EventTopicDef = "sync-event-topic"
View Source
var EventUpdateTopicDef = "sync-event-update-topic"
View Source
var FilterTokenTopicDef = "filter-token-topic"
View Source
var JoinedRoomTopicDef = "sync-joined-room-topic"
View Source
var KcTopicDef = "sync-kc-topic"
View Source
var KeyUpdateTopicDef = "sync-key-update-topic"
View Source
var LoginTopicDef = "login-info-topic"
View Source
var PresenceTopicDef = "sync-presence-topic"
View Source
var ProfileUpdateTopicDef = "fed-profile-update-topic"
View Source
var RCSEventTopicDef = "rcs-event-topic"
View Source
var ReceiptTopicDef = "sync-receipt-topic"
View Source
var ReceiptUpdateTopicDef = "sync-receipt-update-topic"
View Source
var StdTopicDef = "sync-std-topic"
View Source
var SyncServerTopicDef = "sync-server-topic"
View Source
var SyncTopicDef = "sync-sync-topic"
View Source
var SyncUnreadTopicDef = "sync-server-unread-topic"
View Source
var TypingTopicDef = "sync-typing-topic"
View Source
var TypingUpdateTopicDef = "sync-typing-update-topic"
View Source
var UnreadReqTopicDef = "sync-unread-req-topic"
View Source
var VerifyTokenTopicDef = "proxy-verify-token-topic"
Functions ¶
This section is empty.
Types ¶
type ActDataStreamUpdate ¶
type AlHolder ¶
type AlHolder struct { UserID, DeviceID, SupportedAlgorithm string }
AlHolder structure
type Annotation ¶
type Annotations ¶
type Annotations struct {
Chunk []*Annotation `json:"chunk"`
}
type CompressContent ¶
type DeviceKeyChanges ¶
type DeviceKeys ¶
type DeviceKeys struct { UserID string `json:"user_id"` DeviceID string `json:"device_id"` Algorithm []string `json:"algorithms"` Keys map[string]string `json:"keys"` Signature map[string]map[string]string `json:"signatures"` }
DeviceKeys structure
type DeviceState ¶
type EventContent ¶
type EventRelations ¶
type EventRelations struct { RelayTo *OriginInRelayTo `json:"m.in_reply_to,omitempty"` Anno *Annotations `json:"m.annotation,omitempty"` }
type FilterTokenContent ¶
type HttpReq ¶
type HttpReq struct { TimeOut string `json:"time_out,omitempty"` FullState string `json:"full_state,omitempty"` SetPresence string `json:"set_presence,omitempty"` Filter string `json:"filter,omitempty"` From string `json:"from,omitempty"` Since string `json:"since,omitempty"` Limit string `json:"limit,omitempty"` Dir string `json:"dir,omitempty"` TraceId string `json:"trace_id,omitempty"` }
type JoinedRoomContent ¶
type KeyChangeContent ¶
type KeyChangeStream ¶
type KeyChangeStream struct {
ChangedUserID string
}
type KeyHolder ¶
type KeyHolder struct { UserID, DeviceID, Signature, KeyAlgorithm, KeyID, Key, KeyType string }
KeyHolder structure
type KeyObject ¶
type KeyObject struct { Key string `json:"key"` Signature map[string]map[string]string `json:"signatures"` }
KeyObject structure
type KeyUpdateContent ¶
type KeyUpdateContent struct { Type string `json:"type"` OneTimeKeyChangeUserId string `json:"one_time_key_change_user"` OneTimeKeyChangeDeviceId string `json:"one_time_key_change_device"` DeviceKeyChanges []DeviceKeyChanges `json:"device_key_changes"` EventNID int64 `json:"event_id"` Reply string }
type LoginInfoContent ¶
type MInRelayTo ¶
type MInRelayTo struct {
MRelayTo InRelayTo `json:"m.in_reply_to"`
}
type NotifyDeviceState ¶
type NotifyDeviceState struct { UserID string `json:"user_id"` DeviceID string `json:"device_id"` Pushkeys []PushKeyContent `json:"pushkeys"` LastState int `json:"last_state"` CurState int `json:"cur_state"` }
type NotifyUserState ¶
type OneTimeKeySpecific ¶
OneTimeKeySpecific structure
type OnlinePresence ¶
type OriginInRelayTo ¶
type OriginInRelayTo struct {
Chunk []string `json:"chunk"`
}
type PresenceJSON ¶
type PresenceJSON struct { AvatarURL string `json:"avatar_url"` DisplayName string `json:"displayname"` LastActiveAgo int64 `json:"last_active_ago"` Presence string `json:"presence"` //required CurrentlyActive bool `json:"currently_active"` UserID string `json:"user_id"` //required StatusMsg string `json:"status_msg"` ExtStatusMsg string `json:"ext_status_msg"` UserName string `json:"user_name"` JobNumber string `json:"job_number"` Mobile string `json:"mobile"` Landline string `json:"landline"` Email string `json:"email"` State int `json:"state"` LastPresence string `json:"last_presence"` LastStatusMsg string `json:"last_status_msg"` LastExtStatusMsg string `json:"last_ext_status_msg"` }
presence types
type PresenceShowJSON ¶
type PresenceShowJSON struct { AvatarURL string `json:"avatar_url"` DisplayName string `json:"displayname"` LastActiveAgo int64 `json:"last_active_ago"` Presence string `json:"presence"` //required CurrentlyActive bool `json:"currently_active"` UserID string `json:"user_id"` //required StatusMsg string `json:"status_msg"` ExtStatusMsg string `json:"ext_status_msg"` }
type PresenceStream ¶
type ProfileContent ¶
type ProfileContent struct { UserID string `json:"user_id,omitempty"` DisplayName string `json:"display_name,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` Presence string `json:"presence,omitempty"` StatusMsg string `json:"status_msg,omitempty"` ExtStatusMsg string `json:"ext_status_msg,omitempty"` // ext user_info UserName string `json:"user_name,omitempty"` JobNumber string `json:"job_number,omitempty"` Mobile string `json:"mobile,omitempty"` Landline string `json:"landline,omitempty"` Email string `json:"email,omitempty"` State int `json:"state,omitempty"` }
type ProfileStreamUpdate ¶
type ProfileStreamUpdate struct { UserID string `json:"user_id"` DeviceID string `json:"device_id"` Presence PresenceJSON `json:"presence"` IsUpdateBase bool `json:"is_update_base"` //matrix /presence/{userID}/status only update presence, status_msg, ext_status_msg }
type PushKeyContent ¶
type RCSFriendship ¶
type RCSFriendship struct { ID string `json:"_id"` RoomID string `json:"room_id"` FcID string `json:"fcid"` ToFcID string `json:"to_fcid"` FcIDState string `json:"fcid_state"` ToFcIDState string `json:"to_fcid_state"` FcIDIsBot bool `json:"fcid_is_bot"` ToFcIDIsBot bool `json:"to_fcid_is_bot"` FcIDRemark string `json:"fcid_remark"` ToFcIDRemark string `json:"to_fcid_remark"` FcIDOnceJoined bool `json:"fcid_once_joined"` ToFcIDOnceJoined bool `json:"to_fcid_once_joined"` FcIDDomain string `json:"fcid_domain"` ToFcIDDomain string `json:"to_fcid_domain"` EventID string `json:"event_id"` }
type RCSInputEventContent ¶
type RCSInputEventContent struct { Event gomatrixserverlib.Event Reply string `json:"reply"` }
type RCSOutputEventContent ¶
type RCSOutputEventContent struct { Events []gomatrixserverlib.Event `json:"events"` Succeed bool `json:"succeed"` }
type ReactionContent ¶
type ReactionContent struct { EventID string `json:"event_id"` Key string `json:"key"` RelType string `json:"rel_type"` }
emoji message relay
type ReceiptContent ¶
type ReceiptStream ¶
type RedactUnsigned ¶
type RedactUnsigned struct { Age int64 `json:"age,omitempty"` PrevContent []byte `json:"prev_content,omitempty"` TransactionID string `json:"transaction_id,omitempty"` RedactedBecause *gomatrixserverlib.ClientEvent `json:"redacted_because,omitempty"` UpdatedBecause *gomatrixserverlib.ClientEvent `json:"updated_because,omitempty"` IsRelated *bool `json:"is_related,omitempty"` }
type RoomInitSyncContent ¶
type RoomInitSyncContent struct { UserID string `json:"user_id,omitempty"` RoomID string `json:"room_id,omitempty"` Reply string }
func (*RoomInitSyncContent) Decode ¶
func (p *RoomInitSyncContent) Decode(input []byte) error
func (*RoomInitSyncContent) Encode ¶
func (p *RoomInitSyncContent) Encode() ([]byte, error)
type RoomMemberContent ¶
type RoomMsgContent ¶
type RoomStateByTypeContent ¶
type RoomStateContent ¶
type RoomStateExt ¶
type RoomStateExt struct { PreStateId string `json:"pre_state_id"` LastStateId string `json:"last_state_id"` PreMsgId string `json:"pre_msg_id"` LastMsgId string `json:"last_msg_id"` Depth int64 `json:"depth"` HasUpdate bool `json:"has_update"` //must consistent with depth, db not has OutEventOffset int64 `json:"out_event_offset"` //domain:offset Domains map[string]int64 `json:"domains"` }
type StdContent ¶
type StdContent struct { StdRequest StdRequest `json:"std_request,omitempty"` Sender string `json:"sender,omitempty"` EventType string `json:"event_type,omitempty"` Reply string }
type StdRequest ¶
type SyncContent ¶
type SysManageContent ¶
type TypingContent ¶
type UnreadReqContent ¶
type Unsigned ¶
type Unsigned struct { TransactionID string `json:"transaction_id,omitempty"` Relations *EventRelations `json:"m.relations,omitempty"` }
type UploadEncrypt ¶
type UploadEncrypt struct { DeviceKeys DeviceKeys `json:"device_keys"` OneTimeKey map[string]interface{} `json:"one_time_keys"` }
UploadEncrypt structure
func (*UploadEncrypt) Decode ¶
func (r *UploadEncrypt) Decode(input []byte) error
func (*UploadEncrypt) Encode ¶
func (r *UploadEncrypt) Encode() ([]byte, error)
type UploadEncryptSpecific ¶
type UploadEncryptSpecific struct { DeviceKeys DeviceKeys `json:"device_keys"` OneTimeKey OneTimeKeySpecific `json:"one_time_keys"` }
UploadEncryptSpecific structure
type UserReceipt ¶
type VerifyTokenRequest ¶
type VerifyTokenResponse ¶
type VisibilityRangeContent ¶
Click to show internal directories.
Click to hide internal directories.