Documentation ¶
Index ¶
- Variables
- func RegisterOfflineMessageServer(s grpc.ServiceRegistrar, srv OfflineMessageServer)
- func RegisterPushMessagerServer(s grpc.ServiceRegistrar, srv PushMessagerServer)
- func RegisterSendMessagerServer(s grpc.ServiceRegistrar, srv SendMessagerServer)
- type BriefMessage
- func (*BriefMessage) Descriptor() ([]byte, []int)deprecated
- func (x *BriefMessage) GetContent() string
- func (x *BriefMessage) GetContentType() MessageContentType
- func (x *BriefMessage) GetFromUser() string
- func (x *BriefMessage) GetMsgSeq() string
- func (x *BriefMessage) GetSessionId() int64
- func (x *BriefMessage) GetToUser() string
- func (*BriefMessage) ProtoMessage()
- func (x *BriefMessage) ProtoReflect() protoreflect.Message
- func (x *BriefMessage) Reset()
- func (x *BriefMessage) String() string
- func (m *BriefMessage) Validate() error
- func (m *BriefMessage) ValidateAll() error
- type BriefMessageMultiError
- type BriefMessageValidationError
- func (e BriefMessageValidationError) Cause() error
- func (e BriefMessageValidationError) Error() string
- func (e BriefMessageValidationError) ErrorName() string
- func (e BriefMessageValidationError) Field() string
- func (e BriefMessageValidationError) Key() bool
- func (e BriefMessageValidationError) Reason() string
- type MessageContentType
- func (MessageContentType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageContentType) Enum() *MessageContentType
- func (MessageContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageContentType) Number() protoreflect.EnumNumber
- func (x MessageContentType) String() string
- func (MessageContentType) Type() protoreflect.EnumType
- type MqMessage
- func (*MqMessage) Descriptor() ([]byte, []int)deprecated
- func (x *MqMessage) GetContent() string
- func (x *MqMessage) GetContentType() MessageContentType
- func (x *MqMessage) GetFromUser() string
- func (x *MqMessage) GetPushMessageType() PushMessageType
- func (x *MqMessage) GetSessionId() int64
- func (x *MqMessage) GetToUser() string
- func (*MqMessage) ProtoMessage()
- func (x *MqMessage) ProtoReflect() protoreflect.Message
- func (x *MqMessage) Reset()
- func (x *MqMessage) String() string
- func (m *MqMessage) Validate() error
- func (m *MqMessage) ValidateAll() error
- type MqMessageMultiError
- type MqMessageValidationError
- type OfflineMessageClient
- type OfflineMessageServer
- type PushMessageReq
- func (*PushMessageReq) Descriptor() ([]byte, []int)deprecated
- func (x *PushMessageReq) GetContent() string
- func (x *PushMessageReq) GetContentType() MessageContentType
- func (x *PushMessageReq) GetFromUser() string
- func (x *PushMessageReq) GetMsgSeq() string
- func (x *PushMessageReq) GetPushMessageType() PushMessageType
- func (x *PushMessageReq) GetSessionId() int64
- func (x *PushMessageReq) GetToUser() string
- func (*PushMessageReq) ProtoMessage()
- func (x *PushMessageReq) ProtoReflect() protoreflect.Message
- func (x *PushMessageReq) Reset()
- func (x *PushMessageReq) String() string
- func (m *PushMessageReq) Validate() error
- func (m *PushMessageReq) ValidateAll() error
- type PushMessageReqMultiError
- type PushMessageReqValidationError
- func (e PushMessageReqValidationError) Cause() error
- func (e PushMessageReqValidationError) Error() string
- func (e PushMessageReqValidationError) ErrorName() string
- func (e PushMessageReqValidationError) Field() string
- func (e PushMessageReqValidationError) Key() bool
- func (e PushMessageReqValidationError) Reason() string
- type PushMessageType
- func (PushMessageType) Descriptor() protoreflect.EnumDescriptor
- func (x PushMessageType) Enum() *PushMessageType
- func (PushMessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x PushMessageType) Number() protoreflect.EnumNumber
- func (x PushMessageType) String() string
- func (PushMessageType) Type() protoreflect.EnumType
- type PushMessagerClient
- type PushMessagerServer
- type QueryOfflineMessageReq
- func (*QueryOfflineMessageReq) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOfflineMessageReq) GetLastMsgSeq() string
- func (x *QueryOfflineMessageReq) GetOnlyCount() bool
- func (x *QueryOfflineMessageReq) GetPage() int32
- func (x *QueryOfflineMessageReq) GetPageSize() int32
- func (x *QueryOfflineMessageReq) GetUserId() string
- func (*QueryOfflineMessageReq) ProtoMessage()
- func (x *QueryOfflineMessageReq) ProtoReflect() protoreflect.Message
- func (x *QueryOfflineMessageReq) Reset()
- func (x *QueryOfflineMessageReq) String() string
- func (m *QueryOfflineMessageReq) Validate() error
- func (m *QueryOfflineMessageReq) ValidateAll() error
- type QueryOfflineMessageReqMultiError
- type QueryOfflineMessageReqValidationError
- func (e QueryOfflineMessageReqValidationError) Cause() error
- func (e QueryOfflineMessageReqValidationError) Error() string
- func (e QueryOfflineMessageReqValidationError) ErrorName() string
- func (e QueryOfflineMessageReqValidationError) Field() string
- func (e QueryOfflineMessageReqValidationError) Key() bool
- func (e QueryOfflineMessageReqValidationError) Reason() string
- type QueryOfflineMessageResp
- func (*QueryOfflineMessageResp) Descriptor() ([]byte, []int)deprecated
- func (x *QueryOfflineMessageResp) GetMessages() []*BriefMessage
- func (x *QueryOfflineMessageResp) GetResponse() *response.BaseResponse
- func (x *QueryOfflineMessageResp) GetTotal() int32
- func (*QueryOfflineMessageResp) ProtoMessage()
- func (x *QueryOfflineMessageResp) ProtoReflect() protoreflect.Message
- func (x *QueryOfflineMessageResp) Reset()
- func (x *QueryOfflineMessageResp) String() string
- func (m *QueryOfflineMessageResp) Validate() error
- func (m *QueryOfflineMessageResp) ValidateAll() error
- type QueryOfflineMessageRespMultiError
- type QueryOfflineMessageRespValidationError
- func (e QueryOfflineMessageRespValidationError) Cause() error
- func (e QueryOfflineMessageRespValidationError) Error() string
- func (e QueryOfflineMessageRespValidationError) ErrorName() string
- func (e QueryOfflineMessageRespValidationError) Field() string
- func (e QueryOfflineMessageRespValidationError) Key() bool
- func (e QueryOfflineMessageRespValidationError) Reason() string
- type SendMessageReq
- func (*SendMessageReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendMessageReq) GetContent() string
- func (x *SendMessageReq) GetContentType() MessageContentType
- func (x *SendMessageReq) GetFromUser() string
- func (x *SendMessageReq) GetToUser() string
- func (*SendMessageReq) ProtoMessage()
- func (x *SendMessageReq) ProtoReflect() protoreflect.Message
- func (x *SendMessageReq) Reset()
- func (x *SendMessageReq) String() string
- func (m *SendMessageReq) Validate() error
- func (m *SendMessageReq) ValidateAll() error
- type SendMessageReqMultiError
- type SendMessageReqValidationError
- func (e SendMessageReqValidationError) Cause() error
- func (e SendMessageReqValidationError) Error() string
- func (e SendMessageReqValidationError) ErrorName() string
- func (e SendMessageReqValidationError) Field() string
- func (e SendMessageReqValidationError) Key() bool
- func (e SendMessageReqValidationError) Reason() string
- type SendMessageResp
- func (*SendMessageResp) Descriptor() ([]byte, []int)deprecated
- func (x *SendMessageResp) GetMsgSeq() string
- func (x *SendMessageResp) GetResponse() *response.BaseResponse
- func (x *SendMessageResp) GetSessionId() int64
- func (*SendMessageResp) ProtoMessage()
- func (x *SendMessageResp) ProtoReflect() protoreflect.Message
- func (x *SendMessageResp) Reset()
- func (x *SendMessageResp) String() string
- func (m *SendMessageResp) Validate() error
- func (m *SendMessageResp) ValidateAll() error
- type SendMessageRespMultiError
- type SendMessageRespValidationError
- func (e SendMessageRespValidationError) Cause() error
- func (e SendMessageRespValidationError) Error() string
- func (e SendMessageRespValidationError) ErrorName() string
- func (e SendMessageRespValidationError) Field() string
- func (e SendMessageRespValidationError) Key() bool
- func (e SendMessageRespValidationError) Reason() string
- type SendMessagerClient
- type SendMessagerServer
- type UnimplementedOfflineMessageServer
- type UnimplementedPushMessagerServer
- type UnimplementedSendMessagerServer
- type UnsafeOfflineMessageServer
- type UnsafePushMessagerServer
- type UnsafeSendMessagerServer
Constants ¶
This section is empty.
Variables ¶
var ( MessageContentType_name = map[int32]string{ 0: "UnknownContentType", 1: "Text", 2: "Image", 3: "Voice", } MessageContentType_value = map[string]int32{ "UnknownContentType": 0, "Text": 1, "Image": 2, "Voice": 3, } )
Enum value maps for MessageContentType.
var ( PushMessageType_name = map[int32]string{ 0: "UnknownUserType", 1: "User", 2: "Group", 3: "Broadcast", } PushMessageType_value = map[string]int32{ "UnknownUserType": 0, "User": 1, "Group": 2, "Broadcast": 3, } )
Enum value maps for PushMessageType.
var File_message_v1_message_proto protoreflect.FileDescriptor
var OfflineMessage_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.message.v1.OfflineMessage", HandlerType: (*OfflineMessageServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QueryOfflineMessage", Handler: _OfflineMessage_QueryOfflineMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "message/v1/message.proto", }
OfflineMessage_ServiceDesc is the grpc.ServiceDesc for OfflineMessage service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PushMessager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.message.v1.PushMessager", HandlerType: (*PushMessagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PushMessage", Handler: _PushMessager_PushMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "message/v1/message.proto", }
PushMessager_ServiceDesc is the grpc.ServiceDesc for PushMessager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var SendMessager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.message.v1.SendMessager", HandlerType: (*SendMessagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendMessage", Handler: _SendMessager_SendMessage_Handler, }, { MethodName: "Broadcast", Handler: _SendMessager_Broadcast_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "message/v1/message.proto", }
SendMessager_ServiceDesc is the grpc.ServiceDesc for SendMessager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOfflineMessageServer ¶
func RegisterOfflineMessageServer(s grpc.ServiceRegistrar, srv OfflineMessageServer)
func RegisterPushMessagerServer ¶
func RegisterPushMessagerServer(s grpc.ServiceRegistrar, srv PushMessagerServer)
func RegisterSendMessagerServer ¶
func RegisterSendMessagerServer(s grpc.ServiceRegistrar, srv SendMessagerServer)
Types ¶
type BriefMessage ¶
type BriefMessage struct { FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` ContentType MessageContentType `` /* 134-byte string literal not displayed */ Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` MsgSeq string `protobuf:"bytes,5,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` SessionId int64 `protobuf:"varint,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // contains filtered or unexported fields }
BriefMessage is message with basic information
func (*BriefMessage) Descriptor
deprecated
func (*BriefMessage) Descriptor() ([]byte, []int)
Deprecated: Use BriefMessage.ProtoReflect.Descriptor instead.
func (*BriefMessage) GetContent ¶
func (x *BriefMessage) GetContent() string
func (*BriefMessage) GetContentType ¶
func (x *BriefMessage) GetContentType() MessageContentType
func (*BriefMessage) GetFromUser ¶
func (x *BriefMessage) GetFromUser() string
func (*BriefMessage) GetMsgSeq ¶
func (x *BriefMessage) GetMsgSeq() string
func (*BriefMessage) GetSessionId ¶ added in v0.0.3
func (x *BriefMessage) GetSessionId() int64
func (*BriefMessage) GetToUser ¶
func (x *BriefMessage) GetToUser() string
func (*BriefMessage) ProtoMessage ¶
func (*BriefMessage) ProtoMessage()
func (*BriefMessage) ProtoReflect ¶
func (x *BriefMessage) ProtoReflect() protoreflect.Message
func (*BriefMessage) Reset ¶
func (x *BriefMessage) Reset()
func (*BriefMessage) String ¶
func (x *BriefMessage) String() string
func (*BriefMessage) Validate ¶
func (m *BriefMessage) Validate() error
Validate checks the field values on BriefMessage with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*BriefMessage) ValidateAll ¶
func (m *BriefMessage) ValidateAll() error
ValidateAll checks the field values on BriefMessage with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BriefMessageMultiError, or nil if none found.
type BriefMessageMultiError ¶
type BriefMessageMultiError []error
BriefMessageMultiError is an error wrapping multiple validation errors returned by BriefMessage.ValidateAll() if the designated constraints aren't met.
func (BriefMessageMultiError) AllErrors ¶
func (m BriefMessageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BriefMessageMultiError) Error ¶
func (m BriefMessageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BriefMessageValidationError ¶
type BriefMessageValidationError struct {
// contains filtered or unexported fields
}
BriefMessageValidationError is the validation error returned by BriefMessage.Validate if the designated constraints aren't met.
func (BriefMessageValidationError) Cause ¶
func (e BriefMessageValidationError) Cause() error
Cause function returns cause value.
func (BriefMessageValidationError) Error ¶
func (e BriefMessageValidationError) Error() string
Error satisfies the builtin error interface
func (BriefMessageValidationError) ErrorName ¶
func (e BriefMessageValidationError) ErrorName() string
ErrorName returns error name.
func (BriefMessageValidationError) Field ¶
func (e BriefMessageValidationError) Field() string
Field function returns field value.
func (BriefMessageValidationError) Key ¶
func (e BriefMessageValidationError) Key() bool
Key function returns key value.
func (BriefMessageValidationError) Reason ¶
func (e BriefMessageValidationError) Reason() string
Reason function returns reason value.
type MessageContentType ¶
type MessageContentType int32
const ( MessageContentType_UnknownContentType MessageContentType = 0 MessageContentType_Text MessageContentType = 1 MessageContentType_Image MessageContentType = 2 MessageContentType_Voice MessageContentType = 3 )
func (MessageContentType) Descriptor ¶
func (MessageContentType) Descriptor() protoreflect.EnumDescriptor
func (MessageContentType) Enum ¶
func (x MessageContentType) Enum() *MessageContentType
func (MessageContentType) EnumDescriptor
deprecated
func (MessageContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageContentType.Descriptor instead.
func (MessageContentType) Number ¶
func (x MessageContentType) Number() protoreflect.EnumNumber
func (MessageContentType) String ¶
func (x MessageContentType) String() string
func (MessageContentType) Type ¶
func (MessageContentType) Type() protoreflect.EnumType
type MqMessage ¶
type MqMessage struct { FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` PushMessageType PushMessageType `` /* 145-byte string literal not displayed */ ContentType MessageContentType `` /* 134-byte string literal not displayed */ Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` SessionId int64 `protobuf:"varint,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // contains filtered or unexported fields }
MqMessage is message protocol when pub/sub msg to mq
func (*MqMessage) Descriptor
deprecated
func (*MqMessage) GetContent ¶
func (*MqMessage) GetContentType ¶
func (x *MqMessage) GetContentType() MessageContentType
func (*MqMessage) GetFromUser ¶
func (*MqMessage) GetPushMessageType ¶
func (x *MqMessage) GetPushMessageType() PushMessageType
func (*MqMessage) GetSessionId ¶ added in v0.0.3
func (*MqMessage) ProtoMessage ¶
func (*MqMessage) ProtoMessage()
func (*MqMessage) ProtoReflect ¶
func (x *MqMessage) ProtoReflect() protoreflect.Message
func (*MqMessage) Validate ¶
Validate checks the field values on MqMessage with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*MqMessage) ValidateAll ¶
ValidateAll checks the field values on MqMessage with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MqMessageMultiError, or nil if none found.
type MqMessageMultiError ¶
type MqMessageMultiError []error
MqMessageMultiError is an error wrapping multiple validation errors returned by MqMessage.ValidateAll() if the designated constraints aren't met.
func (MqMessageMultiError) AllErrors ¶
func (m MqMessageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MqMessageMultiError) Error ¶
func (m MqMessageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MqMessageValidationError ¶
type MqMessageValidationError struct {
// contains filtered or unexported fields
}
MqMessageValidationError is the validation error returned by MqMessage.Validate if the designated constraints aren't met.
func (MqMessageValidationError) Cause ¶
func (e MqMessageValidationError) Cause() error
Cause function returns cause value.
func (MqMessageValidationError) Error ¶
func (e MqMessageValidationError) Error() string
Error satisfies the builtin error interface
func (MqMessageValidationError) ErrorName ¶
func (e MqMessageValidationError) ErrorName() string
ErrorName returns error name.
func (MqMessageValidationError) Field ¶
func (e MqMessageValidationError) Field() string
Field function returns field value.
func (MqMessageValidationError) Key ¶
func (e MqMessageValidationError) Key() bool
Key function returns key value.
func (MqMessageValidationError) Reason ¶
func (e MqMessageValidationError) Reason() string
Reason function returns reason value.
type OfflineMessageClient ¶
type OfflineMessageClient interface {
QueryOfflineMessage(ctx context.Context, in *QueryOfflineMessageReq, opts ...grpc.CallOption) (*QueryOfflineMessageResp, error)
}
OfflineMessageClient is the client API for OfflineMessage 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 NewOfflineMessageClient ¶
func NewOfflineMessageClient(cc grpc.ClientConnInterface) OfflineMessageClient
type OfflineMessageServer ¶
type OfflineMessageServer interface { QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error) // contains filtered or unexported methods }
OfflineMessageServer is the server API for OfflineMessage service. All implementations must embed UnimplementedOfflineMessageServer for forward compatibility
type PushMessageReq ¶
type PushMessageReq struct { FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` PushMessageType PushMessageType `` /* 145-byte string literal not displayed */ ContentType MessageContentType `` /* 134-byte string literal not displayed */ Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` MsgSeq string `protobuf:"bytes,6,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` SessionId int64 `protobuf:"varint,7,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // contains filtered or unexported fields }
PushMessage use for push a message to persistence connection server
func (*PushMessageReq) Descriptor
deprecated
func (*PushMessageReq) Descriptor() ([]byte, []int)
Deprecated: Use PushMessageReq.ProtoReflect.Descriptor instead.
func (*PushMessageReq) GetContent ¶
func (x *PushMessageReq) GetContent() string
func (*PushMessageReq) GetContentType ¶
func (x *PushMessageReq) GetContentType() MessageContentType
func (*PushMessageReq) GetFromUser ¶
func (x *PushMessageReq) GetFromUser() string
func (*PushMessageReq) GetMsgSeq ¶
func (x *PushMessageReq) GetMsgSeq() string
func (*PushMessageReq) GetPushMessageType ¶
func (x *PushMessageReq) GetPushMessageType() PushMessageType
func (*PushMessageReq) GetSessionId ¶ added in v0.0.3
func (x *PushMessageReq) GetSessionId() int64
func (*PushMessageReq) GetToUser ¶
func (x *PushMessageReq) GetToUser() string
func (*PushMessageReq) ProtoMessage ¶
func (*PushMessageReq) ProtoMessage()
func (*PushMessageReq) ProtoReflect ¶
func (x *PushMessageReq) ProtoReflect() protoreflect.Message
func (*PushMessageReq) Reset ¶
func (x *PushMessageReq) Reset()
func (*PushMessageReq) String ¶
func (x *PushMessageReq) String() string
func (*PushMessageReq) Validate ¶
func (m *PushMessageReq) Validate() error
Validate checks the field values on PushMessageReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PushMessageReq) ValidateAll ¶
func (m *PushMessageReq) ValidateAll() error
ValidateAll checks the field values on PushMessageReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PushMessageReqMultiError, or nil if none found.
type PushMessageReqMultiError ¶
type PushMessageReqMultiError []error
PushMessageReqMultiError is an error wrapping multiple validation errors returned by PushMessageReq.ValidateAll() if the designated constraints aren't met.
func (PushMessageReqMultiError) AllErrors ¶
func (m PushMessageReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PushMessageReqMultiError) Error ¶
func (m PushMessageReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PushMessageReqValidationError ¶
type PushMessageReqValidationError struct {
// contains filtered or unexported fields
}
PushMessageReqValidationError is the validation error returned by PushMessageReq.Validate if the designated constraints aren't met.
func (PushMessageReqValidationError) Cause ¶
func (e PushMessageReqValidationError) Cause() error
Cause function returns cause value.
func (PushMessageReqValidationError) Error ¶
func (e PushMessageReqValidationError) Error() string
Error satisfies the builtin error interface
func (PushMessageReqValidationError) ErrorName ¶
func (e PushMessageReqValidationError) ErrorName() string
ErrorName returns error name.
func (PushMessageReqValidationError) Field ¶
func (e PushMessageReqValidationError) Field() string
Field function returns field value.
func (PushMessageReqValidationError) Key ¶
func (e PushMessageReqValidationError) Key() bool
Key function returns key value.
func (PushMessageReqValidationError) Reason ¶
func (e PushMessageReqValidationError) Reason() string
Reason function returns reason value.
type PushMessageType ¶
type PushMessageType int32
const ( PushMessageType_UnknownUserType PushMessageType = 0 // user to user PushMessageType_User PushMessageType = 1 // user to group PushMessageType_Group PushMessageType = 2 // global broadcast PushMessageType_Broadcast PushMessageType = 3 )
func (PushMessageType) Descriptor ¶
func (PushMessageType) Descriptor() protoreflect.EnumDescriptor
func (PushMessageType) Enum ¶
func (x PushMessageType) Enum() *PushMessageType
func (PushMessageType) EnumDescriptor
deprecated
func (PushMessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PushMessageType.Descriptor instead.
func (PushMessageType) Number ¶
func (x PushMessageType) Number() protoreflect.EnumNumber
func (PushMessageType) String ¶
func (x PushMessageType) String() string
func (PushMessageType) Type ¶
func (PushMessageType) Type() protoreflect.EnumType
type PushMessagerClient ¶
type PushMessagerClient interface {
PushMessage(ctx context.Context, in *PushMessageReq, opts ...grpc.CallOption) (*response.BaseResponse, error)
}
PushMessagerClient is the client API for PushMessager 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 NewPushMessagerClient ¶
func NewPushMessagerClient(cc grpc.ClientConnInterface) PushMessagerClient
type PushMessagerServer ¶
type PushMessagerServer interface { PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error) // contains filtered or unexported methods }
PushMessagerServer is the server API for PushMessager service. All implementations must embed UnimplementedPushMessagerServer for forward compatibility
type QueryOfflineMessageReq ¶
type QueryOfflineMessageReq struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` LastMsgSeq string `protobuf:"bytes,2,opt,name=last_msg_seq,json=lastMsgSeq,proto3" json:"last_msg_seq,omitempty"` OnlyCount bool `protobuf:"varint,3,opt,name=onlyCount,proto3" json:"onlyCount,omitempty"` Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*QueryOfflineMessageReq) Descriptor
deprecated
func (*QueryOfflineMessageReq) Descriptor() ([]byte, []int)
Deprecated: Use QueryOfflineMessageReq.ProtoReflect.Descriptor instead.
func (*QueryOfflineMessageReq) GetLastMsgSeq ¶
func (x *QueryOfflineMessageReq) GetLastMsgSeq() string
func (*QueryOfflineMessageReq) GetOnlyCount ¶
func (x *QueryOfflineMessageReq) GetOnlyCount() bool
func (*QueryOfflineMessageReq) GetPage ¶
func (x *QueryOfflineMessageReq) GetPage() int32
func (*QueryOfflineMessageReq) GetPageSize ¶
func (x *QueryOfflineMessageReq) GetPageSize() int32
func (*QueryOfflineMessageReq) GetUserId ¶
func (x *QueryOfflineMessageReq) GetUserId() string
func (*QueryOfflineMessageReq) ProtoMessage ¶
func (*QueryOfflineMessageReq) ProtoMessage()
func (*QueryOfflineMessageReq) ProtoReflect ¶
func (x *QueryOfflineMessageReq) ProtoReflect() protoreflect.Message
func (*QueryOfflineMessageReq) Reset ¶
func (x *QueryOfflineMessageReq) Reset()
func (*QueryOfflineMessageReq) String ¶
func (x *QueryOfflineMessageReq) String() string
func (*QueryOfflineMessageReq) Validate ¶
func (m *QueryOfflineMessageReq) Validate() error
Validate checks the field values on QueryOfflineMessageReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*QueryOfflineMessageReq) ValidateAll ¶
func (m *QueryOfflineMessageReq) ValidateAll() error
ValidateAll checks the field values on QueryOfflineMessageReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in QueryOfflineMessageReqMultiError, or nil if none found.
type QueryOfflineMessageReqMultiError ¶
type QueryOfflineMessageReqMultiError []error
QueryOfflineMessageReqMultiError is an error wrapping multiple validation errors returned by QueryOfflineMessageReq.ValidateAll() if the designated constraints aren't met.
func (QueryOfflineMessageReqMultiError) AllErrors ¶
func (m QueryOfflineMessageReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (QueryOfflineMessageReqMultiError) Error ¶
func (m QueryOfflineMessageReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type QueryOfflineMessageReqValidationError ¶
type QueryOfflineMessageReqValidationError struct {
// contains filtered or unexported fields
}
QueryOfflineMessageReqValidationError is the validation error returned by QueryOfflineMessageReq.Validate if the designated constraints aren't met.
func (QueryOfflineMessageReqValidationError) Cause ¶
func (e QueryOfflineMessageReqValidationError) Cause() error
Cause function returns cause value.
func (QueryOfflineMessageReqValidationError) Error ¶
func (e QueryOfflineMessageReqValidationError) Error() string
Error satisfies the builtin error interface
func (QueryOfflineMessageReqValidationError) ErrorName ¶
func (e QueryOfflineMessageReqValidationError) ErrorName() string
ErrorName returns error name.
func (QueryOfflineMessageReqValidationError) Field ¶
func (e QueryOfflineMessageReqValidationError) Field() string
Field function returns field value.
func (QueryOfflineMessageReqValidationError) Key ¶
func (e QueryOfflineMessageReqValidationError) Key() bool
Key function returns key value.
func (QueryOfflineMessageReqValidationError) Reason ¶
func (e QueryOfflineMessageReqValidationError) Reason() string
Reason function returns reason value.
type QueryOfflineMessageResp ¶
type QueryOfflineMessageResp struct { Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` Messages []*BriefMessage `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*QueryOfflineMessageResp) Descriptor
deprecated
func (*QueryOfflineMessageResp) Descriptor() ([]byte, []int)
Deprecated: Use QueryOfflineMessageResp.ProtoReflect.Descriptor instead.
func (*QueryOfflineMessageResp) GetMessages ¶
func (x *QueryOfflineMessageResp) GetMessages() []*BriefMessage
func (*QueryOfflineMessageResp) GetResponse ¶
func (x *QueryOfflineMessageResp) GetResponse() *response.BaseResponse
func (*QueryOfflineMessageResp) GetTotal ¶
func (x *QueryOfflineMessageResp) GetTotal() int32
func (*QueryOfflineMessageResp) ProtoMessage ¶
func (*QueryOfflineMessageResp) ProtoMessage()
func (*QueryOfflineMessageResp) ProtoReflect ¶
func (x *QueryOfflineMessageResp) ProtoReflect() protoreflect.Message
func (*QueryOfflineMessageResp) Reset ¶
func (x *QueryOfflineMessageResp) Reset()
func (*QueryOfflineMessageResp) String ¶
func (x *QueryOfflineMessageResp) String() string
func (*QueryOfflineMessageResp) Validate ¶
func (m *QueryOfflineMessageResp) Validate() error
Validate checks the field values on QueryOfflineMessageResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*QueryOfflineMessageResp) ValidateAll ¶
func (m *QueryOfflineMessageResp) ValidateAll() error
ValidateAll checks the field values on QueryOfflineMessageResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in QueryOfflineMessageRespMultiError, or nil if none found.
type QueryOfflineMessageRespMultiError ¶
type QueryOfflineMessageRespMultiError []error
QueryOfflineMessageRespMultiError is an error wrapping multiple validation errors returned by QueryOfflineMessageResp.ValidateAll() if the designated constraints aren't met.
func (QueryOfflineMessageRespMultiError) AllErrors ¶
func (m QueryOfflineMessageRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (QueryOfflineMessageRespMultiError) Error ¶
func (m QueryOfflineMessageRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type QueryOfflineMessageRespValidationError ¶
type QueryOfflineMessageRespValidationError struct {
// contains filtered or unexported fields
}
QueryOfflineMessageRespValidationError is the validation error returned by QueryOfflineMessageResp.Validate if the designated constraints aren't met.
func (QueryOfflineMessageRespValidationError) Cause ¶
func (e QueryOfflineMessageRespValidationError) Cause() error
Cause function returns cause value.
func (QueryOfflineMessageRespValidationError) Error ¶
func (e QueryOfflineMessageRespValidationError) Error() string
Error satisfies the builtin error interface
func (QueryOfflineMessageRespValidationError) ErrorName ¶
func (e QueryOfflineMessageRespValidationError) ErrorName() string
ErrorName returns error name.
func (QueryOfflineMessageRespValidationError) Field ¶
func (e QueryOfflineMessageRespValidationError) Field() string
Field function returns field value.
func (QueryOfflineMessageRespValidationError) Key ¶
func (e QueryOfflineMessageRespValidationError) Key() bool
Key function returns key value.
func (QueryOfflineMessageRespValidationError) Reason ¶
func (e QueryOfflineMessageRespValidationError) Reason() string
Reason function returns reason value.
type SendMessageReq ¶
type SendMessageReq struct { FromUser string `protobuf:"bytes,1,opt,name=from_user,json=fromUser,proto3" json:"from_user,omitempty"` ToUser string `protobuf:"bytes,2,opt,name=to_user,json=toUser,proto3" json:"to_user,omitempty"` ContentType MessageContentType `` /* 134-byte string literal not displayed */ Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
SendMessageReq receive data from gateway
func (*SendMessageReq) Descriptor
deprecated
func (*SendMessageReq) Descriptor() ([]byte, []int)
Deprecated: Use SendMessageReq.ProtoReflect.Descriptor instead.
func (*SendMessageReq) GetContent ¶
func (x *SendMessageReq) GetContent() string
func (*SendMessageReq) GetContentType ¶
func (x *SendMessageReq) GetContentType() MessageContentType
func (*SendMessageReq) GetFromUser ¶
func (x *SendMessageReq) GetFromUser() string
func (*SendMessageReq) GetToUser ¶
func (x *SendMessageReq) GetToUser() string
func (*SendMessageReq) ProtoMessage ¶
func (*SendMessageReq) ProtoMessage()
func (*SendMessageReq) ProtoReflect ¶
func (x *SendMessageReq) ProtoReflect() protoreflect.Message
func (*SendMessageReq) Reset ¶
func (x *SendMessageReq) Reset()
func (*SendMessageReq) String ¶
func (x *SendMessageReq) String() string
func (*SendMessageReq) Validate ¶
func (m *SendMessageReq) Validate() error
Validate checks the field values on SendMessageReq with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SendMessageReq) ValidateAll ¶
func (m *SendMessageReq) ValidateAll() error
ValidateAll checks the field values on SendMessageReq with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SendMessageReqMultiError, or nil if none found.
type SendMessageReqMultiError ¶
type SendMessageReqMultiError []error
SendMessageReqMultiError is an error wrapping multiple validation errors returned by SendMessageReq.ValidateAll() if the designated constraints aren't met.
func (SendMessageReqMultiError) AllErrors ¶
func (m SendMessageReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendMessageReqMultiError) Error ¶
func (m SendMessageReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendMessageReqValidationError ¶
type SendMessageReqValidationError struct {
// contains filtered or unexported fields
}
SendMessageReqValidationError is the validation error returned by SendMessageReq.Validate if the designated constraints aren't met.
func (SendMessageReqValidationError) Cause ¶
func (e SendMessageReqValidationError) Cause() error
Cause function returns cause value.
func (SendMessageReqValidationError) Error ¶
func (e SendMessageReqValidationError) Error() string
Error satisfies the builtin error interface
func (SendMessageReqValidationError) ErrorName ¶
func (e SendMessageReqValidationError) ErrorName() string
ErrorName returns error name.
func (SendMessageReqValidationError) Field ¶
func (e SendMessageReqValidationError) Field() string
Field function returns field value.
func (SendMessageReqValidationError) Key ¶
func (e SendMessageReqValidationError) Key() bool
Key function returns key value.
func (SendMessageReqValidationError) Reason ¶
func (e SendMessageReqValidationError) Reason() string
Reason function returns reason value.
type SendMessageResp ¶
type SendMessageResp struct { Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` // MsgSeq is unique seq of a message SessionId int64 `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` MsgSeq string `protobuf:"bytes,3,opt,name=msg_seq,json=msgSeq,proto3" json:"msg_seq,omitempty"` // contains filtered or unexported fields }
SendMessageResp is response body for sendMessage
func (*SendMessageResp) Descriptor
deprecated
func (*SendMessageResp) Descriptor() ([]byte, []int)
Deprecated: Use SendMessageResp.ProtoReflect.Descriptor instead.
func (*SendMessageResp) GetMsgSeq ¶
func (x *SendMessageResp) GetMsgSeq() string
func (*SendMessageResp) GetResponse ¶
func (x *SendMessageResp) GetResponse() *response.BaseResponse
func (*SendMessageResp) GetSessionId ¶ added in v0.0.3
func (x *SendMessageResp) GetSessionId() int64
func (*SendMessageResp) ProtoMessage ¶
func (*SendMessageResp) ProtoMessage()
func (*SendMessageResp) ProtoReflect ¶
func (x *SendMessageResp) ProtoReflect() protoreflect.Message
func (*SendMessageResp) Reset ¶
func (x *SendMessageResp) Reset()
func (*SendMessageResp) String ¶
func (x *SendMessageResp) String() string
func (*SendMessageResp) Validate ¶
func (m *SendMessageResp) Validate() error
Validate checks the field values on SendMessageResp with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SendMessageResp) ValidateAll ¶
func (m *SendMessageResp) ValidateAll() error
ValidateAll checks the field values on SendMessageResp with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SendMessageRespMultiError, or nil if none found.
type SendMessageRespMultiError ¶
type SendMessageRespMultiError []error
SendMessageRespMultiError is an error wrapping multiple validation errors returned by SendMessageResp.ValidateAll() if the designated constraints aren't met.
func (SendMessageRespMultiError) AllErrors ¶
func (m SendMessageRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendMessageRespMultiError) Error ¶
func (m SendMessageRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendMessageRespValidationError ¶
type SendMessageRespValidationError struct {
// contains filtered or unexported fields
}
SendMessageRespValidationError is the validation error returned by SendMessageResp.Validate if the designated constraints aren't met.
func (SendMessageRespValidationError) Cause ¶
func (e SendMessageRespValidationError) Cause() error
Cause function returns cause value.
func (SendMessageRespValidationError) Error ¶
func (e SendMessageRespValidationError) Error() string
Error satisfies the builtin error interface
func (SendMessageRespValidationError) ErrorName ¶
func (e SendMessageRespValidationError) ErrorName() string
ErrorName returns error name.
func (SendMessageRespValidationError) Field ¶
func (e SendMessageRespValidationError) Field() string
Field function returns field value.
func (SendMessageRespValidationError) Key ¶
func (e SendMessageRespValidationError) Key() bool
Key function returns key value.
func (SendMessageRespValidationError) Reason ¶
func (e SendMessageRespValidationError) Reason() string
Reason function returns reason value.
type SendMessagerClient ¶
type SendMessagerClient interface { // SendMessage send message to one or multi users/channels SendMessage(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*SendMessageResp, error) // Broadcast send message to all online user Broadcast(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*SendMessageResp, error) }
SendMessagerClient is the client API for SendMessager 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 NewSendMessagerClient ¶
func NewSendMessagerClient(cc grpc.ClientConnInterface) SendMessagerClient
type SendMessagerServer ¶
type SendMessagerServer interface { // SendMessage send message to one or multi users/channels SendMessage(context.Context, *SendMessageReq) (*SendMessageResp, error) // Broadcast send message to all online user Broadcast(context.Context, *SendMessageReq) (*SendMessageResp, error) // contains filtered or unexported methods }
SendMessagerServer is the server API for SendMessager service. All implementations must embed UnimplementedSendMessagerServer for forward compatibility
type UnimplementedOfflineMessageServer ¶
type UnimplementedOfflineMessageServer struct { }
UnimplementedOfflineMessageServer must be embedded to have forward compatible implementations.
func (UnimplementedOfflineMessageServer) QueryOfflineMessage ¶
func (UnimplementedOfflineMessageServer) QueryOfflineMessage(context.Context, *QueryOfflineMessageReq) (*QueryOfflineMessageResp, error)
type UnimplementedPushMessagerServer ¶
type UnimplementedPushMessagerServer struct { }
UnimplementedPushMessagerServer must be embedded to have forward compatible implementations.
func (UnimplementedPushMessagerServer) PushMessage ¶
func (UnimplementedPushMessagerServer) PushMessage(context.Context, *PushMessageReq) (*response.BaseResponse, error)
type UnimplementedSendMessagerServer ¶
type UnimplementedSendMessagerServer struct { }
UnimplementedSendMessagerServer must be embedded to have forward compatible implementations.
func (UnimplementedSendMessagerServer) Broadcast ¶
func (UnimplementedSendMessagerServer) Broadcast(context.Context, *SendMessageReq) (*SendMessageResp, error)
func (UnimplementedSendMessagerServer) SendMessage ¶
func (UnimplementedSendMessagerServer) SendMessage(context.Context, *SendMessageReq) (*SendMessageResp, error)
type UnsafeOfflineMessageServer ¶
type UnsafeOfflineMessageServer interface {
// contains filtered or unexported methods
}
UnsafeOfflineMessageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OfflineMessageServer will result in compilation errors.
type UnsafePushMessagerServer ¶
type UnsafePushMessagerServer interface {
// contains filtered or unexported methods
}
UnsafePushMessagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PushMessagerServer will result in compilation errors.
type UnsafeSendMessagerServer ¶
type UnsafeSendMessagerServer interface {
// contains filtered or unexported methods
}
UnsafeSendMessagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SendMessagerServer will result in compilation errors.