chatpb

package
v0.0.0-...-e9f8cd1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 19 Imported by: 1

Documentation

Overview

Package chatpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package chatpb is a generated protocol buffer package.

It is generated from these files:

github.com/molon/gochat/pb/chatpb/model.proto
github.com/molon/gochat/pb/chatpb/chat.proto

It has these top-level messages:

Text
Image
EventEnter
EventQuit
EventClose
Body
Message
Conversation
UidConversation
Auth
GetUidConversationsRequest
GetUidConversationsResponse
CreateConversationRequest
CreateConversationResponse
InviteIntoConversationRequest
MuteUidConversationRequest
SendMessageRequest
SendMessageResponse
ChangeManagerOfConversationRequest
CloseConversationRequest
KickFromConversationRequest

Index

Constants

This section is empty.

Variables

View Source
var Body_Type_name = map[int32]string{
	0:   "UNKNOWN",
	1:   "TEXT",
	2:   "IMAGE",
	101: "EVENT_ENTER",
	102: "EVENT_QUIT",
	103: "EVENT_CLOSE",
}
View Source
var Body_Type_value = map[string]int32{
	"UNKNOWN":     0,
	"TEXT":        1,
	"IMAGE":       2,
	"EVENT_ENTER": 101,
	"EVENT_QUIT":  102,
	"EVENT_CLOSE": 103,
}
View Source
var Conversation_Status_name = map[int32]string{
	0: "UNKNOWN_STATUS",
	1: "OPEN",
	2: "CLOSE",
}
View Source
var Conversation_Status_value = map[string]int32{
	"UNKNOWN_STATUS": 0,
	"OPEN":           1,
	"CLOSE":          2,
}
View Source
var Conversation_Type_name = map[int32]string{
	0: "UNKNOWN_TYPE",
	1: "ONE2ONE",
	2: "GROUP",
}
View Source
var Conversation_Type_value = map[string]int32{
	"UNKNOWN_TYPE": 0,
	"ONE2ONE":      1,
	"GROUP":        2,
}
View Source
var EventClose_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "BY_MANAGER",
	2: "BY_SYSTEM",
}
View Source
var EventClose_Type_value = map[string]int32{
	"UNKNOWN":    0,
	"BY_MANAGER": 1,
	"BY_SYSTEM":  2,
}
View Source
var EventEnter_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "CREATOR",
	2: "INVITE",
	3: "SCAN_QR_CODE",
}
View Source
var EventEnter_Type_value = map[string]int32{
	"UNKNOWN":      0,
	"CREATOR":      1,
	"INVITE":       2,
	"SCAN_QR_CODE": 3,
}
View Source
var EventQuit_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "WILL",
	2: "KICK",
}
View Source
var EventQuit_Type_value = map[string]int32{
	"UNKNOWN": 0,
	"WILL":    1,
	"KICK":    2,
}
View Source
var Image_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "STATIC",
	2: "DYNAMIC",
}
View Source
var Image_Type_value = map[string]int32{
	"UNKNOWN": 0,
	"STATIC":  1,
	"DYNAMIC": 2,
}

Functions

func RegisterChatHandler

func RegisterChatHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterChatHandler registers the http handlers for service Chat to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterChatHandlerClient

func RegisterChatHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChatClient) error

RegisterChatHandler registers the http handlers for service Chat to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChatClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChatClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChatClient" to call the correct interceptors.

func RegisterChatHandlerFromEndpoint

func RegisterChatHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterChatHandlerFromEndpoint is same as RegisterChatHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterChatServer

func RegisterChatServer(s *grpc.Server, srv ChatServer)

Types

type Auth

type Auth struct {
	Uid      string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
	Platform string `protobuf:"bytes,2,opt,name=platform" json:"platform,omitempty"`
}

func (*Auth) Descriptor

func (*Auth) Descriptor() ([]byte, []int)

func (*Auth) GetPlatform

func (m *Auth) GetPlatform() string

func (*Auth) GetUid

func (m *Auth) GetUid() string

func (*Auth) ProtoMessage

func (*Auth) ProtoMessage()

func (*Auth) Reset

func (m *Auth) Reset()

func (*Auth) String

func (m *Auth) String() string

type Body

