chat

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Chat_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "template.Chat",
	HandlerType: (*ChatServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MessageSave",
			Handler:    _Chat_MessageSave_Handler,
		},
		{
			MethodName: "MessageList",
			Handler:    _Chat_MessageList_Handler,
		},
		{
			MethodName: "ChatHistoryList",
			Handler:    _Chat_ChatHistoryList_Handler,
		},
		{
			MethodName: "ChatNumber",
			Handler:    _Chat_ChatNumber_Handler,
		},
		{
			MethodName: "ChatHistorySave",
			Handler:    _Chat_ChatHistorySave_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chat.proto",
}

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

Functions

func RegisterChatServer

func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer)

Types

type CHSaveReq

type CHSaveReq struct {
	Uid                  uint64   `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"`
	ToUid                uint64   `protobuf:"varint,2,opt,name=ToUid,proto3" json:"ToUid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CHSaveReq) Descriptor

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

func (*CHSaveReq) GetToUid

func (m *CHSaveReq) GetToUid() uint64

func (*CHSaveReq) GetUid

func (m *CHSaveReq) GetUid() uint64

func (*CHSaveReq) ProtoMessage

func (*CHSaveReq) ProtoMessage()

func (*CHSaveReq) Reset

func (m *CHSaveReq) Reset()

func (*CHSaveReq) String

func (m *CHSaveReq) String() string

func (*CHSaveReq) XXX_DiscardUnknown

func (m *CHSaveReq) XXX_DiscardUnknown()

func (*CHSaveReq) XXX_Marshal

func (m *CHSaveReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CHSaveReq) XXX_Merge

func (m *CHSaveReq) XXX_Merge(src proto.Message)

func (*CHSaveReq) XXX_Size

func (m *CHSaveReq) XXX_Size() int

func (*CHSaveReq) XXX_Unmarshal

func (m *CHSaveReq) XXX_Unmarshal(b []byte) error

type ChatClient

type ChatClient interface {
	MessageSave(ctx context.Context, in *MsgSaveReq, opts ...grpc.CallOption) (*Rsp, error)
	MessageList(ctx context.Context, in *MsgListReq, opts ...grpc.CallOption) (*MsgListRsp, error)
	ChatHistoryList(ctx context.Context, in *ChatHistoryReq, opts ...grpc.CallOption) (*ChatHistoryRsp, error)
	ChatNumber(ctx context.Context, in *ChatNumberReq, opts ...grpc.CallOption) (*ChatNumberRsp, error)
	ChatHistorySave(ctx context.Context, in *CHSaveReq, opts ...grpc.CallOption) (*Rsp, error)
}

ChatClient is the client API for Chat 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 NewChatClient

func NewChatClient(cc grpc.ClientConnInterface) ChatClient

type ChatHistoryReq

type ChatHistoryReq struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChatHistoryReq) Descriptor

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

func (*ChatHistoryReq) GetId

func (m *ChatHistoryReq) GetId() uint64

func (*ChatHistoryReq) ProtoMessage

func (*ChatHistoryReq) ProtoMessage()

func (*ChatHistoryReq) Reset

func (m *ChatHistoryReq) Reset()

func (*ChatHistoryReq) String

func (m *ChatHistoryReq) String() string

func (*ChatHistoryReq) XXX_DiscardUnknown

func (m *ChatHistoryReq) XXX_DiscardUnknown()

func (*ChatHistoryReq) XXX_Marshal

func (m *ChatHistoryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChatHistoryReq) XXX_Merge

func (m *ChatHistoryReq) XXX_Merge(src proto.Message)

func (*ChatHistoryReq) XXX_Size

func (m *ChatHistoryReq) XXX_Size() int

func (*ChatHistoryReq) XXX_Unmarshal

func (m *ChatHistoryReq) XXX_Unmarshal(b []byte) error

type ChatHistoryRsp

type ChatHistoryRsp struct {
	Code                 int64       `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message              string      `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	User                 []*ChatUser `protobuf:"bytes,3,rep,name=User,proto3" json:"User,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*ChatHistoryRsp) Descriptor

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

func (*ChatHistoryRsp) GetCode

func (m *ChatHistoryRsp) GetCode() int64

func (*ChatHistoryRsp) GetMessage

func (m *ChatHistoryRsp) GetMessage() string

func (*ChatHistoryRsp) GetUser

func (m *ChatHistoryRsp) GetUser() []*ChatUser

func (*ChatHistoryRsp) ProtoMessage

func (*ChatHistoryRsp) ProtoMessage()

func (*ChatHistoryRsp) Reset

func (m *ChatHistoryRsp) Reset()

func (*ChatHistoryRsp) String

func (m *ChatHistoryRsp) String() string

func (*ChatHistoryRsp) XXX_DiscardUnknown

func (m *ChatHistoryRsp) XXX_DiscardUnknown()

func (*ChatHistoryRsp) XXX_Marshal

func (m *ChatHistoryRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChatHistoryRsp) XXX_Merge

func (m *ChatHistoryRsp) XXX_Merge(src proto.Message)

func (*ChatHistoryRsp) XXX_Size

func (m *ChatHistoryRsp) XXX_Size() int

func (*ChatHistoryRsp) XXX_Unmarshal

func (m *ChatHistoryRsp) XXX_Unmarshal(b []byte) error

type ChatMessage

type ChatMessage struct {
	Id                   int64    `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Uid                  uint64   `protobuf:"varint,2,opt,name=Uid,proto3" json:"Uid,omitempty"`
	ToUid                uint64   `protobuf:"varint,3,opt,name=ToUid,proto3" json:"ToUid,omitempty"`
	Message              string   `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"`
	Status               bool     `protobuf:"varint,5,opt,name=Status,proto3" json:"Status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChatMessage) Descriptor

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

func (*ChatMessage) GetId

func (m *ChatMessage) GetId() int64

func (*ChatMessage) GetMessage

func (m *ChatMessage) GetMessage() string

func (*ChatMessage) GetStatus

func (m *ChatMessage) GetStatus() bool

func (*ChatMessage) GetToUid

func (m *ChatMessage) GetToUid() uint64

func (*ChatMessage) GetUid

func (m *ChatMessage) GetUid() uint64

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) Reset

func (m *ChatMessage) Reset()

func (*ChatMessage) String

func (m *ChatMessage) String() string

func (*ChatMessage) XXX_DiscardUnknown

func (m *ChatMessage) XXX_DiscardUnknown()

func (*ChatMessage) XXX_Marshal

func (m *ChatMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChatMessage) XXX_Merge

func (m *ChatMessage) XXX_Merge(src proto.Message)

func (*ChatMessage) XXX_Size

func (m *ChatMessage) XXX_Size() int

func (*ChatMessage) XXX_Unmarshal

func (m *ChatMessage) XXX_Unmarshal(b []byte) error

type ChatNumberReq

type ChatNumberReq struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChatNumberReq) Descriptor

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

func (*ChatNumberReq) GetId

func (m *ChatNumberReq) GetId() uint64

func (*ChatNumberReq) ProtoMessage

func (*ChatNumberReq) ProtoMessage()

func (*ChatNumberReq) Reset

func (m *ChatNumberReq) Reset()

func (*ChatNumberReq) String

func (m *ChatNumberReq) String() string

func (*ChatNumberReq) XXX_DiscardUnknown

func (m *ChatNumberReq) XXX_DiscardUnknown()

func (*ChatNumberReq) XXX_Marshal

func (m *ChatNumberReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChatNumberReq) XXX_Merge

func (m *ChatNumberReq) XXX_Merge(src proto.Message)

func (*ChatNumberReq) XXX_Size

func (m *ChatNumberReq) XXX_Size() int

func (*ChatNumberReq) XXX_Unmarshal

func (m *ChatNumberReq) XXX_Unmarshal(b []byte) error

type ChatNumberRsp

type ChatNumberRsp struct {
	Code                 int64    `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	Number               int64    `protobuf:"varint,3,opt,name=Number,proto3" json:"Number,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChatNumberRsp) Descriptor

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

func (*ChatNumberRsp) GetCode

func (m *ChatNumberRsp) GetCode() int64

func (*ChatNumberRsp) GetMessage

func (m *ChatNumberRsp) GetMessage() string

func (*ChatNumberRsp) GetNumber

func (m *ChatNumberRsp) GetNumber() int64

func (*ChatNumberRsp) ProtoMessage

func (*ChatNumberRsp) ProtoMessage()

func (*ChatNumberRsp) Reset

func (m *ChatNumberRsp) Reset()

func (*ChatNumberRsp) String

func (m *ChatNumberRsp) String() string

func (*ChatNumberRsp) XXX_DiscardUnknown

func (m *ChatNumberRsp) XXX_DiscardUnknown()

func (*ChatNumberRsp) XXX_Marshal

func (m *ChatNumberRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChatNumberRsp) XXX_Merge

func (m *ChatNumberRsp) XXX_Merge(src proto.Message)

func (*ChatNumberRsp) XXX_Size

func (m *ChatNumberRsp) XXX_Size() int

func (*ChatNumberRsp) XXX_Unmarshal

func (m *ChatNumberRsp) XXX_Unmarshal(b []byte) error

type ChatServer

type ChatServer interface {
	MessageSave(context.Context, *MsgSaveReq) (*Rsp, error)
	MessageList(context.Context, *MsgListReq) (*MsgListRsp, error)
	ChatHistoryList(context.Context, *ChatHistoryReq) (*ChatHistoryRsp, error)
	ChatNumber(context.Context, *ChatNumberReq) (*ChatNumberRsp, error)
	ChatHistorySave(context.Context, *CHSaveReq) (*Rsp, error)
	// contains filtered or unexported methods
}

ChatServer is the server API for Chat service. All implementations must embed UnimplementedChatServer for forward compatibility

type ChatUser

type ChatUser struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Account              string   `protobuf:"bytes,3,opt,name=Account,proto3" json:"Account,omitempty"`
	Avatar               string   `protobuf:"bytes,4,opt,name=Avatar,proto3" json:"Avatar,omitempty"`
	Status               bool     `protobuf:"varint,5,opt,name=Status,proto3" json:"Status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChatUser) Descriptor

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

func (*ChatUser) GetAccount

func (m *ChatUser) GetAccount() string

func (*ChatUser) GetAvatar

func (m *ChatUser) GetAvatar() string

func (*ChatUser) GetId

func (m *ChatUser) GetId() uint64

func (*ChatUser) GetName

func (m *ChatUser) GetName() string

func (*ChatUser) GetStatus

func (m *ChatUser) GetStatus() bool

func (*ChatUser) ProtoMessage

func (*ChatUser) ProtoMessage()

func (*ChatUser) Reset

func (m *ChatUser) Reset()

func (*ChatUser) String

func (m *ChatUser) String() string

func (*ChatUser) XXX_DiscardUnknown

func (m *ChatUser) XXX_DiscardUnknown()

func (*ChatUser) XXX_Marshal

func (m *ChatUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChatUser) XXX_Merge

func (m *ChatUser) XXX_Merge(src proto.Message)

func (*ChatUser) XXX_Size

func (m *ChatUser) XXX_Size() int

func (*ChatUser) XXX_Unmarshal

func (m *ChatUser) XXX_Unmarshal(b []byte) error

type MsgListReq

type MsgListReq struct {
	Uid                  uint64   `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"`
	ToUid                uint64   `protobuf:"varint,2,opt,name=ToUid,proto3" json:"ToUid,omitempty"`
	Page                 int64    `protobuf:"varint,3,opt,name=Page,proto3" json:"Page,omitempty"`
	PageSize             int64    `protobuf:"varint,4,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MsgListReq) Descriptor

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

func (*MsgListReq) GetPage

func (m *MsgListReq) GetPage() int64

func (*MsgListReq) GetPageSize

func (m *MsgListReq) GetPageSize() int64

func (*MsgListReq) GetToUid

func (m *MsgListReq) GetToUid() uint64

func (*MsgListReq) GetUid

func (m *MsgListReq) GetUid() uint64

func (*MsgListReq) ProtoMessage

func (*MsgListReq) ProtoMessage()

func (*MsgListReq) Reset

func (m *MsgListReq) Reset()

func (*MsgListReq) String

func (m *MsgListReq) String() string

func (*MsgListReq) XXX_DiscardUnknown

func (m *MsgListReq) XXX_DiscardUnknown()

func (*MsgListReq) XXX_Marshal

func (m *MsgListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgListReq) XXX_Merge

func (m *MsgListReq) XXX_Merge(src proto.Message)

func (*MsgListReq) XXX_Size

func (m *MsgListReq) XXX_Size() int

func (*MsgListReq) XXX_Unmarshal

func (m *MsgListReq) XXX_Unmarshal(b []byte) error

type MsgListRsp

type MsgListRsp struct {
	Msg                  []*ChatMessage `protobuf:"bytes,1,rep,name=Msg,proto3" json:"Msg,omitempty"`
	Total                int64          `protobuf:"varint,2,opt,name=Total,proto3" json:"Total,omitempty"`
	Page                 int64          `protobuf:"varint,3,opt,name=Page,proto3" json:"Page,omitempty"`
	PageSize             int64          `protobuf:"varint,4,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
	Code                 int64          `protobuf:"varint,5,opt,name=Code,proto3" json:"Code,omitempty"`
	Message              string         `protobuf:"bytes,6,opt,name=Message,proto3" json:"Message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*MsgListRsp) Descriptor

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

func (*MsgListRsp) GetCode

func (m *MsgListRsp) GetCode() int64

func (*MsgListRsp) GetMessage

func (m *MsgListRsp) GetMessage() string

func (*MsgListRsp) GetMsg

func (m *MsgListRsp) GetMsg() []*ChatMessage

func (*MsgListRsp) GetPage

func (m *MsgListRsp) GetPage() int64

func (*MsgListRsp) GetPageSize

func (m *MsgListRsp) GetPageSize() int64

func (*MsgListRsp) GetTotal

func (m *MsgListRsp) GetTotal() int64

func (*MsgListRsp) ProtoMessage

func (*MsgListRsp) ProtoMessage()

func (*MsgListRsp) Reset

func (m *MsgListRsp) Reset()

func (*MsgListRsp) String

func (m *MsgListRsp) String() string

func (*MsgListRsp) XXX_DiscardUnknown

func (m *MsgListRsp) XXX_DiscardUnknown()

func (*MsgListRsp) XXX_Marshal

func (m *MsgListRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgListRsp) XXX_Merge

func (m *MsgListRsp) XXX_Merge(src proto.Message)

func (*MsgListRsp) XXX_Size

func (m *MsgListRsp) XXX_Size() int

func (*MsgListRsp) XXX_Unmarshal

func (m *MsgListRsp) XXX_Unmarshal(b []byte) error

type MsgSaveReq

type MsgSaveReq struct {
	Uid                  uint64   `protobuf:"varint,1,opt,name=Uid,proto3" json:"Uid,omitempty"`
	ToUid                uint64   `protobuf:"varint,2,opt,name=ToUid,proto3" json:"ToUid,omitempty"`
	Message              string   `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"`
	Status               bool     `protobuf:"varint,4,opt,name=Status,proto3" json:"Status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MsgSaveReq) Descriptor

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

func (*MsgSaveReq) GetMessage

func (m *MsgSaveReq) GetMessage() string

func (*MsgSaveReq) GetStatus

func (m *MsgSaveReq) GetStatus() bool

func (*MsgSaveReq) GetToUid

func (m *MsgSaveReq) GetToUid() uint64

func (*MsgSaveReq) GetUid

func (m *MsgSaveReq) GetUid() uint64

func (*MsgSaveReq) ProtoMessage

func (*MsgSaveReq) ProtoMessage()

func (*MsgSaveReq) Reset

func (m *MsgSaveReq) Reset()

func (*MsgSaveReq) String

func (m *MsgSaveReq) String() string

func (*MsgSaveReq) XXX_DiscardUnknown

func (m *MsgSaveReq) XXX_DiscardUnknown()

func (*MsgSaveReq) XXX_Marshal

func (m *MsgSaveReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSaveReq) XXX_Merge

func (m *MsgSaveReq) XXX_Merge(src proto.Message)

func (*MsgSaveReq) XXX_Size

func (m *MsgSaveReq) XXX_Size() int

func (*MsgSaveReq) XXX_Unmarshal

func (m *MsgSaveReq) XXX_Unmarshal(b []byte) error

type Rsp

type Rsp struct {
	Code                 int64    `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Rsp) Descriptor

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

func (*Rsp) GetCode

func (m *Rsp) GetCode() int64

func (*Rsp) GetMessage

func (m *Rsp) GetMessage() string

func (*Rsp) ProtoMessage

func (*Rsp) ProtoMessage()

func (*Rsp) Reset

func (m *Rsp) Reset()

func (*Rsp) String

func (m *Rsp) String() string

func (*Rsp) XXX_DiscardUnknown

func (m *Rsp) XXX_DiscardUnknown()

func (*Rsp) XXX_Marshal

func (m *Rsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Rsp) XXX_Merge

func (m *Rsp) XXX_Merge(src proto.Message)

func (*Rsp) XXX_Size

func (m *Rsp) XXX_Size() int

func (*Rsp) XXX_Unmarshal

func (m *Rsp) XXX_Unmarshal(b []byte) error

type UnimplementedChatServer

type UnimplementedChatServer struct {
}

UnimplementedChatServer must be embedded to have forward compatible implementations.

func (UnimplementedChatServer) ChatHistoryList

func (UnimplementedChatServer) ChatHistorySave

func (UnimplementedChatServer) ChatHistorySave(context.Context, *CHSaveReq) (*Rsp, error)

func (UnimplementedChatServer) ChatNumber

func (UnimplementedChatServer) MessageList

func (UnimplementedChatServer) MessageSave

type UnsafeChatServer

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

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

Jump to

Keyboard shortcuts

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