Documentation ¶
Overview ¶
Package pbx is a generated protocol buffer package.
It is generated from these files:
model.proto
It has these top-level messages:
Unused DefaultAcsMode AccessMode SetSub SetDesc GetOpts BrowseOpts GetQuery SetQuery ClientHi ClientAcc ClientLogin ClientSub ClientLeave ClientPub ClientGet ClientSet ClientDel ClientNote ClientMsg TopicDesc TopicSub ServerCtrl ServerData ServerPres ServerMeta ServerInfo ServerMsg ServerResp Session ClientReq TopicEvent AccountEvent SubscriptionEvent MessageEvent
Index ¶
- Variables
- func RegisterNodeServer(s *grpc.Server, srv NodeServer)
- func RegisterPluginServer(s *grpc.Server, srv PluginServer)
- type AccessMode
- type AccountEvent
- func (*AccountEvent) Descriptor() ([]byte, []int)
- func (m *AccountEvent) GetAction() Crud
- func (m *AccountEvent) GetDefaultAcs() *DefaultAcsMode
- func (m *AccountEvent) GetPublic() []byte
- func (m *AccountEvent) GetTags() []string
- func (m *AccountEvent) GetUserId() string
- func (*AccountEvent) ProtoMessage()
- func (m *AccountEvent) Reset()
- func (m *AccountEvent) String() string
- type BrowseOpts
- func (*BrowseOpts) Descriptor() ([]byte, []int)
- func (m *BrowseOpts) GetBeforeId() int32
- func (m *BrowseOpts) GetBeforeTs() int64
- func (m *BrowseOpts) GetLimit() int32
- func (m *BrowseOpts) GetSinceId() int32
- func (m *BrowseOpts) GetSinceTs() int64
- func (*BrowseOpts) ProtoMessage()
- func (m *BrowseOpts) Reset()
- func (m *BrowseOpts) String() string
- type ClientAcc
- func (*ClientAcc) Descriptor() ([]byte, []int)
- func (m *ClientAcc) GetDesc() *SetDesc
- func (m *ClientAcc) GetId() string
- func (m *ClientAcc) GetLogin() bool
- func (m *ClientAcc) GetScheme() string
- func (m *ClientAcc) GetSecret() []byte
- func (m *ClientAcc) GetTags() []string
- func (m *ClientAcc) GetUserId() string
- func (*ClientAcc) ProtoMessage()
- func (m *ClientAcc) Reset()
- func (m *ClientAcc) String() string
- type ClientDel
- func (*ClientDel) Descriptor() ([]byte, []int)
- func (m *ClientDel) GetBefore() int32
- func (m *ClientDel) GetHard() bool
- func (m *ClientDel) GetId() string
- func (m *ClientDel) GetSeqList() []int32
- func (m *ClientDel) GetTopic() string
- func (m *ClientDel) GetUserId() string
- func (m *ClientDel) GetWhat() ClientDel_What
- func (*ClientDel) ProtoMessage()
- func (m *ClientDel) Reset()
- func (m *ClientDel) String() string
- type ClientDel_What
- type ClientGet
- type ClientHi
- func (*ClientHi) Descriptor() ([]byte, []int)
- func (m *ClientHi) GetDeviceId() string
- func (m *ClientHi) GetId() string
- func (m *ClientHi) GetLang() string
- func (m *ClientHi) GetUserAgent() string
- func (m *ClientHi) GetVer() int32
- func (*ClientHi) ProtoMessage()
- func (m *ClientHi) Reset()
- func (m *ClientHi) String() string
- type ClientLeave
- type ClientLogin
- type ClientMsg
- func (*ClientMsg) Descriptor() ([]byte, []int)
- func (m *ClientMsg) GetAcc() *ClientAcc
- func (m *ClientMsg) GetDel() *ClientDel
- func (m *ClientMsg) GetGet() *ClientGet
- func (m *ClientMsg) GetHi() *ClientHi
- func (m *ClientMsg) GetLeave() *ClientLeave
- func (m *ClientMsg) GetLogin() *ClientLogin
- func (m *ClientMsg) GetMessage() isClientMsg_Message
- func (m *ClientMsg) GetNote() *ClientNote
- func (m *ClientMsg) GetPub() *ClientPub
- func (m *ClientMsg) GetSet() *ClientSet
- func (m *ClientMsg) GetSub() *ClientSub
- func (*ClientMsg) ProtoMessage()
- func (m *ClientMsg) Reset()
- func (m *ClientMsg) String() string
- func (*ClientMsg) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type ClientMsg_Acc
- type ClientMsg_Del
- type ClientMsg_Get
- type ClientMsg_Hi
- type ClientMsg_Leave
- type ClientMsg_Login
- type ClientMsg_Note
- type ClientMsg_Pub
- type ClientMsg_Set
- type ClientMsg_Sub
- type ClientNote
- type ClientPub
- func (*ClientPub) Descriptor() ([]byte, []int)
- func (m *ClientPub) GetContent() []byte
- func (m *ClientPub) GetHead() map[string]string
- func (m *ClientPub) GetId() string
- func (m *ClientPub) GetNoEcho() bool
- func (m *ClientPub) GetTopic() string
- func (*ClientPub) ProtoMessage()
- func (m *ClientPub) Reset()
- func (m *ClientPub) String() string
- type ClientReq
- type ClientSet
- type ClientSub
- func (*ClientSub) Descriptor() ([]byte, []int)
- func (m *ClientSub) GetGetQuery() *GetQuery
- func (m *ClientSub) GetId() string
- func (m *ClientSub) GetSetQuery() *SetQuery
- func (m *ClientSub) GetTopic() string
- func (*ClientSub) ProtoMessage()
- func (m *ClientSub) Reset()
- func (m *ClientSub) String() string
- type Crud
- type DefaultAcsMode
- type GetOpts
- type GetQuery
- type InfoNote
- type MessageEvent
- type NodeClient
- type NodeServer
- type Node_MessageLoopClient
- type Node_MessageLoopServer
- type PluginClient
- type PluginServer
- type ServerCtrl
- func (*ServerCtrl) Descriptor() ([]byte, []int)
- func (m *ServerCtrl) GetCode() int32
- func (m *ServerCtrl) GetId() string
- func (m *ServerCtrl) GetParams() map[string][]byte
- func (m *ServerCtrl) GetText() string
- func (m *ServerCtrl) GetTopic() string
- func (*ServerCtrl) ProtoMessage()
- func (m *ServerCtrl) Reset()
- func (m *ServerCtrl) String() string
- type ServerData
- func (*ServerData) Descriptor() ([]byte, []int)
- func (m *ServerData) GetContent() []byte
- func (m *ServerData) GetDeletedAt() int64
- func (m *ServerData) GetFromUserId() string
- func (m *ServerData) GetHead() map[string]string
- func (m *ServerData) GetSeqId() int32
- func (m *ServerData) GetTopic() string
- func (*ServerData) ProtoMessage()
- func (m *ServerData) Reset()
- func (m *ServerData) String() string
- type ServerInfo
- func (*ServerInfo) Descriptor() ([]byte, []int)
- func (m *ServerInfo) GetFromUserId() string
- func (m *ServerInfo) GetSeqId() int32
- func (m *ServerInfo) GetTopic() string
- func (m *ServerInfo) GetWhat() InfoNote
- func (*ServerInfo) ProtoMessage()
- func (m *ServerInfo) Reset()
- func (m *ServerInfo) String() string
- type ServerMeta
- func (*ServerMeta) Descriptor() ([]byte, []int)
- func (m *ServerMeta) GetDesc() *TopicDesc
- func (m *ServerMeta) GetId() string
- func (m *ServerMeta) GetSub() []*TopicSub
- func (m *ServerMeta) GetTopic() string
- func (*ServerMeta) ProtoMessage()
- func (m *ServerMeta) Reset()
- func (m *ServerMeta) String() string
- type ServerMsg
- func (*ServerMsg) Descriptor() ([]byte, []int)
- func (m *ServerMsg) GetCtrl() *ServerCtrl
- func (m *ServerMsg) GetData() *ServerData
- func (m *ServerMsg) GetInfo() *ServerInfo
- func (m *ServerMsg) GetMessage() isServerMsg_Message
- func (m *ServerMsg) GetMeta() *ServerMeta
- func (m *ServerMsg) GetPres() *ServerPres
- func (*ServerMsg) ProtoMessage()
- func (m *ServerMsg) Reset()
- func (m *ServerMsg) String() string
- func (*ServerMsg) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type ServerMsg_Ctrl
- type ServerMsg_Data
- type ServerMsg_Info
- type ServerMsg_Meta
- type ServerMsg_Pres
- type ServerPres
- func (*ServerPres) Descriptor() ([]byte, []int)
- func (m *ServerPres) GetAcs() *AccessMode
- func (m *ServerPres) GetActorUserId() string
- func (m *ServerPres) GetSeqId() int32
- func (m *ServerPres) GetSeqList() []int32
- func (m *ServerPres) GetSrc() string
- func (m *ServerPres) GetTargetUserId() string
- func (m *ServerPres) GetTopic() string
- func (m *ServerPres) GetUserAgent() string
- func (m *ServerPres) GetWhat() ServerPres_What
- func (*ServerPres) ProtoMessage()
- func (m *ServerPres) Reset()
- func (m *ServerPres) String() string
- type ServerPres_What
- type ServerResp
- type ServerResp_RespCode
- type Session
- func (*Session) Descriptor() ([]byte, []int)
- func (m *Session) GetAuthLevel() Session_AuthLevel
- func (m *Session) GetDeviceId() string
- func (m *Session) GetLanguage() string
- func (m *Session) GetRemoteAddr() string
- func (m *Session) GetSessionId() string
- func (m *Session) GetUserAgent() string
- func (m *Session) GetUserId() string
- func (*Session) ProtoMessage()
- func (m *Session) Reset()
- func (m *Session) String() string
- type Session_AuthLevel
- type SetDesc
- type SetQuery
- type SetSub
- type SubscriptionEvent
- func (*SubscriptionEvent) Descriptor() ([]byte, []int)
- func (m *SubscriptionEvent) GetAction() Crud
- func (m *SubscriptionEvent) GetSub() *TopicSub
- func (m *SubscriptionEvent) GetSubId() string
- func (*SubscriptionEvent) ProtoMessage()
- func (m *SubscriptionEvent) Reset()
- func (m *SubscriptionEvent) String() string
- type TopicDesc
- func (*TopicDesc) Descriptor() ([]byte, []int)
- func (m *TopicDesc) GetAcs() *AccessMode
- func (m *TopicDesc) GetClearId() int32
- func (m *TopicDesc) GetCreatedAt() int64
- func (m *TopicDesc) GetDefacs() *DefaultAcsMode
- func (m *TopicDesc) GetPrivate() []byte
- func (m *TopicDesc) GetPublic() []byte
- func (m *TopicDesc) GetReadId() int32
- func (m *TopicDesc) GetRecvId() int32
- func (m *TopicDesc) GetSeqId() int32
- func (m *TopicDesc) GetUpdatedAt() int64
- func (*TopicDesc) ProtoMessage()
- func (m *TopicDesc) Reset()
- func (m *TopicDesc) String() string
- type TopicEvent
- type TopicSub
- func (*TopicSub) Descriptor() ([]byte, []int)
- func (m *TopicSub) GetAcs() *AccessMode
- func (m *TopicSub) GetClearId() int32
- func (m *TopicSub) GetDeletedAt() int64
- func (m *TopicSub) GetLastSeenTime() int64
- func (m *TopicSub) GetLastSeenUserAgent() string
- func (m *TopicSub) GetOnline() bool
- func (m *TopicSub) GetPrivate() []byte
- func (m *TopicSub) GetPublic() []byte
- func (m *TopicSub) GetReadId() int32
- func (m *TopicSub) GetRecvId() int32
- func (m *TopicSub) GetSeqId() int32
- func (m *TopicSub) GetTopic() string
- func (m *TopicSub) GetUpdatedAt() int64
- func (m *TopicSub) GetUserId() string
- func (*TopicSub) ProtoMessage()
- func (m *TopicSub) Reset()
- func (m *TopicSub) String() string
- type Unused
Constants ¶
This section is empty.
Variables ¶
var ClientDel_What_name = map[int32]string{
0: "MSG",
1: "TOPIC",
2: "SUB",
}
var ClientDel_What_value = map[string]int32{
"MSG": 0,
"TOPIC": 1,
"SUB": 2,
}
var Crud_name = map[int32]string{
0: "CREATE",
1: "UPDATE",
2: "DELETE",
}
var Crud_value = map[string]int32{
"CREATE": 0,
"UPDATE": 1,
"DELETE": 2,
}
var InfoNote_name = map[int32]string{
0: "READ",
1: "RECV",
2: "KP",
}
var InfoNote_value = map[string]int32{
"READ": 0,
"RECV": 1,
"KP": 2,
}
var ServerPres_What_name = map[int32]string{
0: "ON",
1: "OFF",
3: "UA",
4: "UPD",
5: "GONE",
6: "ACS",
7: "TERM",
8: "MSG",
9: "READ",
10: "RECV",
11: "DEL",
}
var ServerPres_What_value = map[string]int32{
"ON": 0,
"OFF": 1,
"UA": 3,
"UPD": 4,
"GONE": 5,
"ACS": 6,
"TERM": 7,
"MSG": 8,
"READ": 9,
"RECV": 10,
"DEL": 11,
}
var ServerResp_RespCode_name = map[int32]string{
0: "CONTINUE",
1: "DROP",
2: "RESPOND",
3: "REPLACE",
}
var ServerResp_RespCode_value = map[string]int32{
"CONTINUE": 0,
"DROP": 1,
"RESPOND": 2,
"REPLACE": 3,
}
var Session_AuthLevel_name = map[int32]string{
0: "NONE",
10: "ANON",
20: "AUTH",
30: "ROOT",
}
var Session_AuthLevel_value = map[string]int32{
"NONE": 0,
"ANON": 10,
"AUTH": 20,
"ROOT": 30,
}
Functions ¶
func RegisterNodeServer ¶
func RegisterNodeServer(s *grpc.Server, srv NodeServer)
func RegisterPluginServer ¶
func RegisterPluginServer(s *grpc.Server, srv PluginServer)
Types ¶
type AccessMode ¶
type AccessMode struct { // Access mode requested by the user Want string `protobuf:"bytes,1,opt,name=want" json:"want,omitempty"` // Access mode granted to the user by the admin Given string `protobuf:"bytes,2,opt,name=given" json:"given,omitempty"` }
Actual access mode
func (*AccessMode) Descriptor ¶
func (*AccessMode) Descriptor() ([]byte, []int)
func (*AccessMode) GetGiven ¶
func (m *AccessMode) GetGiven() string
func (*AccessMode) GetWant ¶
func (m *AccessMode) GetWant() string
func (*AccessMode) ProtoMessage ¶
func (*AccessMode) ProtoMessage()
func (*AccessMode) Reset ¶
func (m *AccessMode) Reset()
func (*AccessMode) String ¶
func (m *AccessMode) String() string
type AccountEvent ¶
type AccountEvent struct { Action Crud `protobuf:"varint,1,opt,name=action,enum=pbx.Crud" json:"action,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId" json:"user_id,omitempty"` DefaultAcs *DefaultAcsMode `protobuf:"bytes,3,opt,name=default_acs,json=defaultAcs" json:"default_acs,omitempty"` Public []byte `protobuf:"bytes,4,opt,name=public,proto3" json:"public,omitempty"` // Indexable tags for user discovery Tags []string `protobuf:"bytes,8,rep,name=tags" json:"tags,omitempty"` }
func (*AccountEvent) Descriptor ¶
func (*AccountEvent) Descriptor() ([]byte, []int)
func (*AccountEvent) GetAction ¶
func (m *AccountEvent) GetAction() Crud
func (*AccountEvent) GetDefaultAcs ¶
func (m *AccountEvent) GetDefaultAcs() *DefaultAcsMode
func (*AccountEvent) GetPublic ¶
func (m *AccountEvent) GetPublic() []byte
func (*AccountEvent) GetTags ¶
func (m *AccountEvent) GetTags() []string
func (*AccountEvent) GetUserId ¶
func (m *AccountEvent) GetUserId() string
func (*AccountEvent) ProtoMessage ¶
func (*AccountEvent) ProtoMessage()
func (*AccountEvent) Reset ¶
func (m *AccountEvent) Reset()
func (*AccountEvent) String ¶
func (m *AccountEvent) String() string
type BrowseOpts ¶
type BrowseOpts struct { // Load messages with seq id equal or greater than this SinceId int32 `protobuf:"varint,1,opt,name=since_id,json=sinceId" json:"since_id,omitempty"` // Load messages with UpdatedAt equal or grater than this SinceTs int64 `protobuf:"varint,2,opt,name=since_ts,json=sinceTs" json:"since_ts,omitempty"` // Load messages with seq id lower than this BeforeId int32 `protobuf:"varint,3,opt,name=before_id,json=beforeId" json:"before_id,omitempty"` // Load messages with UpdatedAt lower than this BeforeTs int64 `protobuf:"varint,4,opt,name=before_ts,json=beforeTs" json:"before_ts,omitempty"` // Limit the number of messages loaded Limit int32 `protobuf:"varint,5,opt,name=limit" json:"limit,omitempty"` }
func (*BrowseOpts) Descriptor ¶
func (*BrowseOpts) Descriptor() ([]byte, []int)
func (*BrowseOpts) GetBeforeId ¶
func (m *BrowseOpts) GetBeforeId() int32
func (*BrowseOpts) GetBeforeTs ¶
func (m *BrowseOpts) GetBeforeTs() int64
func (*BrowseOpts) GetLimit ¶
func (m *BrowseOpts) GetLimit() int32
func (*BrowseOpts) GetSinceId ¶
func (m *BrowseOpts) GetSinceId() int32
func (*BrowseOpts) GetSinceTs ¶
func (m *BrowseOpts) GetSinceTs() int64
func (*BrowseOpts) ProtoMessage ¶
func (*BrowseOpts) ProtoMessage()
func (*BrowseOpts) Reset ¶
func (m *BrowseOpts) Reset()
func (*BrowseOpts) String ¶
func (m *BrowseOpts) String() string
type ClientAcc ¶
type ClientAcc struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // User being created or updated UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId" json:"user_id,omitempty"` // The initial authentication scheme the account can use Scheme string `protobuf:"bytes,3,opt,name=scheme" json:"scheme,omitempty"` // Shared secret Secret []byte `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"` // Authenticate session with the newly created account Login bool `protobuf:"varint,5,opt,name=login" json:"login,omitempty"` // Indexable tags for user discovery Tags []string `protobuf:"bytes,6,rep,name=tags" json:"tags,omitempty"` // User initialization data when creating a new user, otherwise ignored Desc *SetDesc `protobuf:"bytes,7,opt,name=desc" json:"desc,omitempty"` }
User creation message {acc}
func (*ClientAcc) Descriptor ¶
func (*ClientAcc) ProtoMessage ¶
func (*ClientAcc) ProtoMessage()
type ClientDel ¶
type ClientDel struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` What ClientDel_What `protobuf:"varint,3,opt,name=what,enum=pbx.ClientDel_What" json:"what,omitempty"` // Delete messages older than this seq ID (inclusive) Before int32 `protobuf:"varint,4,opt,name=before" json:"before,omitempty"` // List of Seq Ids to delete/mark as deleted SeqList []int32 `protobuf:"varint,5,rep,packed,name=seq_list,json=seqList" json:"seq_list,omitempty"` // User ID of the subscription to delete UserId string `protobuf:"bytes,6,opt,name=user_id,json=userId" json:"user_id,omitempty"` // Request to hard-delete messages for all users, if such option is available. Hard bool `protobuf:"varint,7,opt,name=hard" json:"hard,omitempty"` }
ClientDel delete messages or topic
func (*ClientDel) Descriptor ¶
func (*ClientDel) GetSeqList ¶
func (*ClientDel) GetWhat ¶
func (m *ClientDel) GetWhat() ClientDel_What
func (*ClientDel) ProtoMessage ¶
func (*ClientDel) ProtoMessage()
type ClientDel_What ¶
type ClientDel_What int32
What to delete, either "msg" to delete messages (default) or "topic" to delete the topic or "sub" to delete a subscription to topic.
const ( ClientDel_MSG ClientDel_What = 0 ClientDel_TOPIC ClientDel_What = 1 ClientDel_SUB ClientDel_What = 2 )
func (ClientDel_What) EnumDescriptor ¶
func (ClientDel_What) EnumDescriptor() ([]byte, []int)
func (ClientDel_What) String ¶
func (x ClientDel_What) String() string
type ClientGet ¶
type ClientGet struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` Query *GetQuery `protobuf:"bytes,3,opt,name=query" json:"query,omitempty"` }
Query topic state {get}
func (*ClientGet) Descriptor ¶
func (*ClientGet) ProtoMessage ¶
func (*ClientGet) ProtoMessage()
type ClientHi ¶
type ClientHi struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` Ver int32 `protobuf:"varint,3,opt,name=ver" json:"ver,omitempty"` DeviceId string `protobuf:"bytes,4,opt,name=device_id,json=deviceId" json:"device_id,omitempty"` Lang string `protobuf:"bytes,5,opt,name=lang" json:"lang,omitempty"` }
Client handshake
func (*ClientHi) Descriptor ¶
func (*ClientHi) GetDeviceId ¶
func (*ClientHi) GetUserAgent ¶
func (*ClientHi) ProtoMessage ¶
func (*ClientHi) ProtoMessage()
type ClientLeave ¶
type ClientLeave struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` Unsub bool `protobuf:"varint,3,opt,name=unsub" json:"unsub,omitempty"` }
Unsubscribe {leave} request message
func (*ClientLeave) Descriptor ¶
func (*ClientLeave) Descriptor() ([]byte, []int)
func (*ClientLeave) GetId ¶
func (m *ClientLeave) GetId() string
func (*ClientLeave) GetTopic ¶
func (m *ClientLeave) GetTopic() string
func (*ClientLeave) GetUnsub ¶
func (m *ClientLeave) GetUnsub() bool
func (*ClientLeave) ProtoMessage ¶
func (*ClientLeave) ProtoMessage()
func (*ClientLeave) Reset ¶
func (m *ClientLeave) Reset()
func (*ClientLeave) String ¶
func (m *ClientLeave) String() string
type ClientLogin ¶
type ClientLogin struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // Authentication scheme Scheme string `protobuf:"bytes,2,opt,name=scheme" json:"scheme,omitempty"` // Shared secret Secret []byte `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` }
Login {login} message
func (*ClientLogin) Descriptor ¶
func (*ClientLogin) Descriptor() ([]byte, []int)
func (*ClientLogin) GetId ¶
func (m *ClientLogin) GetId() string
func (*ClientLogin) GetScheme ¶
func (m *ClientLogin) GetScheme() string
func (*ClientLogin) GetSecret ¶
func (m *ClientLogin) GetSecret() []byte
func (*ClientLogin) ProtoMessage ¶
func (*ClientLogin) ProtoMessage()
func (*ClientLogin) Reset ¶
func (m *ClientLogin) Reset()
func (*ClientLogin) String ¶
func (m *ClientLogin) String() string
type ClientMsg ¶
type ClientMsg struct { // Types that are valid to be assigned to Message: // *ClientMsg_Hi // *ClientMsg_Acc // *ClientMsg_Login // *ClientMsg_Sub // *ClientMsg_Leave // *ClientMsg_Pub // *ClientMsg_Get // *ClientMsg_Set // *ClientMsg_Del // *ClientMsg_Note Message isClientMsg_Message `protobuf_oneof:"Message"` }
func (*ClientMsg) Descriptor ¶
func (*ClientMsg) GetLeave ¶
func (m *ClientMsg) GetLeave() *ClientLeave
func (*ClientMsg) GetLogin ¶
func (m *ClientMsg) GetLogin() *ClientLogin
func (*ClientMsg) GetMessage ¶
func (m *ClientMsg) GetMessage() isClientMsg_Message
func (*ClientMsg) GetNote ¶
func (m *ClientMsg) GetNote() *ClientNote
func (*ClientMsg) ProtoMessage ¶
func (*ClientMsg) ProtoMessage()
type ClientMsg_Acc ¶
type ClientMsg_Acc struct {
Acc *ClientAcc `protobuf:"bytes,2,opt,name=acc,oneof"`
}
type ClientMsg_Del ¶
type ClientMsg_Del struct {
Del *ClientDel `protobuf:"bytes,9,opt,name=del,oneof"`
}
type ClientMsg_Get ¶
type ClientMsg_Get struct {
Get *ClientGet `protobuf:"bytes,7,opt,name=get,oneof"`
}
type ClientMsg_Hi ¶
type ClientMsg_Hi struct {
Hi *ClientHi `protobuf:"bytes,1,opt,name=hi,oneof"`
}
type ClientMsg_Leave ¶
type ClientMsg_Leave struct {
Leave *ClientLeave `protobuf:"bytes,5,opt,name=leave,oneof"`
}
type ClientMsg_Login ¶
type ClientMsg_Login struct {
Login *ClientLogin `protobuf:"bytes,3,opt,name=login,oneof"`
}
type ClientMsg_Note ¶
type ClientMsg_Note struct {
Note *ClientNote `protobuf:"bytes,10,opt,name=note,oneof"`
}
type ClientMsg_Pub ¶
type ClientMsg_Pub struct {
Pub *ClientPub `protobuf:"bytes,6,opt,name=pub,oneof"`
}
type ClientMsg_Set ¶
type ClientMsg_Set struct {
Set *ClientSet `protobuf:"bytes,8,opt,name=set,oneof"`
}
type ClientMsg_Sub ¶
type ClientMsg_Sub struct {
Sub *ClientSub `protobuf:"bytes,4,opt,name=sub,oneof"`
}
type ClientNote ¶
type ClientNote struct { Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"` // what is being reported: "recv" - message received, "read" - message read, "kp" - typing notification What InfoNote `protobuf:"varint,2,opt,name=what,enum=pbx.InfoNote" json:"what,omitempty"` // Server-issued message ID being reported SeqId int32 `protobuf:"varint,3,opt,name=seq_id,json=seqId" json:"seq_id,omitempty"` }
ClientNote is a client-generated notification for topic subscribers
func (*ClientNote) Descriptor ¶
func (*ClientNote) Descriptor() ([]byte, []int)
func (*ClientNote) GetSeqId ¶
func (m *ClientNote) GetSeqId() int32
func (*ClientNote) GetTopic ¶
func (m *ClientNote) GetTopic() string
func (*ClientNote) GetWhat ¶
func (m *ClientNote) GetWhat() InfoNote
func (*ClientNote) ProtoMessage ¶
func (*ClientNote) ProtoMessage()
func (*ClientNote) Reset ¶
func (m *ClientNote) Reset()
func (*ClientNote) String ¶
func (m *ClientNote) String() string
type ClientPub ¶
type ClientPub struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` NoEcho bool `protobuf:"varint,3,opt,name=no_echo,json=noEcho" json:"no_echo,omitempty"` Head map[string]string `` /* 128-byte string literal not displayed */ Content []byte `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` }
ClientPub is client's request to publish data to topic subscribers {pub}
func (*ClientPub) Descriptor ¶
func (*ClientPub) GetContent ¶
func (*ClientPub) ProtoMessage ¶
func (*ClientPub) ProtoMessage()
type ClientReq ¶
type ClientReq struct { Msg *ClientMsg `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` Sess *Session `protobuf:"bytes,2,opt,name=sess" json:"sess,omitempty"` }
func (*ClientReq) Descriptor ¶
func (*ClientReq) ProtoMessage ¶
func (*ClientReq) ProtoMessage()
type ClientSet ¶
type ClientSet struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` Query *SetQuery `protobuf:"bytes,3,opt,name=query" json:"query,omitempty"` }
Update topic state {set}
func (*ClientSet) Descriptor ¶
func (*ClientSet) ProtoMessage ¶
func (*ClientSet) ProtoMessage()
type ClientSub ¶
type ClientSub struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` // mirrors {set} SetQuery *SetQuery `protobuf:"bytes,3,opt,name=set_query,json=setQuery" json:"set_query,omitempty"` // mirrors {get} GetQuery *GetQuery `protobuf:"bytes,4,opt,name=get_query,json=getQuery" json:"get_query,omitempty"` }
Subscription request {sub} message
func (*ClientSub) Descriptor ¶
func (*ClientSub) GetGetQuery ¶
func (*ClientSub) GetSetQuery ¶
func (*ClientSub) ProtoMessage ¶
func (*ClientSub) ProtoMessage()
type DefaultAcsMode ¶
type DefaultAcsMode struct { Auth string `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"` Anon string `protobuf:"bytes,2,opt,name=anon" json:"anon,omitempty"` }
Topic default access mode
func (*DefaultAcsMode) Descriptor ¶
func (*DefaultAcsMode) Descriptor() ([]byte, []int)
func (*DefaultAcsMode) GetAnon ¶
func (m *DefaultAcsMode) GetAnon() string
func (*DefaultAcsMode) GetAuth ¶
func (m *DefaultAcsMode) GetAuth() string
func (*DefaultAcsMode) ProtoMessage ¶
func (*DefaultAcsMode) ProtoMessage()
func (*DefaultAcsMode) Reset ¶
func (m *DefaultAcsMode) Reset()
func (*DefaultAcsMode) String ¶
func (m *DefaultAcsMode) String() string
type GetOpts ¶
type GetOpts struct { IfModifiedSince int64 `protobuf:"varint,1,opt,name=if_modified_since,json=ifModifiedSince" json:"if_modified_since,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"` }
func (*GetOpts) Descriptor ¶
func (*GetOpts) GetIfModifiedSince ¶
func (*GetOpts) ProtoMessage ¶
func (*GetOpts) ProtoMessage()
type GetQuery ¶
type GetQuery struct { What string `protobuf:"bytes,1,opt,name=what" json:"what,omitempty"` // Parameters of "desc" request Desc *GetOpts `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"` // Parameters of "sub" request Sub *GetOpts `protobuf:"bytes,3,opt,name=sub" json:"sub,omitempty"` // Parameters of "data" request Data *BrowseOpts `protobuf:"bytes,4,opt,name=data" json:"data,omitempty"` }
func (*GetQuery) Descriptor ¶
func (*GetQuery) GetData ¶
func (m *GetQuery) GetData() *BrowseOpts
func (*GetQuery) ProtoMessage ¶
func (*GetQuery) ProtoMessage()
type MessageEvent ¶
type MessageEvent struct {
Action Crud `protobuf:"varint,1,opt,name=action,enum=pbx.Crud" json:"action,omitempty"`
}
func (*MessageEvent) Descriptor ¶
func (*MessageEvent) Descriptor() ([]byte, []int)
func (*MessageEvent) GetAction ¶
func (m *MessageEvent) GetAction() Crud
func (*MessageEvent) ProtoMessage ¶
func (*MessageEvent) ProtoMessage()
func (*MessageEvent) Reset ¶
func (m *MessageEvent) Reset()
func (*MessageEvent) String ¶
func (m *MessageEvent) String() string
type NodeClient ¶
type NodeClient interface { // Client sends a stream of ClientMsg, server responds with a stream of ServerMsg MessageLoop(ctx context.Context, opts ...grpc.CallOption) (Node_MessageLoopClient, error) }
func NewNodeClient ¶
func NewNodeClient(cc *grpc.ClientConn) NodeClient
type NodeServer ¶
type NodeServer interface { // Client sends a stream of ClientMsg, server responds with a stream of ServerMsg MessageLoop(Node_MessageLoopServer) error }
type Node_MessageLoopClient ¶
type Node_MessageLoopServer ¶
type PluginClient ¶
type PluginClient interface { // This plugin method is called by Tinode server for every message received from the clients. The // method returns a ServerCtrl message. ServerCtrl.code is *not* 0 indicates that no further // processing is needed. The Tinode server will generate a {ctrl} message from the returned ServerCtrl // and forward it to the client session. // If ServerCtrl.code is 0, the server should continue with default processing of the client message. FireHose(ctx context.Context, in *ClientReq, opts ...grpc.CallOption) (*ServerResp, error) // Account created, updated or deleted Account(ctx context.Context, in *AccountEvent, opts ...grpc.CallOption) (*Unused, error) // Topic created, updated [or deleted -- not supported yet] Topic(ctx context.Context, in *TopicEvent, opts ...grpc.CallOption) (*Unused, error) // Subscription created, updated or deleted Subscription(ctx context.Context, in *SubscriptionEvent, opts ...grpc.CallOption) (*Unused, error) // Message published or deleted Message(ctx context.Context, in *MessageEvent, opts ...grpc.CallOption) (*Unused, error) }
func NewPluginClient ¶
func NewPluginClient(cc *grpc.ClientConn) PluginClient
type PluginServer ¶
type PluginServer interface { // This plugin method is called by Tinode server for every message received from the clients. The // method returns a ServerCtrl message. ServerCtrl.code is *not* 0 indicates that no further // processing is needed. The Tinode server will generate a {ctrl} message from the returned ServerCtrl // and forward it to the client session. // If ServerCtrl.code is 0, the server should continue with default processing of the client message. FireHose(context.Context, *ClientReq) (*ServerResp, error) // Account created, updated or deleted Account(context.Context, *AccountEvent) (*Unused, error) // Topic created, updated [or deleted -- not supported yet] Topic(context.Context, *TopicEvent) (*Unused, error) // Subscription created, updated or deleted Subscription(context.Context, *SubscriptionEvent) (*Unused, error) // Message published or deleted Message(context.Context, *MessageEvent) (*Unused, error) }
type ServerCtrl ¶
type ServerCtrl struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` Code int32 `protobuf:"varint,3,opt,name=code" json:"code,omitempty"` Text string `protobuf:"bytes,4,opt,name=text" json:"text,omitempty"` Params map[string][]byte `` /* 139-byte string literal not displayed */ }
{ctrl} message
func (*ServerCtrl) Descriptor ¶
func (*ServerCtrl) Descriptor() ([]byte, []int)
func (*ServerCtrl) GetCode ¶
func (m *ServerCtrl) GetCode() int32
func (*ServerCtrl) GetId ¶
func (m *ServerCtrl) GetId() string
func (*ServerCtrl) GetParams ¶
func (m *ServerCtrl) GetParams() map[string][]byte
func (*ServerCtrl) GetText ¶
func (m *ServerCtrl) GetText() string
func (*ServerCtrl) GetTopic ¶
func (m *ServerCtrl) GetTopic() string
func (*ServerCtrl) ProtoMessage ¶
func (*ServerCtrl) ProtoMessage()
func (*ServerCtrl) Reset ¶
func (m *ServerCtrl) Reset()
func (*ServerCtrl) String ¶
func (m *ServerCtrl) String() string
type ServerData ¶
type ServerData struct { Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"` // ID of the user who originated the message as {pub}, could be empty if sent by the system FromUserId string `protobuf:"bytes,2,opt,name=from_user_id,json=fromUserId" json:"from_user_id,omitempty"` // Timestamp when the message was deleted or 0. Milliseconds since the epoch 01/01/1970 DeletedAt int64 `protobuf:"varint,3,opt,name=deleted_at,json=deletedAt" json:"deleted_at,omitempty"` SeqId int32 `protobuf:"varint,4,opt,name=seq_id,json=seqId" json:"seq_id,omitempty"` Head map[string]string `` /* 128-byte string literal not displayed */ Content []byte `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` }
{data} message
func (*ServerData) Descriptor ¶
func (*ServerData) Descriptor() ([]byte, []int)
func (*ServerData) GetContent ¶
func (m *ServerData) GetContent() []byte
func (*ServerData) GetDeletedAt ¶
func (m *ServerData) GetDeletedAt() int64
func (*ServerData) GetFromUserId ¶
func (m *ServerData) GetFromUserId() string
func (*ServerData) GetHead ¶
func (m *ServerData) GetHead() map[string]string
func (*ServerData) GetSeqId ¶
func (m *ServerData) GetSeqId() int32
func (*ServerData) GetTopic ¶
func (m *ServerData) GetTopic() string
func (*ServerData) ProtoMessage ¶
func (*ServerData) ProtoMessage()
func (*ServerData) Reset ¶
func (m *ServerData) Reset()
func (*ServerData) String ¶
func (m *ServerData) String() string
type ServerInfo ¶
type ServerInfo struct { Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"` FromUserId string `protobuf:"bytes,2,opt,name=from_user_id,json=fromUserId" json:"from_user_id,omitempty"` What InfoNote `protobuf:"varint,3,opt,name=what,enum=pbx.InfoNote" json:"what,omitempty"` SeqId int32 `protobuf:"varint,4,opt,name=seq_id,json=seqId" json:"seq_id,omitempty"` }
{info} message: server-side copy of ClientNote with From added
func (*ServerInfo) Descriptor ¶
func (*ServerInfo) Descriptor() ([]byte, []int)
func (*ServerInfo) GetFromUserId ¶
func (m *ServerInfo) GetFromUserId() string
func (*ServerInfo) GetSeqId ¶
func (m *ServerInfo) GetSeqId() int32
func (*ServerInfo) GetTopic ¶
func (m *ServerInfo) GetTopic() string
func (*ServerInfo) GetWhat ¶
func (m *ServerInfo) GetWhat() InfoNote
func (*ServerInfo) ProtoMessage ¶
func (*ServerInfo) ProtoMessage()
func (*ServerInfo) Reset ¶
func (m *ServerInfo) Reset()
func (*ServerInfo) String ¶
func (m *ServerInfo) String() string
type ServerMeta ¶
type ServerMeta struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"` Desc *TopicDesc `protobuf:"bytes,3,opt,name=desc" json:"desc,omitempty"` Sub []*TopicSub `protobuf:"bytes,4,rep,name=sub" json:"sub,omitempty"` }
{meta} message
func (*ServerMeta) Descriptor ¶
func (*ServerMeta) Descriptor() ([]byte, []int)
func (*ServerMeta) GetDesc ¶
func (m *ServerMeta) GetDesc() *TopicDesc
func (*ServerMeta) GetId ¶
func (m *ServerMeta) GetId() string
func (*ServerMeta) GetSub ¶
func (m *ServerMeta) GetSub() []*TopicSub
func (*ServerMeta) GetTopic ¶
func (m *ServerMeta) GetTopic() string
func (*ServerMeta) ProtoMessage ¶
func (*ServerMeta) ProtoMessage()
func (*ServerMeta) Reset ¶
func (m *ServerMeta) Reset()
func (*ServerMeta) String ¶
func (m *ServerMeta) String() string
type ServerMsg ¶
type ServerMsg struct { // Types that are valid to be assigned to Message: // *ServerMsg_Ctrl // *ServerMsg_Data // *ServerMsg_Pres // *ServerMsg_Meta // *ServerMsg_Info Message isServerMsg_Message `protobuf_oneof:"Message"` }
Cumulative message
func (*ServerMsg) Descriptor ¶
func (*ServerMsg) GetCtrl ¶
func (m *ServerMsg) GetCtrl() *ServerCtrl
func (*ServerMsg) GetData ¶
func (m *ServerMsg) GetData() *ServerData
func (*ServerMsg) GetInfo ¶
func (m *ServerMsg) GetInfo() *ServerInfo
func (*ServerMsg) GetMessage ¶
func (m *ServerMsg) GetMessage() isServerMsg_Message
func (*ServerMsg) GetMeta ¶
func (m *ServerMsg) GetMeta() *ServerMeta
func (*ServerMsg) GetPres ¶
func (m *ServerMsg) GetPres() *ServerPres
func (*ServerMsg) ProtoMessage ¶
func (*ServerMsg) ProtoMessage()
type ServerMsg_Ctrl ¶
type ServerMsg_Ctrl struct {
Ctrl *ServerCtrl `protobuf:"bytes,1,opt,name=ctrl,oneof"`
}
type ServerMsg_Data ¶
type ServerMsg_Data struct {
Data *ServerData `protobuf:"bytes,2,opt,name=data,oneof"`
}
type ServerMsg_Info ¶
type ServerMsg_Info struct {
Info *ServerInfo `protobuf:"bytes,5,opt,name=info,oneof"`
}
type ServerMsg_Meta ¶
type ServerMsg_Meta struct {
Meta *ServerMeta `protobuf:"bytes,4,opt,name=meta,oneof"`
}
type ServerMsg_Pres ¶
type ServerMsg_Pres struct {
Pres *ServerPres `protobuf:"bytes,3,opt,name=pres,oneof"`
}
type ServerPres ¶
type ServerPres struct { Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"` Src string `protobuf:"bytes,2,opt,name=src" json:"src,omitempty"` What ServerPres_What `protobuf:"varint,3,opt,name=what,enum=pbx.ServerPres_What" json:"what,omitempty"` UserAgent string `protobuf:"bytes,4,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` SeqId int32 `protobuf:"varint,5,opt,name=seq_id,json=seqId" json:"seq_id,omitempty"` SeqList []int32 `protobuf:"varint,6,rep,packed,name=seq_list,json=seqList" json:"seq_list,omitempty"` TargetUserId string `protobuf:"bytes,7,opt,name=target_user_id,json=targetUserId" json:"target_user_id,omitempty"` ActorUserId string `protobuf:"bytes,8,opt,name=actor_user_id,json=actorUserId" json:"actor_user_id,omitempty"` Acs *AccessMode `protobuf:"bytes,9,opt,name=acs" json:"acs,omitempty"` }
{pres} message
func (*ServerPres) Descriptor ¶
func (*ServerPres) Descriptor() ([]byte, []int)
func (*ServerPres) GetAcs ¶
func (m *ServerPres) GetAcs() *AccessMode
func (*ServerPres) GetActorUserId ¶
func (m *ServerPres) GetActorUserId() string
func (*ServerPres) GetSeqId ¶
func (m *ServerPres) GetSeqId() int32
func (*ServerPres) GetSeqList ¶
func (m *ServerPres) GetSeqList() []int32
func (*ServerPres) GetSrc ¶
func (m *ServerPres) GetSrc() string
func (*ServerPres) GetTargetUserId ¶
func (m *ServerPres) GetTargetUserId() string
func (*ServerPres) GetTopic ¶
func (m *ServerPres) GetTopic() string
func (*ServerPres) GetUserAgent ¶
func (m *ServerPres) GetUserAgent() string
func (*ServerPres) GetWhat ¶
func (m *ServerPres) GetWhat() ServerPres_What
func (*ServerPres) ProtoMessage ¶
func (*ServerPres) ProtoMessage()
func (*ServerPres) Reset ¶
func (m *ServerPres) Reset()
func (*ServerPres) String ¶
func (m *ServerPres) String() string
type ServerPres_What ¶
type ServerPres_What int32
const ( ServerPres_ON ServerPres_What = 0 ServerPres_OFF ServerPres_What = 1 ServerPres_UA ServerPres_What = 3 ServerPres_UPD ServerPres_What = 4 ServerPres_GONE ServerPres_What = 5 ServerPres_ACS ServerPres_What = 6 ServerPres_TERM ServerPres_What = 7 ServerPres_MSG ServerPres_What = 8 ServerPres_READ ServerPres_What = 9 ServerPres_RECV ServerPres_What = 10 ServerPres_DEL ServerPres_What = 11 )
func (ServerPres_What) EnumDescriptor ¶
func (ServerPres_What) EnumDescriptor() ([]byte, []int)
func (ServerPres_What) String ¶
func (x ServerPres_What) String() string
type ServerResp ¶
type ServerResp struct { Status ServerResp_RespCode `protobuf:"varint,1,opt,name=status,enum=pbx.ServerResp_RespCode" json:"status,omitempty"` Srvmsg *ServerMsg `protobuf:"bytes,2,opt,name=srvmsg" json:"srvmsg,omitempty"` Clmsg *ClientMsg `protobuf:"bytes,3,opt,name=clmsg" json:"clmsg,omitempty"` }
func (*ServerResp) Descriptor ¶
func (*ServerResp) Descriptor() ([]byte, []int)
func (*ServerResp) GetClmsg ¶
func (m *ServerResp) GetClmsg() *ClientMsg
func (*ServerResp) GetSrvmsg ¶
func (m *ServerResp) GetSrvmsg() *ServerMsg
func (*ServerResp) GetStatus ¶
func (m *ServerResp) GetStatus() ServerResp_RespCode
func (*ServerResp) ProtoMessage ¶
func (*ServerResp) ProtoMessage()
func (*ServerResp) Reset ¶
func (m *ServerResp) Reset()
func (*ServerResp) String ¶
func (m *ServerResp) String() string
type ServerResp_RespCode ¶
type ServerResp_RespCode int32
Plugin response codes
const ( // Instruct Tinode server to continue with default processing of the client message. ServerResp_CONTINUE ServerResp_RespCode = 0 // Drop the message as if the client did not send it ServerResp_DROP ServerResp_RespCode = 1 // Respond to client with the provided srvmsg ServerResp_RESPOND ServerResp_RespCode = 2 // Replace client's original message with the provided clmsg then continue with // processing. ServerResp_REPLACE ServerResp_RespCode = 3 )
func (ServerResp_RespCode) EnumDescriptor ¶
func (ServerResp_RespCode) EnumDescriptor() ([]byte, []int)
func (ServerResp_RespCode) String ¶
func (x ServerResp_RespCode) String() string
type Session ¶
type Session struct { SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId" json:"session_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId" json:"user_id,omitempty"` AuthLevel Session_AuthLevel `protobuf:"varint,3,opt,name=auth_level,json=authLevel,enum=pbx.Session_AuthLevel" json:"auth_level,omitempty"` RemoteAddr string `protobuf:"bytes,4,opt,name=remote_addr,json=remoteAddr" json:"remote_addr,omitempty"` UserAgent string `protobuf:"bytes,5,opt,name=user_agent,json=userAgent" json:"user_agent,omitempty"` DeviceId string `protobuf:"bytes,6,opt,name=device_id,json=deviceId" json:"device_id,omitempty"` Language string `protobuf:"bytes,7,opt,name=language" json:"language,omitempty"` }
Context message
func (*Session) Descriptor ¶
func (*Session) GetAuthLevel ¶
func (m *Session) GetAuthLevel() Session_AuthLevel
func (*Session) GetDeviceId ¶
func (*Session) GetLanguage ¶
func (*Session) GetRemoteAddr ¶
func (*Session) GetSessionId ¶
func (*Session) GetUserAgent ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
type Session_AuthLevel ¶
type Session_AuthLevel int32
const ( Session_NONE Session_AuthLevel = 0 Session_ANON Session_AuthLevel = 10 Session_AUTH Session_AuthLevel = 20 Session_ROOT Session_AuthLevel = 30 )
func (Session_AuthLevel) EnumDescriptor ¶
func (Session_AuthLevel) EnumDescriptor() ([]byte, []int)
func (Session_AuthLevel) String ¶
func (x Session_AuthLevel) String() string
type SetDesc ¶
type SetDesc struct { DefaultAcs *DefaultAcsMode `protobuf:"bytes,1,opt,name=default_acs,json=defaultAcs" json:"default_acs,omitempty"` Public []byte `protobuf:"bytes,2,opt,name=public,proto3" json:"public,omitempty"` Private []byte `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"` }
SetDesc: C2S in set.what == "desc" and sub.init message
func (*SetDesc) Descriptor ¶
func (*SetDesc) GetDefaultAcs ¶
func (m *SetDesc) GetDefaultAcs() *DefaultAcsMode
func (*SetDesc) GetPrivate ¶
func (*SetDesc) ProtoMessage ¶
func (*SetDesc) ProtoMessage()
type SetQuery ¶
type SetQuery struct { // Topic metadata, new topic & new subscriptions only Desc *SetDesc `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"` // Subscription parameters Sub *SetSub `protobuf:"bytes,2,opt,name=sub" json:"sub,omitempty"` }
func (*SetQuery) Descriptor ¶
func (*SetQuery) ProtoMessage ¶
func (*SetQuery) ProtoMessage()
type SetSub ¶
type SetSub struct { // User affected by this request. Default (empty): current user UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"` // Access mode change, either Given or Want depending on context Mode string `protobuf:"bytes,2,opt,name=mode" json:"mode,omitempty"` }
SetSub: payload in set.sub request to update current subscription or invite another user, {sub.what} == "sub"
func (*SetSub) Descriptor ¶
func (*SetSub) ProtoMessage ¶
func (*SetSub) ProtoMessage()
type SubscriptionEvent ¶
type SubscriptionEvent struct { Action Crud `protobuf:"varint,1,opt,name=action,enum=pbx.Crud" json:"action,omitempty"` SubId string `protobuf:"bytes,2,opt,name=sub_id,json=subId" json:"sub_id,omitempty"` Sub *TopicSub `protobuf:"bytes,3,opt,name=sub" json:"sub,omitempty"` }
func (*SubscriptionEvent) Descriptor ¶
func (*SubscriptionEvent) Descriptor() ([]byte, []int)
func (*SubscriptionEvent) GetAction ¶
func (m *SubscriptionEvent) GetAction() Crud
func (*SubscriptionEvent) GetSub ¶
func (m *SubscriptionEvent) GetSub() *TopicSub
func (*SubscriptionEvent) GetSubId ¶
func (m *SubscriptionEvent) GetSubId() string
func (*SubscriptionEvent) ProtoMessage ¶
func (*SubscriptionEvent) ProtoMessage()
func (*SubscriptionEvent) Reset ¶
func (m *SubscriptionEvent) Reset()
func (*SubscriptionEvent) String ¶
func (m *SubscriptionEvent) String() string
type TopicDesc ¶
type TopicDesc struct { CreatedAt int64 `protobuf:"varint,1,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,2,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` Defacs *DefaultAcsMode `protobuf:"bytes,3,opt,name=defacs" json:"defacs,omitempty"` Acs *AccessMode `protobuf:"bytes,4,opt,name=acs" json:"acs,omitempty"` SeqId int32 `protobuf:"varint,5,opt,name=seq_id,json=seqId" json:"seq_id,omitempty"` ReadId int32 `protobuf:"varint,6,opt,name=read_id,json=readId" json:"read_id,omitempty"` RecvId int32 `protobuf:"varint,7,opt,name=recv_id,json=recvId" json:"recv_id,omitempty"` ClearId int32 `protobuf:"varint,8,opt,name=clear_id,json=clearId" json:"clear_id,omitempty"` Public []byte `protobuf:"bytes,9,opt,name=public,proto3" json:"public,omitempty"` Private []byte `protobuf:"bytes,10,opt,name=private,proto3" json:"private,omitempty"` }
Topic description, S2C in Meta message
func (*TopicDesc) Descriptor ¶
func (*TopicDesc) GetAcs ¶
func (m *TopicDesc) GetAcs() *AccessMode
func (*TopicDesc) GetClearId ¶
func (*TopicDesc) GetCreatedAt ¶
func (*TopicDesc) GetDefacs ¶
func (m *TopicDesc) GetDefacs() *DefaultAcsMode
func (*TopicDesc) GetPrivate ¶
func (*TopicDesc) GetUpdatedAt ¶
func (*TopicDesc) ProtoMessage ¶
func (*TopicDesc) ProtoMessage()
type TopicEvent ¶
type TopicEvent struct { Action Crud `protobuf:"varint,1,opt,name=action,enum=pbx.Crud" json:"action,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Desc *TopicDesc `protobuf:"bytes,3,opt,name=desc" json:"desc,omitempty"` }
func (*TopicEvent) Descriptor ¶
func (*TopicEvent) Descriptor() ([]byte, []int)
func (*TopicEvent) GetAction ¶
func (m *TopicEvent) GetAction() Crud
func (*TopicEvent) GetDesc ¶
func (m *TopicEvent) GetDesc() *TopicDesc
func (*TopicEvent) GetName ¶
func (m *TopicEvent) GetName() string
func (*TopicEvent) ProtoMessage ¶
func (*TopicEvent) ProtoMessage()
func (*TopicEvent) Reset ¶
func (m *TopicEvent) Reset()
func (*TopicEvent) String ¶
func (m *TopicEvent) String() string
type TopicSub ¶
type TopicSub struct { UpdatedAt int64 `protobuf:"varint,1,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` DeletedAt int64 `protobuf:"varint,2,opt,name=deleted_at,json=deletedAt" json:"deleted_at,omitempty"` Online bool `protobuf:"varint,3,opt,name=online" json:"online,omitempty"` Acs *AccessMode `protobuf:"bytes,4,opt,name=acs" json:"acs,omitempty"` ReadId int32 `protobuf:"varint,5,opt,name=read_id,json=readId" json:"read_id,omitempty"` RecvId int32 `protobuf:"varint,6,opt,name=recv_id,json=recvId" json:"recv_id,omitempty"` Public []byte `protobuf:"bytes,7,opt,name=public,proto3" json:"public,omitempty"` Private []byte `protobuf:"bytes,8,opt,name=private,proto3" json:"private,omitempty"` // Uid of the subscribed user UserId string `protobuf:"bytes,9,opt,name=user_id,json=userId" json:"user_id,omitempty"` // Topic name of this subscription Topic string `protobuf:"bytes,10,opt,name=topic" json:"topic,omitempty"` // ID of the last {data} message in a topic SeqId int32 `protobuf:"varint,11,opt,name=seq_id,json=seqId" json:"seq_id,omitempty"` // Messages are deleted up to this ID ClearId int32 `protobuf:"varint,12,opt,name=clear_id,json=clearId" json:"clear_id,omitempty"` // Other user's last online timestamp & user agent LastSeenTime int64 `protobuf:"varint,13,opt,name=last_seen_time,json=lastSeenTime" json:"last_seen_time,omitempty"` LastSeenUserAgent string `protobuf:"bytes,14,opt,name=last_seen_user_agent,json=lastSeenUserAgent" json:"last_seen_user_agent,omitempty"` }
MsgTopicSub: topic subscription details, sent in Meta message
func (*TopicSub) Descriptor ¶
func (*TopicSub) GetAcs ¶
func (m *TopicSub) GetAcs() *AccessMode
func (*TopicSub) GetClearId ¶
func (*TopicSub) GetDeletedAt ¶
func (*TopicSub) GetLastSeenTime ¶
func (*TopicSub) GetLastSeenUserAgent ¶
func (*TopicSub) GetPrivate ¶
func (*TopicSub) GetUpdatedAt ¶
func (*TopicSub) ProtoMessage ¶
func (*TopicSub) ProtoMessage()