type Body struct {
	// Types that are valid to be assigned to M:
	//	*Body_Text
	//	*Body_Image
	//	*Body_EventEnter
	//	*Body_EventQuit
	//	*Body_EventClose
	M isBody_M `protobuf_oneof:"M"`
}

单独开出来使用比较方便

func (*Body) Descriptor

func (*Body) Descriptor() ([]byte, []int)

func (*Body) GetEventClose

func (m *Body) GetEventClose() *EventClose

func (*Body) GetEventEnter

func (m *Body) GetEventEnter() *EventEnter

func (*Body) GetEventQuit

func (m *Body) GetEventQuit() *EventQuit

func (*Body) GetImage

func (m *Body) GetImage() *Image

func (*Body) GetM

func (m *Body) GetM() isBody_M

func (*Body) GetText

func (m *Body) GetText() *Text

func (*Body) IsUserType

func (j *Body) IsUserType() bool

func (*Body) ProtoMessage

func (*Body) ProtoMessage()

func (*Body) Reset

func (m *Body) Reset()

func (*Body) Scan

func (j *Body) Scan(value interface{}) error

func (*Body) String

func (m *Body) String() string

func (*Body) Type

func (j *Body) Type() Body_Type

func (Body) Value

func (j Body) Value() (driver.Value, error)

func (*Body) XXX_OneofFuncs

func (*Body) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Body_EventClose

type Body_EventClose struct {
	EventClose *EventClose `protobuf:"bytes,103,opt,name=event_close,json=eventClose,oneof"`
}

type Body_EventEnter

type Body_EventEnter struct {
	EventEnter *EventEnter `protobuf:"bytes,101,opt,name=event_enter,json=eventEnter,oneof"`
}

type Body_EventQuit

type Body_EventQuit struct {
	EventQuit *EventQuit `protobuf:"bytes,102,opt,name=event_quit,json=eventQuit,oneof"`
}

type Body_Image

type Body_Image struct {
	Image *Image `protobuf:"bytes,2,opt,name=image,oneof"`
}

type Body_Text

type Body_Text struct {
	Text *Text `protobuf:"bytes,1,opt,name=text,oneof"`
}

type Body_Type

type Body_Type int32

1-99 留给用户可发送类型使用 每次添加类型后请记得去 body_value 里相应处理下

const (
	Body_UNKNOWN     Body_Type = 0
	Body_TEXT        Body_Type = 1
	Body_IMAGE       Body_Type = 2
	Body_EVENT_ENTER Body_Type = 101
	Body_EVENT_QUIT  Body_Type = 102
	Body_EVENT_CLOSE Body_Type = 103
)

func (Body_Type) EnumDescriptor

func (Body_Type) EnumDescriptor() ([]byte, []int)

func (Body_Type) String

func (x Body_Type) String() string

type ChangeManagerOfConversationRequest

