imessage

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OperationIMessageCreateMessage = "/imessage.IMessage/CreateMessage"
View Source
const OperationIMessageListLastMessages = "/imessage.IMessage/ListLastMessages"
View Source
const OperationIMessageListMessage = "/imessage.IMessage/ListMessage"
View Source
const OperationSessionCreateSession = "/imessage.Session/CreateSession"
View Source
const OperationSessionCreateSessionUser = "/imessage.Session/CreateSessionUser"
View Source
const OperationSessionDeleteSessionUser = "/imessage.Session/DeleteSessionUser"
View Source
const OperationSessionListSessionUser = "/imessage.Session/ListSessionUser"
View Source
const OperationSessionListUserSession = "/imessage.Session/ListUserSession"
View Source
const OperationSessionPutSession = "/imessage.Session/PutSession"
View Source
const OperationSessionUser = "/imessage.Session/User"

Variables

View Source
var File_api_imessage_message_proto protoreflect.FileDescriptor
View Source
var File_api_imessage_session_proto protoreflect.FileDescriptor
View Source
var IMessage_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "imessage.IMessage",
	HandlerType: (*IMessageServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateMessage",
			Handler:    _IMessage_CreateMessage_Handler,
		},
		{
			MethodName: "ListMessage",
			Handler:    _IMessage_ListMessage_Handler,
		},
		{
			MethodName: "ListLastMessages",
			Handler:    _IMessage_ListLastMessages_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/imessage/message.proto",
}

IMessage_ServiceDesc is the grpc.ServiceDesc for IMessage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Session_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "imessage.Session",
	HandlerType: (*SessionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSession",
			Handler:    _Session_CreateSession_Handler,
		},
		{
			MethodName: "PutSession",
			Handler:    _Session_PutSession_Handler,
		},
		{
			MethodName: "CreateSessionUser",
			Handler:    _Session_CreateSessionUser_Handler,
		},
		{
			MethodName: "DeleteSessionUser",
			Handler:    _Session_DeleteSessionUser_Handler,
		},
		{
			MethodName: "ListUserSession",
			Handler:    _Session_ListUserSession_Handler,
		},
		{
			MethodName: "ListSessionUser",
			Handler:    _Session_ListSessionUser_Handler,
		},
		{
			MethodName: "User",
			Handler:    _Session_User_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/imessage/session.proto",
}

Session_ServiceDesc is the grpc.ServiceDesc for Session service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterIMessageHTTPServer

func RegisterIMessageHTTPServer(s *http.Server, srv IMessageHTTPServer)

func RegisterIMessageServer

func RegisterIMessageServer(s grpc.ServiceRegistrar, srv IMessageServer)

func RegisterSessionHTTPServer

func RegisterSessionHTTPServer(s *http.Server, srv SessionHTTPServer)

func RegisterSessionServer

func RegisterSessionServer(s grpc.ServiceRegistrar, srv SessionServer)

Types

type ActionCard

type ActionCard struct {
	Title       string           `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Text        string           `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	Orientation int32            `protobuf:"varint,3,opt,name=orientation,proto3" json:"orientation,omitempty"`
	Btns        []*ActionCardBtn `protobuf:"bytes,4,rep,name=btns,proto3" json:"btns,omitempty"`
	// contains filtered or unexported fields
}

func (*ActionCard) Descriptor deprecated

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

Deprecated: Use ActionCard.ProtoReflect.Descriptor instead.

func (*ActionCard) GetBtns

func (x *ActionCard) GetBtns() []*ActionCardBtn

func (*ActionCard) GetOrientation

func (x *ActionCard) GetOrientation() int32

func (*ActionCard) GetText

func (x *ActionCard) GetText() string

func (*ActionCard) GetTitle

func (x *ActionCard) GetTitle() string

func (*ActionCard) ProtoMessage

func (*ActionCard) ProtoMessage()

func (*ActionCard) ProtoReflect

func (x *ActionCard) ProtoReflect() protoreflect.Message

func (*ActionCard) Reset

func (x *ActionCard) Reset()

func (*ActionCard) String

func (x *ActionCard) String() string

type ActionCardBtn

type ActionCardBtn struct {
	Title     string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	ActionURL string `protobuf:"bytes,2,opt,name=actionURL,proto3" json:"actionURL,omitempty"`
	// contains filtered or unexported fields
}

func (*ActionCardBtn) Descriptor deprecated

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

Deprecated: Use ActionCardBtn.ProtoReflect.Descriptor instead.

func (*ActionCardBtn) GetActionURL

func (x *ActionCardBtn) GetActionURL() string

func (*ActionCardBtn) GetTitle

func (x *ActionCardBtn) GetTitle() string