type ChangeManagerOfConversationRequest struct {
	// 只有对话的 manager_uid 才可操作
	Auth       *Auth  `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	Cid        string `protobuf:"bytes,11,opt,name=cid" json:"cid,omitempty"`
	ManagerUid string `protobuf:"bytes,12,opt,name=manager_uid,json=managerUid" json:"manager_uid,omitempty"`
}

func (*ChangeManagerOfConversationRequest) Descriptor

func (*ChangeManagerOfConversationRequest) Descriptor() ([]byte, []int)

func (*ChangeManagerOfConversationRequest) GetAuth

func (*ChangeManagerOfConversationRequest) GetCid

func (*ChangeManagerOfConversationRequest) GetManagerUid

func (m *ChangeManagerOfConversationRequest) GetManagerUid() string

func (*ChangeManagerOfConversationRequest) ProtoMessage

func (*ChangeManagerOfConversationRequest) ProtoMessage()

func (*ChangeManagerOfConversationRequest) Reset

func (*ChangeManagerOfConversationRequest) String

type ChatClient

type ChatClient interface {
	GetUidConversations(ctx context.Context, in *GetUidConversationsRequest, opts ...grpc.CallOption) (*GetUidConversationsResponse, error)
	CreateConversation(ctx context.Context, in *CreateConversationRequest, opts ...grpc.CallOption) (*CreateConversationResponse, error)
	MuteUidConversation(ctx context.Context, in *MuteUidConversationRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	ChangeManagerOfConversation(ctx context.Context, in *ChangeManagerOfConversationRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	CloseConversation(ctx context.Context, in *CloseConversationRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	KickFromConversation(ctx context.Context, in *KickFromConversationRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	InviteIntoConversation(ctx context.Context, in *InviteIntoConversationRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
	SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error)
}

func NewChatClient

func NewChatClient(cc *grpc.ClientConn) ChatClient

type CloseConversationRequest

type CloseConversationRequest struct {
	// 操作者
	Auth *Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// 对话id
	Cid string `protobuf:"bytes,11,opt,name=cid" json:"cid,omitempty"`
	// 操作类型
	CloseType EventClose_Type `protobuf:"varint,12,opt,name=close_type,json=closeType,enum=chatpb.EventClose_Type" json:"close_type,omitempty"`
}

func (*CloseConversationRequest) Descriptor

func (*CloseConversationRequest) Descriptor() ([]byte, []int)

func (*CloseConversationRequest) GetAuth

func (m *CloseConversationRequest) GetAuth() *Auth

func (*CloseConversationRequest) GetCid

func (m *CloseConversationRequest) GetCid() string

func (*CloseConversationRequest) GetCloseType

func (m *CloseConversationRequest) GetCloseType() EventClose_Type

func (*CloseConversationRequest) ProtoMessage

func (*CloseConversationRequest) ProtoMessage()

func (*CloseConversationRequest) Reset

func (m *CloseConversationRequest) Reset()

func (*CloseConversationRequest) String

func (m *CloseConversationRequest) String() string

type Conversation

type Conversation struct {
	// 对话id
	Id         string                     `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	CreatedAt  *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
	Type       Conversation_Type          `protobuf:"varint,3,opt,name=type,enum=chatpb.Conversation_Type" json:"type,omitempty"`
	CreatorUid string                     `protobuf:"bytes,4,opt,name=creator_uid,json=creatorUid" json:"creator_uid,omitempty"`
	// 状态
	Status     Conversation_Status `protobuf:"varint,11,opt,name=status,enum=chatpb.Conversation_Status" json:"status,omitempty"`
	ManagerUid string              `protobuf:"bytes,12,opt,name=manager_uid,json=managerUid" json:"manager_uid,omitempty"`
	// 成员uids
	MemberUids []string `protobuf:"bytes,21,rep,name=member_uids,json=memberUids" json:"member_uids,omitempty"`
}

对话信息

func (*Conversation) Descriptor

func (*Conversation) Descriptor() ([]byte, []int)

func (*Conversation) GetCreatedAt

func (m *Conversation) GetCreatedAt() *google_protobuf.Timestamp

func (*Conversation) GetCreatorUid

func (m *Conversation) GetCreatorUid() string

func (*Conversation) GetId

func (m *Conversation) GetId() string

func (*Conversation) GetManagerUid

func (m *Conversation) GetManagerUid() string

func (*Conversation) GetMemberUids

func (m *Conversation) GetMemberUids() []string

func (*Conversation) GetStatus

func (m *Conversation) GetStatus() Conversation_Status

func (*Conversation) GetType

func (m *Conversation) GetType() Conversation_Type

func (*Conversation) ProtoMessage

func (*Conversation) ProtoMessage()

func (*Conversation) Reset

func (m *Conversation) Reset()

func (*Conversation) String

func (m *Conversation) String() string

type Conversation_Status

type Conversation_Status int32
const (
	Conversation_UNKNOWN_STATUS Conversation_Status = 0
	Conversation_OPEN           Conversation_Status = 1
	Conversation_CLOSE          Conversation_Status = 2
)

func (Conversation_Status) EnumDescriptor

func (Conversation_Status) EnumDescriptor() ([]byte, []int)

func (Conversation_Status) String

func (x Conversation_Status) String() string

type Conversation_Type

type Conversation_Type int32

只可以有这两种

const (
	Conversation_UNKNOWN_TYPE Conversation_Type = 0
	Conversation_ONE2ONE      Conversation_Type = 1
	Conversation_GROUP        Conversation_Type = 2
)

func (Conversation_Type) EnumDescriptor

func (Conversation_Type) EnumDescriptor() ([]byte, []int)

func (Conversation_Type) String

func (x Conversation_Type) String() string

type CreateConversationRequest

type CreateConversationRequest struct {
	// 最终 auth.uid 会是 creator_uid 和 manager_uid
	Auth *Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// 单聊/群组,单聊的话最终 member_uids 只能有2个
	Type Conversation_Type `protobuf:"varint,11,opt,name=type,enum=chatpb.Conversation_Type" json:"type,omitempty"`
	// 被邀请成员uids,若无auth.uid的话内部会添加
	InviteeUids []string `protobuf:"bytes,12,rep,name=invitee_uids,json=inviteeUids" json:"invitee_uids,omitempty"`
}

func (*CreateConversationRequest) Descriptor

func (*CreateConversationRequest) Descriptor() ([]byte, []int)

func (*CreateConversationRequest) GetAuth

func (m *CreateConversationRequest) GetAuth() *Auth

func (*CreateConversationRequest) GetInviteeUids

func (m *CreateConversationRequest) GetInviteeUids() []string

func (*CreateConversationRequest) GetType

func (*CreateConversationRequest) ProtoMessage

func (*CreateConversationRequest) ProtoMessage()

func (*CreateConversationRequest) Reset

func (m *CreateConversationRequest) Reset()

func (*CreateConversationRequest) String

func (m *CreateConversationRequest) String() string

type CreateConversationResponse

type CreateConversationResponse struct {
	UidConversation *UidConversation `protobuf:"bytes,1,opt,name=uid_conversation,json=uidConversation" json:"uid_conversation,omitempty"`
}

func (*CreateConversationResponse) Descriptor

func (*CreateConversationResponse) Descriptor() ([]byte, []int)

func (*CreateConversationResponse) GetUidConversation

func (m *CreateConversationResponse) GetUidConversation() *UidConversation

func (*CreateConversationResponse) ProtoMessage

func (*CreateConversationResponse) ProtoMessage()

func (*CreateConversationResponse) Reset

func (m *CreateConversationResponse) Reset()

func (*CreateConversationResponse) String

func (m *CreateConversationResponse) String() string

type EventClose

type EventClose struct {
	// 关闭方式
	Type EventClose_Type `protobuf:"varint,1,opt,name=type,enum=chatpb.EventClose_Type" json:"type,omitempty"`
	// 操作人,如果是管理员解散,即为管理员uid
	OperatorUid string `protobuf:"bytes,2,opt,name=operator_uid,json=operatorUid" json:"operator_uid,omitempty"`
}

func (*EventClose) Descriptor

func (*EventClose) Descriptor() ([]byte, []int)

func (*EventClose) GetOperatorUid

func (m *EventClose) GetOperatorUid() string

func (*EventClose) GetType

func (m *EventClose) GetType() EventClose_Type

func (*EventClose) ProtoMessage

func (*EventClose) ProtoMessage()

func (*EventClose) Reset

func (m *EventClose) Reset()

func (*EventClose) String

func (m *EventClose) String() string

type EventClose_Type

type EventClose_Type int32
const (
	EventClose_UNKNOWN EventClose_Type = 0
	// 管理员解散
	EventClose_BY_MANAGER EventClose_Type = 1
	// 系统解散
	EventClose_BY_SYSTEM EventClose_Type = 2
)

func (EventClose_Type) EnumDescriptor

func (EventClose_Type) EnumDescriptor() ([]byte, []int)

func (EventClose_Type) String

func (x EventClose_Type) String() string

type EventEnter

type EventEnter struct {
	// 进入者列表
	Uids []string `protobuf:"bytes,1,rep,name=uids" json:"uids,omitempty"`
	// 进入方式
	Type EventEnter_Type `protobuf:"varint,2,opt,name=type,enum=chatpb.EventEnter_Type" json:"type,omitempty"`
	// 操作人,如果是邀请方式进入,即为邀请者
	OperatorUid string `protobuf:"bytes,3,opt,name=operator_uid,json=operatorUid" json:"operator_uid,omitempty"`
}

func (*EventEnter) Descriptor

func (*EventEnter) Descriptor() ([]byte, []int)

func (*EventEnter) GetOperatorUid

func (m *EventEnter) GetOperatorUid() string

func (*EventEnter) GetType

func (m *EventEnter) GetType() EventEnter_Type

func (*EventEnter) GetUids

func (m *EventEnter) GetUids() []string

func (*EventEnter) ProtoMessage

func (*EventEnter) ProtoMessage()