func (*ActionCardBtn) ProtoMessage

func (*ActionCardBtn) ProtoMessage()

func (*ActionCardBtn) ProtoReflect

func (x *ActionCardBtn) ProtoReflect() protoreflect.Message

func (*ActionCardBtn) Reset

func (x *ActionCardBtn) Reset()

func (*ActionCardBtn) String

func (x *ActionCardBtn) String() string

type CreateSessionReply

type CreateSessionReply struct {
	SessionID       int64      `protobuf:"varint,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	SessionName     string     `protobuf:"bytes,2,opt,name=sessionName,proto3" json:"sessionName,omitempty"`
	SessionAvatar   string     `protobuf:"bytes,13,opt,name=sessionAvatar,proto3" json:"sessionAvatar,omitempty"`
	Type            int32      `protobuf:"varint,7,opt,name=type,proto3" json:"type,omitempty"`
	UserIDList      []int64    `protobuf:"varint,3,rep,packed,name=userIDList,proto3" json:"userIDList,omitempty"`
	EndTime         int32      `protobuf:"varint,4,opt,name=endTime,proto3" json:"endTime,omitempty"`
	LastMessageTime string     `protobuf:"bytes,5,opt,name=lastMessageTime,proto3" json:"lastMessageTime,omitempty"`
	MessageID       string     `protobuf:"bytes,6,opt,name=messageID,proto3" json:"messageID,omitempty"`
	MessageContent  string     `protobuf:"bytes,8,opt,name=messageContent,proto3" json:"messageContent,omitempty"`
	MessageFrom     string     `protobuf:"bytes,9,opt,name=messageFrom,proto3" json:"messageFrom,omitempty"`
	FromName        string     `protobuf:"bytes,10,opt,name=fromName,proto3" json:"fromName,omitempty"` // 发送消息用户uuid
	UserList        []*UserDoc `protobuf:"bytes,11,rep,name=userList,proto3" json:"userList,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionReply) Descriptor deprecated

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

Deprecated: Use CreateSessionReply.ProtoReflect.Descriptor instead.

func (*CreateSessionReply) GetEndTime

func (x *CreateSessionReply) GetEndTime() int32

func (*CreateSessionReply) GetFromName added in v1.0.4

func (x *CreateSessionReply) GetFromName() string

func (*CreateSessionReply) GetLastMessageTime

func (x *CreateSessionReply) GetLastMessageTime() string

func (*CreateSessionReply) GetMessageContent added in v1.0.2

func (x *CreateSessionReply) GetMessageContent() string

func (*CreateSessionReply) GetMessageFrom added in v1.0.2

func (x *CreateSessionReply) GetMessageFrom() string

func (*CreateSessionReply) GetMessageID

func (x *CreateSessionReply) GetMessageID() string

func (*CreateSessionReply) GetSessionAvatar added in v1.0.4

func (x *CreateSessionReply) GetSessionAvatar() string

func (*CreateSessionReply) GetSessionID

func (x *CreateSessionReply) GetSessionID() int64

func (*CreateSessionReply) GetSessionName

func (x *CreateSessionReply) GetSessionName() string

func (*CreateSessionReply) GetType

func (x *CreateSessionReply) GetType() int32

func (*CreateSessionReply) GetUserIDList

func (x *CreateSessionReply) GetUserIDList() []int64

func (*CreateSessionReply) GetUserList added in v1.0.4

func (x *CreateSessionReply) GetUserList() []*UserDoc

func (*CreateSessionReply) ProtoMessage

func (*CreateSessionReply) ProtoMessage()

func (*CreateSessionReply) ProtoReflect

func (x *CreateSessionReply) ProtoReflect() protoreflect.Message

func (*CreateSessionReply) Reset

func (x *CreateSessionReply) Reset()

func (*CreateSessionReply) String

func (x *CreateSessionReply) String() string

type CreateSessionReq

type CreateSessionReq struct {
	SessionName   string  `protobuf:"bytes,1,opt,name=sessionName,proto3" json:"sessionName,omitempty"`
	SessionAvatar string  `protobuf:"bytes,4,opt,name=sessionAvatar,proto3" json:"sessionAvatar,omitempty"`
	Type          int32   `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
	UserIDList    []int64 `protobuf:"varint,3,rep,packed,name=userIDList,proto3" json:"userIDList,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionReq) Descriptor deprecated

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

Deprecated: Use CreateSessionReq.ProtoReflect.Descriptor instead.

func (*CreateSessionReq) GetSessionAvatar added in v1.0.4

func (x *CreateSessionReq) GetSessionAvatar() string

func (*CreateSessionReq) GetSessionName

func (x *CreateSessionReq) GetSessionName() string

func (*CreateSessionReq) GetType

func (x *CreateSessionReq) GetType() int32

func (*CreateSessionReq) GetUserIDList

func (x *CreateSessionReq) GetUserIDList() []int64

func (*CreateSessionReq) ProtoMessage

func (*CreateSessionReq) ProtoMessage()

func (*CreateSessionReq) ProtoReflect

func (x *CreateSessionReq) ProtoReflect() protoreflect.Message

func (*CreateSessionReq) Reset

func (x *CreateSessionReq) Reset()

func (*CreateSessionReq) String

func (x *CreateSessionReq) String() string

type CreateSessionUserReply

type CreateSessionUserReply struct {
	// contains filtered or unexported fields
}

func (*CreateSessionUserReply) Descriptor deprecated

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

Deprecated: Use CreateSessionUserReply.ProtoReflect.Descriptor instead.

func (*CreateSessionUserReply) ProtoMessage

func (*CreateSessionUserReply) ProtoMessage()

func (*CreateSessionUserReply) ProtoReflect

func (x *CreateSessionUserReply) ProtoReflect() protoreflect.Message

func (*CreateSessionUserReply) Reset

func (x *CreateSessionUserReply) Reset()

func (*CreateSessionUserReply) String

func (x *CreateSessionUserReply) String() string

type CreateSessionUserReq

type CreateSessionUserReq struct {
	SessionID  int64   `protobuf:"varint,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	UserIDList []int64 `protobuf:"varint,2,rep,packed,name=userIDList,proto3" json:"userIDList,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionUserReq) Descriptor deprecated

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

Deprecated: Use CreateSessionUserReq.ProtoReflect.Descriptor instead.

func (*CreateSessionUserReq) GetSessionID

func (x *CreateSessionUserReq) GetSessionID() int64

func (*CreateSessionUserReq) GetUserIDList

func (x *CreateSessionUserReq) GetUserIDList() []int64

func (*CreateSessionUserReq) ProtoMessage

func (*CreateSessionUserReq) ProtoMessage()

func (*CreateSessionUserReq) ProtoReflect

func (x *CreateSessionUserReq) ProtoReflect() protoreflect.Message

func (*CreateSessionUserReq) Reset

func (x *CreateSessionUserReq) Reset()

func (*CreateSessionUserReq) String

func (x *CreateSessionUserReq) String() string

type DeleteSessionUserReply

type DeleteSessionUserReply struct {
	// contains filtered or unexported fields
}

func (*DeleteSessionUserReply) Descriptor deprecated

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

Deprecated: Use DeleteSessionUserReply.ProtoReflect.Descriptor instead.

func (*DeleteSessionUserReply) ProtoMessage

func (*DeleteSessionUserReply) ProtoMessage()

func (*DeleteSessionUserReply) ProtoReflect

func (x *DeleteSessionUserReply) ProtoReflect() protoreflect.Message

func (*DeleteSessionUserReply) Reset

func (x *DeleteSessionUserReply) Reset()

func (*DeleteSessionUserReply) String

func (x *DeleteSessionUserReply) String() string

type DeleteSessionUserReq

type DeleteSessionUserReq struct {
	SessionID int64 `protobuf:"varint,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	UserID    int64 `protobuf:"varint,2,opt,name=userID,proto3" json:"userID,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSessionUserReq) Descriptor deprecated

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

Deprecated: Use DeleteSessionUserReq.ProtoReflect.Descriptor instead.

func (*DeleteSessionUserReq) GetSessionID

func (x *DeleteSessionUserReq) GetSessionID() int64

func (*DeleteSessionUserReq) GetUserID

func (x *DeleteSessionUserReq) GetUserID() int64

func (*DeleteSessionUserReq) ProtoMessage

func (*DeleteSessionUserReq) ProtoMessage()

func (*DeleteSessionUserReq) ProtoReflect

func (x *DeleteSessionUserReq) ProtoReflect() protoreflect.Message

func (*DeleteSessionUserReq) Reset

func (x *DeleteSessionUserReq) Reset()

func (*DeleteSessionUserReq) String

func (x *DeleteSessionUserReq) String() string

type IMessageClient

type IMessageClient interface {
	CreateMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageReply, error)
	ListMessage(ctx context.Context, in *ListMessageReq, opts ...grpc.CallOption) (*ListMessageReply, error)
	ListLastMessages(ctx context.Context, in *ListLastMessageReq, opts ...grpc.CallOption) (*ListLastMessageReply, error)
}

IMessageClient is the client API for IMessage service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewIMessageClient

func NewIMessageClient(cc grpc.ClientConnInterface) IMessageClient

type IMessageHTTPClient

type IMessageHTTPClient interface {
	CreateMessage(ctx context.Context, req *MessageReq, opts ...http.CallOption) (rsp *MessageReply, err error)
	ListLastMessages(ctx context.Context, req *ListLastMessageReq, opts ...http.CallOption) (rsp *ListLastMessageReply, err error)
	ListMessage(ctx context.Context, req *ListMessageReq, opts ...http.CallOption) (rsp *ListMessageReply, err error)
}

func NewIMessageHTTPClient

func NewIMessageHTTPClient(client *http.Client) IMessageHTTPClient

type IMessageHTTPClientImpl

type IMessageHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*IMessageHTTPClientImpl) CreateMessage

func (c *IMessageHTTPClientImpl) CreateMessage(ctx context.Context, in *MessageReq, opts ...http.CallOption) (*MessageReply, error)

func (*IMessageHTTPClientImpl) ListLastMessages

func (*IMessageHTTPClientImpl) ListMessage

type IMessageHTTPServer

type IMessageHTTPServer interface {
	CreateMessage(context.Context, *MessageReq) (*MessageReply, error)
	ListLastMessages(context.Context, *ListLastMessageReq) (*ListLastMessageReply, error)
	ListMessage(context.Context, *ListMessageReq) (*ListMessageReply, error)
}

type IMessageServer

type IMessageServer interface {
	CreateMessage(context.Context, *MessageReq) (*MessageReply, error)
	ListMessage(context.Context, *ListMessageReq) (*ListMessageReply, error)
	ListLastMessages(context.Context, *ListLastMessageReq) (*ListLastMessageReply, error)
	// contains filtered or unexported methods
}

IMessageServer is the server API for IMessage service. All implementations must embed UnimplementedIMessageServer for forward compatibility

type ListLastMessageReply

type ListLastMessageReply struct {
	LastMessage map[int64]*MessageReply `` /* 164-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ListLastMessageReply) Descriptor deprecated

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

Deprecated: Use ListLastMessageReply.ProtoReflect.Descriptor instead.

func (*ListLastMessageReply) GetLastMessage

func (x *ListLastMessageReply) GetLastMessage() map[int64]*MessageReply

func (*ListLastMessageReply) ProtoMessage

func (*ListLastMessageReply) ProtoMessage()

func (*ListLastMessageReply) ProtoReflect

func (x *ListLastMessageReply) ProtoReflect() protoreflect.Message

func (*ListLastMessageReply) Reset

func (x *ListLastMessageReply) Reset()

func (*ListLastMessageReply) String

func (x *ListLastMessageReply) String() string

type ListLastMessageReq

type ListLastMessageReq struct {
	SessionIDList []int64 `protobuf:"varint,1,rep,packed,name=sessionIDList,proto3" json:"sessionIDList,omitempty"`
	// contains filtered or unexported fields
}

func (*ListLastMessageReq) Descriptor deprecated

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

Deprecated: Use ListLastMessageReq.ProtoReflect.Descriptor instead.

func (*ListLastMessageReq) GetSessionIDList

func (x *ListLastMessageReq) GetSessionIDList() []int64

func (*ListLastMessageReq) ProtoMessage

func (*ListLastMessageReq) ProtoMessage()

func (*ListLastMessageReq) ProtoReflect

func (x *ListLastMessageReq) ProtoReflect() protoreflect.Message

func (*ListLastMessageReq) Reset

func (x *ListLastMessageReq) Reset()

func (*ListLastMessageReq) String

func (x *ListLastMessageReq) String() string

type ListMessageReply

type ListMessageReply struct {
	Messages []*MessageReply `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMessageReply) Descriptor deprecated

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

Deprecated: Use ListMessageReply.ProtoReflect.Descriptor instead.

func (*ListMessageReply) GetMessages

func (x *ListMessageReply) GetMessages() []*MessageReply

func (*ListMessageReply) ProtoMessage

func (*ListMessageReply) ProtoMessage()

func (*ListMessageReply) ProtoReflect

func (x *ListMessageReply) ProtoReflect() protoreflect.Message

func (*ListMessageReply) Reset

func (x *ListMessageReply) Reset()

func (*ListMessageReply) String

func (x *ListMessageReply) String() string

type ListMessageReq

type ListMessageReq struct {
	SessionID int64 `protobuf:"varint,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	StartPos  int64 `protobuf:"varint,2,opt,name=startPos,proto3" json:"startPos,omitempty"`
	EndPos    int64 `protobuf:"varint,3,opt,name=endPos,proto3" json:"endPos,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMessageReq) Descriptor deprecated

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

Deprecated: Use ListMessageReq.ProtoReflect.Descriptor instead.

func (*ListMessageReq) GetEndPos

func (x *ListMessageReq) GetEndPos() int64

func (*ListMessageReq) GetSessionID

func (x *ListMessageReq) GetSessionID() int64

func (*ListMessageReq) GetStartPos

func (x *ListMessageReq) GetStartPos() int64

func (*ListMessageReq) ProtoMessage

func (*ListMessageReq) ProtoMessage()

func (*ListMessageReq) ProtoReflect

func (x *ListMessageReq) ProtoReflect() protoreflect.Message

func (*ListMessageReq) Reset

func (x *ListMessageReq) Reset()

func (*ListMessageReq) String

func (x *ListMessageReq) String() string

type ListSessionReply

type ListSessionReply struct {
	Sessions []*CreateSessionReply `protobuf:"bytes,1,rep,name=Sessions,proto3" json:"Sessions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSessionReply) Descriptor deprecated

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

Deprecated: Use ListSessionReply.ProtoReflect.Descriptor instead.

func (*ListSessionReply) GetSessions

func (x *ListSessionReply) GetSessions() []*CreateSessionReply

func (*ListSessionReply) ProtoMessage

func (*ListSessionReply) ProtoMessage()

func (*ListSessionReply) ProtoReflect

func (x *ListSessionReply) ProtoReflect() protoreflect.Message

func (*ListSessionReply) Reset

func (x *ListSessionReply) Reset()

func (*ListSessionReply) String

func (x *ListSessionReply) String() string

type ListSessionUserReply

type ListSessionUserReply struct {
	Users    []int64    `protobuf:"varint,1,rep,packed,name=users,proto3" json:"users,omitempty"`
	UserList []*UserDoc `protobuf:"bytes,2,rep,name=userList,proto3" json:"userList,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSessionUserReply) Descriptor deprecated

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

Deprecated: Use ListSessionUserReply.ProtoReflect.Descriptor instead.

func (*ListSessionUserReply) GetUserList added in v1.0.4

func (x *ListSessionUserReply) GetUserList() []*UserDoc

func (*ListSessionUserReply) GetUsers

func (x *ListSessionUserReply) GetUsers() []int64

func (*ListSessionUserReply) ProtoMessage

func (*ListSessionUserReply) ProtoMessage()

func (*ListSessionUserReply) ProtoReflect

func (x *ListSessionUserReply) ProtoReflect() protoreflect.Message

func (*ListSessionUserReply) Reset

func (x *ListSessionUserReply) Reset()

func (*ListSessionUserReply) String

func (x *ListSessionUserReply) String() string

type ListSessionUserReq

type ListSessionUserReq struct {
	SessionID int64 `protobuf:"varint,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSessionUserReq) Descriptor deprecated

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

Deprecated: Use ListSessionUserReq.ProtoReflect.Descriptor instead.

func (*ListSessionUserReq) GetSessionID

func (x *ListSessionUserReq) GetSessionID() int64

func (*ListSessionUserReq) ProtoMessage

func (*ListSessionUserReq) ProtoMessage()

func (*ListSessionUserReq) ProtoReflect

func (x *ListSessionUserReq) ProtoReflect() protoreflect.Message

func (*ListSessionUserReq) Reset

func (x *ListSessionUserReq) Reset()

func (*ListSessionUserReq) String

func (x *ListSessionUserReq) String() string

type ListUserSessionReq

type ListUserSessionReq struct {
	UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUserSessionReq) Descriptor deprecated

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

Deprecated: Use ListUserSessionReq.ProtoReflect.Descriptor instead.

func (*ListUserSessionReq) GetUserID

func (x *ListUserSessionReq) GetUserID() int64

func (*ListUserSessionReq) ProtoMessage

func (*ListUserSessionReq) ProtoMessage()

func (*ListUserSessionReq) ProtoReflect

func (x *ListUserSessionReq) ProtoReflect() protoreflect.Message

func (*ListUserSessionReq) Reset

func (x *ListUserSessionReq) Reset()

func (*ListUserSessionReq) String

func (x *ListUserSessionReq) String() string

type MessageReply

type MessageReply struct {
	From        int64  `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`        // 发送消息用户uuid
	FromName    string `protobuf:"bytes,5,opt,name=fromName,proto3" json:"fromName,omitempty"` // 发送消息用户uuid
	To          int64  `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`            // 发送给对端用户的uuid
	Content     string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`   // 文本消息内容
	ContentType int32  `protobuf:"varint,4,opt,name=contentType,proto3" json:"contentType,omitempty"`
	//	int32 messageType = 5 [(openapiv2.field) = {
	//	  description:
	//	  "消息的类型,单聊或者群聊,1为单聊,2为群聊。如果为群聊时,to"
	//	               "的值应该为群聊ID",
	//	  required: ["messageType"]
	//	}];  // 消息类型,1.单聊 2.群聊
	Url         string      `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`             // 图片,视频,语音的路径
	AudioData   []byte      `protobuf:"bytes,7,opt,name=audioData,proto3" json:"audioData,omitempty"` // 如果是图片,文件,视频等的二进制
	Card        *ActionCard `protobuf:"bytes,8,opt,name=card,proto3" json:"card,omitempty"`
	MessageID   int64       `protobuf:"varint,9,opt,name=messageID,proto3" json:"messageID,omitempty"`
	MessageDate string      `protobuf:"bytes,10,opt,name=messageDate,proto3" json:"messageDate,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageReply) Descriptor deprecated

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

Deprecated: Use MessageReply.ProtoReflect.Descriptor instead.

func (*MessageReply) GetAudioData

func (x *MessageReply) GetAudioData() []byte

func (*MessageReply) GetCard

func (x *MessageReply) GetCard() *ActionCard

func (*MessageReply) GetContent

func (x *MessageReply) GetContent() string

func (*MessageReply) GetContentType

func (x *MessageReply) GetContentType() int32

func (*MessageReply) GetFrom

func (x *MessageReply) GetFrom() int64

func (*MessageReply) GetFromName added in v1.0.4

func (x *MessageReply) GetFromName() string

func (*MessageReply) GetMessageDate

func (x *MessageReply) GetMessageDate() string

func (*MessageReply) GetMessageID

func (x *MessageReply) GetMessageID() int64

func (*MessageReply) GetTo

func (x *MessageReply) GetTo() int64

func (*MessageReply) GetUrl

func (x *MessageReply) GetUrl() string

func (*MessageReply) ProtoMessage

func (*MessageReply) ProtoMessage()

func (*MessageReply) ProtoReflect

func (x *MessageReply) ProtoReflect() protoreflect.Message

func (*MessageReply) Reset

func (x *MessageReply) Reset()

func (*MessageReply) String

func (x *MessageReply) String() string

type MessageReq

type MessageReq struct {
	From        int64  `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` // 发送消息用户uuid
	FromName    string `protobuf:"bytes,9,opt,name=fromName,proto3" json:"fromName,omitempty"`
	To          int64  `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`          // 发送给对端用户的uuid
	Content     string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // 文本消息内容
	ContentType int32  `protobuf:"varint,4,opt,name=contentType,proto3" json:"contentType,omitempty"`
	//	int32 messageType = 5 [(openapiv2.field) = {
	//	  description:
	//	  "消息的类型,单聊或者群聊,1为单聊,2为群聊。如果为群聊时,to"
	//	               "的值应该为群聊ID",
	//	  required: ["messageType"]
	//	}];  // 消息类型,1.单聊 2.群聊
	Url       string      `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`             // 图片,视频,语音的路径
	AudioData string      `protobuf:"bytes,7,opt,name=audioData,proto3" json:"audioData,omitempty"` // 如果是图片,文件,视频等的二进制
	Card      *ActionCard `protobuf:"bytes,8,opt,name=card,proto3" json:"card,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageReq) Descriptor deprecated

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

Deprecated: Use MessageReq.ProtoReflect.Descriptor instead.

func (*MessageReq) GetAudioData

func (x *MessageReq) GetAudioData() string

func (*MessageReq) GetCard

func (x *MessageReq) GetCard() *ActionCard

func (*MessageReq) GetContent

func (x *MessageReq) GetContent() string

func (*MessageReq) GetContentType

func (x *MessageReq) GetContentType() int32

func (*MessageReq) GetFrom

func (x *MessageReq) GetFrom() int64

func (*MessageReq) GetFromName added in v1.0.4

func (x *MessageReq) GetFromName() string

func (*MessageReq) GetTo

func (x *MessageReq) GetTo() int64

func (*MessageReq) GetUrl

func (x *MessageReq) GetUrl() string

func (*MessageReq) ProtoMessage

func (*MessageReq) ProtoMessage()

func (*MessageReq) ProtoReflect

func (x *MessageReq) ProtoReflect() protoreflect.Message

func (*MessageReq) Reset

func (x *MessageReq) Reset()

func (*MessageReq) String

func (x *MessageReq) String() string

type PutSessionReply

type PutSessionReply struct {
	// contains filtered or unexported fields
}

func (*PutSessionReply) Descriptor deprecated

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

Deprecated: Use PutSessionReply.ProtoReflect.Descriptor instead.

func (*PutSessionReply) ProtoMessage

func (*PutSessionReply) ProtoMessage()

func (*PutSessionReply) ProtoReflect

func (x *PutSessionReply) ProtoReflect() protoreflect.Message

func (*PutSessionReply) Reset

func (x *PutSessionReply) Reset()

func (*PutSessionReply) String

func (x *PutSessionReply) String() string

type PutSessionReq

type PutSessionReq struct {
	SessionID     int64  `protobuf:"varint,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"`
	SessionName   string `protobuf:"bytes,2,opt,name=sessionName,proto3" json:"sessionName,omitempty"`
	SessionAvatar string `protobuf:"bytes,5,opt,name=sessionAvatar,proto3" json:"sessionAvatar,omitempty"`
	Status        bool   `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	Type          int32  `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*PutSessionReq) Descriptor deprecated

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

Deprecated: Use PutSessionReq.ProtoReflect.Descriptor instead.

func (*PutSessionReq) GetSessionAvatar added in v1.0.4

func (x *PutSessionReq) GetSessionAvatar() string

func (*PutSessionReq) GetSessionID

func (x *PutSessionReq) GetSessionID() int64

func (*PutSessionReq) GetSessionName

func (x *PutSessionReq) GetSessionName() string

func (*PutSessionReq) GetStatus

func (x *PutSessionReq) GetStatus() bool

func (*PutSessionReq) GetType

func (x *PutSessionReq) GetType() int32

func (*PutSessionReq) ProtoMessage

func (*PutSessionReq) ProtoMessage()

func (*PutSessionReq) ProtoReflect

func (x *PutSessionReq) ProtoReflect() protoreflect.Message

func (*PutSessionReq) Reset

func (x *PutSessionReq) Reset()

func (*PutSessionReq) String

func (x *PutSessionReq) String() string

type SessionClient

type SessionClient interface {
	CreateSession(ctx context.Context, in *CreateSessionReq, opts ...grpc.CallOption) (*CreateSessionReply, error)
	PutSession(ctx context.Context, in *PutSessionReq, opts ...grpc.CallOption) (*CreateSessionReply, error)
	CreateSessionUser(ctx context.Context, in *CreateSessionUserReq, opts ...grpc.CallOption) (*CreateSessionUserReply, error)
	DeleteSessionUser(ctx context.Context, in *DeleteSessionUserReq, opts ...grpc.CallOption) (*DeleteSessionUserReply, error)
	ListUserSession(ctx context.Context, in *ListUserSessionReq, opts ...grpc.CallOption) (*ListSessionReply, error)
	ListSessionUser(ctx context.Context, in *ListSessionUserReq, opts ...grpc.CallOption) (*ListSessionUserReply, error)
	User(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserReply, error)
}

SessionClient is the client API for Session service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSessionClient

func NewSessionClient(cc grpc.ClientConnInterface) SessionClient

type SessionHTTPClient

type SessionHTTPClient interface {
	CreateSession(ctx context.Context, req *CreateSessionReq, opts ...http.CallOption) (rsp *CreateSessionReply, err error)
	CreateSessionUser(ctx context.Context, req *CreateSessionUserReq, opts ...http.CallOption) (rsp *CreateSessionUserReply, err error)
	DeleteSessionUser(ctx context.Context, req *DeleteSessionUserReq, opts ...http.CallOption) (rsp *DeleteSessionUserReply, err error)
	ListSessionUser(ctx context.Context, req *ListSessionUserReq, opts ...http.CallOption) (rsp *ListSessionUserReply, err error)
	ListUserSession(ctx context.Context, req *ListUserSessionReq, opts ...http.CallOption) (rsp *ListSessionReply, err error)
	PutSession(ctx context.Context, req *PutSessionReq, opts ...http.CallOption) (rsp *CreateSessionReply, err error)
	User(ctx context.Context, req *UserReq, opts ...http.CallOption) (rsp *UserReply, err error)
}

func NewSessionHTTPClient

func NewSessionHTTPClient(client *http.Client) SessionHTTPClient

type SessionHTTPClientImpl

type SessionHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*SessionHTTPClientImpl) CreateSession

func (*SessionHTTPClientImpl) CreateSessionUser

func (*SessionHTTPClientImpl) DeleteSessionUser

func (*SessionHTTPClientImpl) ListSessionUser

func (*SessionHTTPClientImpl) ListUserSession

func (*SessionHTTPClientImpl) PutSession

func (*SessionHTTPClientImpl) User added in v1.0.2

func (c *SessionHTTPClientImpl) User(ctx context.Context, in *UserReq, opts ...http.CallOption) (*UserReply, error)

type SessionServer

type SessionServer interface {
	CreateSession(context.Context, *CreateSessionReq) (*CreateSessionReply, error)
	PutSession(context.Context, *PutSessionReq) (*CreateSessionReply, error)
	CreateSessionUser(context.Context, *CreateSessionUserReq) (*CreateSessionUserReply, error)
	DeleteSessionUser(context.Context, *DeleteSessionUserReq) (*DeleteSessionUserReply, error)
	ListUserSession(context.Context, *ListUserSessionReq) (*ListSessionReply, error)
	ListSessionUser(context.Context, *ListSessionUserReq) (*ListSessionUserReply, error)
	User(context.Context, *UserReq) (*UserReply, error)
	// contains filtered or unexported methods
}

SessionServer is the server API for Session service. All implementations must embed UnimplementedSessionServer for forward compatibility

type UnimplementedIMessageServer

type UnimplementedIMessageServer struct {
}

UnimplementedIMessageServer must be embedded to have forward compatible implementations.

func (UnimplementedIMessageServer) CreateMessage

func (UnimplementedIMessageServer) ListLastMessages

func (UnimplementedIMessageServer) ListMessage

type UnimplementedSessionServer

type UnimplementedSessionServer struct {
}

UnimplementedSessionServer must be embedded to have forward compatible implementations.

func (UnimplementedSessionServer) CreateSession

func (UnimplementedSessionServer) CreateSessionUser

func (UnimplementedSessionServer) DeleteSessionUser

func (UnimplementedSessionServer) ListSessionUser

func (UnimplementedSessionServer) ListUserSession

func (UnimplementedSessionServer) PutSession

func (UnimplementedSessionServer) User added in v1.0.2

type UnsafeIMessageServer

type UnsafeIMessageServer interface {
	// contains filtered or unexported methods
}

UnsafeIMessageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IMessageServer will result in compilation errors.

type UnsafeSessionServer

type UnsafeSessionServer interface {
	// contains filtered or unexported methods
}

UnsafeSessionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SessionServer will result in compilation errors.

type UserDoc added in v1.0.4

type UserDoc struct {
	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*UserDoc) Descriptor deprecated added in v1.0.4

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

Deprecated: Use UserDoc.ProtoReflect.Descriptor instead.

func (*UserDoc) GetId added in v1.0.4

func (x *UserDoc) GetId() int64

func (*UserDoc) GetName added in v1.0.4

func (x *UserDoc) GetName() string

func (*UserDoc) ProtoMessage added in v1.0.4

func (*UserDoc) ProtoMessage()

func (*UserDoc) ProtoReflect added in v1.0.4

func (x *UserDoc) ProtoReflect() protoreflect.Message

func (*UserDoc) Reset added in v1.0.4

func (x *UserDoc) Reset()

func (*UserDoc) String added in v1.0.4

func (x *UserDoc) String() string

type UserReply added in v1.0.2

type UserReply struct {
	UserId   int64  `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
	Phone    string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
	Avatar   string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func (*UserReply) Descriptor deprecated added in v1.0.2

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

Deprecated: Use UserReply.ProtoReflect.Descriptor instead.

func (*UserReply) GetAvatar added in v1.0.2

func (x *UserReply) GetAvatar() string

func (*UserReply) GetPhone added in v1.0.2

func (x *UserReply) GetPhone() string

func (*UserReply) GetUserId added in v1.0.2

func (x *UserReply) GetUserId() int64

func (*UserReply) GetUserName added in v1.0.2

func (x *UserReply) GetUserName() string

func (*UserReply) ProtoMessage added in v1.0.2

func (*UserReply) ProtoMessage()

func (*UserReply) ProtoReflect added in v1.0.2

func (x *UserReply) ProtoReflect() protoreflect.Message

func (*UserReply) Reset added in v1.0.2

func (x *UserReply) Reset()

func (*UserReply) String added in v1.0.2

func (x *UserReply) String() string

type UserReq added in v1.0.2

type UserReq struct {
	UserId   int64  `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"`
	Phone    string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
	Avatar   string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// contains filtered or unexported fields
}

func (*UserReq) Descriptor deprecated added in v1.0.2

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

Deprecated: Use UserReq.ProtoReflect.Descriptor instead.

func (*UserReq) GetAvatar added in v1.0.3

func (x *UserReq) GetAvatar() string

func (*UserReq) GetPhone added in v1.0.3

func (x *UserReq) GetPhone() string

func (*UserReq) GetUserId added in v1.0.2

func (x *UserReq) GetUserId() int64

func (*UserReq) GetUserName added in v1.0.3

func (x *UserReq) GetUserName() string

func (*UserReq) ProtoMessage added in v1.0.2

func (*UserReq) ProtoMessage()

func (*UserReq) ProtoReflect added in v1.0.2

func (x *UserReq) ProtoReflect() protoreflect.Message

func (*UserReq) Reset added in v1.0.2

func (x *UserReq) Reset()

func (*UserReq) String added in v1.0.2

func (x *UserReq) String() string

Jump to

Keyboard shortcuts

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