func (*EventEnter) Reset

func (m *EventEnter) Reset()

func (*EventEnter) String

func (m *EventEnter) String() string

type EventEnter_Type

type EventEnter_Type int32
const (
	EventEnter_UNKNOWN EventEnter_Type = 0
	// 创建者身份进入
	EventEnter_CREATOR EventEnter_Type = 1
	// 邀请进入
	EventEnter_INVITE EventEnter_Type = 2
	// 扫码进入
	EventEnter_SCAN_QR_CODE EventEnter_Type = 3
)

func (EventEnter_Type) EnumDescriptor

func (EventEnter_Type) EnumDescriptor() ([]byte, []int)

func (EventEnter_Type) String

func (x EventEnter_Type) String() string

type EventQuit

type EventQuit struct {
	// 退出者列表
	Uids []string `protobuf:"bytes,1,rep,name=uids" json:"uids,omitempty"`
	// 退出方式
	Type EventQuit_Type `protobuf:"varint,2,opt,name=type,enum=chatpb.EventQuit_Type" json:"type,omitempty"`
	// 操作人,如果是踢出方式,即为执行踢出操作的人
	OperatorUid string `protobuf:"bytes,3,opt,name=operator_uid,json=operatorUid" json:"operator_uid,omitempty"`
}

func (*EventQuit) Descriptor

func (*EventQuit) Descriptor() ([]byte, []int)

func (*EventQuit) GetOperatorUid

func (m *EventQuit) GetOperatorUid() string

func (*EventQuit) GetType

func (m *EventQuit) GetType() EventQuit_Type

func (*EventQuit) GetUids

func (m *EventQuit) GetUids() []string

func (*EventQuit) ProtoMessage

func (*EventQuit) ProtoMessage()

func (*EventQuit) Reset

func (m *EventQuit) Reset()

func (*EventQuit) String

func (m *EventQuit) String() string

type EventQuit_Type

type EventQuit_Type int32
const (
	EventQuit_UNKNOWN EventQuit_Type = 0
	// 自愿退出
	EventQuit_WILL EventQuit_Type = 1
	// 踢出
	EventQuit_KICK EventQuit_Type = 2
)

func (EventQuit_Type) EnumDescriptor

func (EventQuit_Type) EnumDescriptor() ([]byte, []int)

func (EventQuit_Type) String

func (x EventQuit_Type) String() string

type GetUidConversationsRequest

type GetUidConversationsRequest struct {
	// 只有对话成员 才可获取
	Auth *Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// 会话id列表
	Cids []string `protobuf:"bytes,11,rep,name=cids" json:"cids,omitempty"`
}

func (*GetUidConversationsRequest) Descriptor

func (*GetUidConversationsRequest) Descriptor() ([]byte, []int)

func (*GetUidConversationsRequest) GetAuth

func (m *GetUidConversationsRequest) GetAuth() *Auth

func (*GetUidConversationsRequest) GetCids

func (m *GetUidConversationsRequest) GetCids() []string

func (*GetUidConversationsRequest) ProtoMessage

func (*GetUidConversationsRequest) ProtoMessage()

func (*GetUidConversationsRequest) Reset

func (m *GetUidConversationsRequest) Reset()

func (*GetUidConversationsRequest) String

func (m *GetUidConversationsRequest) String() string

type GetUidConversationsResponse

type GetUidConversationsResponse struct {
	UidConversations map[string]*UidConversation `` /* 176-byte string literal not displayed */
}

func (*GetUidConversationsResponse) Descriptor

func (*GetUidConversationsResponse) Descriptor() ([]byte, []int)

func (*GetUidConversationsResponse) GetUidConversations

func (m *GetUidConversationsResponse) GetUidConversations() map[string]*UidConversation

func (*GetUidConversationsResponse) ProtoMessage

func (*GetUidConversationsResponse) ProtoMessage()

func (*GetUidConversationsResponse) Reset

func (m *GetUidConversationsResponse) Reset()

func (*GetUidConversationsResponse) String

func (m *GetUidConversationsResponse) String() string

type Image

type Image struct {
	Type   Image_Type `protobuf:"varint,1,opt,name=type,enum=chatpb.Image_Type" json:"type,omitempty"`
	Url    string     `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
	Width  int32      `protobuf:"varint,3,opt,name=width" json:"width,omitempty"`
	Height int32      `protobuf:"varint,4,opt,name=height" json:"height,omitempty"`
}

图片信息

func (*Image) Descriptor

func (*Image) Descriptor() ([]byte, []int)

func (*Image) GetHeight

func (m *Image) GetHeight() int32

func (*Image) GetType

func (m *Image) GetType() Image_Type

func (*Image) GetUrl

func (m *Image) GetUrl() string

func (*Image) GetWidth

func (m *Image) GetWidth() int32

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) Reset

func (m *Image) Reset()

func (*Image) String

func (m *Image) String() string

type Image_Type

type Image_Type int32
const (
	Image_UNKNOWN Image_Type = 0
	// 静态图片
	Image_STATIC Image_Type = 1
	// 动态图片
	Image_DYNAMIC Image_Type = 2
)

func (Image_Type) EnumDescriptor

func (Image_Type) EnumDescriptor() ([]byte, []int)

func (Image_Type) String

func (x Image_Type) String() string

type InviteIntoConversationRequest

type InviteIntoConversationRequest struct {
	// 邀请者
	Auth *Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// 对话id
	Cid string `protobuf:"bytes,11,opt,name=cid" json:"cid,omitempty"`
	// 被邀请人uids
	InviteeUids []string `protobuf:"bytes,12,rep,name=invitee_uids,json=inviteeUids" json:"invitee_uids,omitempty"`
}

func (*InviteIntoConversationRequest) Descriptor

func (*InviteIntoConversationRequest) Descriptor() ([]byte, []int)

func (*InviteIntoConversationRequest) GetAuth

func (m *InviteIntoConversationRequest) GetAuth() *Auth

func (*InviteIntoConversationRequest) GetCid

func (*InviteIntoConversationRequest) GetInviteeUids

func (m *InviteIntoConversationRequest) GetInviteeUids() []string

func (*InviteIntoConversationRequest) ProtoMessage

func (*InviteIntoConversationRequest) ProtoMessage()

func (*InviteIntoConversationRequest) Reset

func (m *InviteIntoConversationRequest) Reset()

func (*InviteIntoConversationRequest) String

type KickFromConversationRequest

type KickFromConversationRequest struct {
	// 操作者
	Auth *Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// 对话id
	Cid string `protobuf:"bytes,11,opt,name=cid" json:"cid,omitempty"`
	// 被踢的人uids
	KickUids string `protobuf:"bytes,12,opt,name=kick_uids,json=kickUids" json:"kick_uids,omitempty"`
}

踢出对话,如果是自己踢自己那就是离开对话的意思了

func (*KickFromConversationRequest) Descriptor

func (*KickFromConversationRequest) Descriptor() ([]byte, []int)

func (*KickFromConversationRequest) GetAuth

func (m *KickFromConversationRequest) GetAuth() *Auth

func (*KickFromConversationRequest) GetCid

func (m *KickFromConversationRequest) GetCid() string

func (*KickFromConversationRequest) GetKickUids

func (m *KickFromConversationRequest) GetKickUids() string

func (*KickFromConversationRequest) ProtoMessage

func (*KickFromConversationRequest) ProtoMessage()

func (*KickFromConversationRequest) Reset

func (m *KickFromConversationRequest) Reset()

func (*KickFromConversationRequest) String

func (m *KickFromConversationRequest) String() string

type Message

type Message struct {
	// 消息唯一标识
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// 创建时间
	CreatedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
	// 对话id
	Cid string `protobuf:"bytes,3,opt,name=cid" json:"cid,omitempty"`
	// 发送者uid,事件消息的话一般为空
	SenderUid string `protobuf:"bytes,4,opt,name=sender_uid,json=senderUid" json:"sender_uid,omitempty"`
	// 内容
	Body *Body `protobuf:"bytes,5,opt,name=body" json:"body,omitempty"`
}

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) GetBody

func (m *Message) GetBody() *Body

func (*Message) GetCid

func (m *Message) GetCid() string

func (*Message) GetCreatedAt

func (m *Message) GetCreatedAt() *google_protobuf.Timestamp

func (*Message) GetId

func (m *Message) GetId() string

func (*Message) GetSenderUid

func (m *Message) GetSenderUid() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type MuteUidConversationRequest

type MuteUidConversationRequest struct {
	Auth *Auth  `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	Cid  string `protobuf:"bytes,11,opt,name=cid" json:"cid,omitempty"`
	Mute bool   `protobuf:"varint,12,opt,name=mute" json:"mute,omitempty"`
}

func (*MuteUidConversationRequest) Descriptor

func (*MuteUidConversationRequest) Descriptor() ([]byte, []int)

func (*MuteUidConversationRequest) GetAuth

func (m *MuteUidConversationRequest) GetAuth() *Auth

func (*MuteUidConversationRequest) GetCid

func (m *MuteUidConversationRequest) GetCid() string

func (*MuteUidConversationRequest) GetMute

func (m *MuteUidConversationRequest) GetMute() bool

func (*MuteUidConversationRequest) ProtoMessage

func (*MuteUidConversationRequest) ProtoMessage()

func (*MuteUidConversationRequest) Reset

func (m *MuteUidConversationRequest) Reset()

func (*MuteUidConversationRequest) String

func (m *MuteUidConversationRequest) String() string

type SendMessageRequest

type SendMessageRequest struct {
	// 操作者
	Auth *Auth `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
	// 对话id
	Cid string `protobuf:"bytes,11,opt,name=cid" json:"cid,omitempty"`
	// 内容,只有部分类型可发送,例如文字和图片
	Body *Body `protobuf:"bytes,12,opt,name=body" json:"body,omitempty"`
}

发送消息

func (*SendMessageRequest) Descriptor

func (*SendMessageRequest) Descriptor() ([]byte, []int)

func (*SendMessageRequest) GetAuth

func (m *SendMessageRequest) GetAuth() *Auth

func (*SendMessageRequest) GetBody

func (m *SendMessageRequest) GetBody() *Body

func (*SendMessageRequest) GetCid

func (m *SendMessageRequest) GetCid() string

func (*SendMessageRequest) ProtoMessage

func (*SendMessageRequest) ProtoMessage()

func (*SendMessageRequest) Reset

func (m *SendMessageRequest) Reset()

func (*SendMessageRequest) String

func (m *SendMessageRequest) String() string

type SendMessageResponse

type SendMessageResponse struct {
	Message *Message `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (*SendMessageResponse) Descriptor

func (*SendMessageResponse) Descriptor() ([]byte, []int)

func (*SendMessageResponse) GetMessage

func (m *SendMessageResponse) GetMessage() *Message

func (*SendMessageResponse) ProtoMessage

func (*SendMessageResponse) ProtoMessage()

func (*SendMessageResponse) Reset

func (m *SendMessageResponse) Reset()

func (*SendMessageResponse) String

func (m *SendMessageResponse) String() string

type Text

type Text struct {
	Content string `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"`
}

文本信息

func (*Text) Descriptor

func (*Text) Descriptor() ([]byte, []int)

func (*Text) GetContent

func (m *Text) GetContent() string

func (*Text) ProtoMessage

func (*Text) ProtoMessage()

func (*Text) Reset

func (m *Text) Reset()

func (*Text) String

func (m *Text) String() string

type UidConversation

type UidConversation struct {
	Uid          string                     `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"`
	Cid          string                     `protobuf:"bytes,2,opt,name=cid" json:"cid,omitempty"`
	Mute         bool                       `protobuf:"varint,3,opt,name=mute" json:"mute,omitempty"`
	EnterTime    *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=enter_time,json=enterTime" json:"enter_time,omitempty"`
	Conversation *Conversation              `protobuf:"bytes,11,opt,name=conversation" json:"conversation,omitempty"`
}

用户对话映射

func (*UidConversation) Descriptor

func (*UidConversation) Descriptor() ([]byte, []int)

func (*UidConversation) GetCid

func (m *UidConversation) GetCid() string

func (*UidConversation) GetConversation

func (m *UidConversation) GetConversation() *Conversation

func (*UidConversation) GetEnterTime

func (m *UidConversation) GetEnterTime() *google_protobuf.Timestamp

func (*UidConversation) GetMute

func (m *UidConversation) GetMute() bool

func (*UidConversation) GetUid

func (m *UidConversation) GetUid() string

func (*UidConversation) ProtoMessage

func (*UidConversation) ProtoMessage()

func (*UidConversation) Reset

func (m *UidConversation) Reset()

func (*UidConversation) String

func (m *UidConversation) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL