v1

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 22 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
var File_message_v1_message_proto protoreflect.FileDescriptor
View Source
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)

View Source
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)

View Source
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

Cause function returns cause value.

func (BriefMessageValidationError) Error

Error satisfies the builtin error interface

func (BriefMessageValidationError) ErrorName

func (e BriefMessageValidationError) ErrorName() string

ErrorName returns error name.

func (BriefMessageValidationError) Field

Field function returns field value.

func (BriefMessageValidationError) Key

Key function returns key value.

func (BriefMessageValidationError) Reason

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) Enum

func (MessageContentType) EnumDescriptor deprecated

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

Deprecated: Use MessageContentType.Descriptor instead.

func (MessageContentType) Number

func (MessageContentType) String

func (x MessageContentType) String() string

func (MessageContentType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use MqMessage.ProtoReflect.Descriptor instead.

func (*MqMessage) GetContent

func (x *MqMessage) GetContent() string

func (*MqMessage) GetContentType

func (x *MqMessage) GetContentType() MessageContentType

func (*MqMessage) GetFromUser

func (x *MqMessage) GetFromUser() string

func (*MqMessage) GetPushMessageType

func (x *MqMessage) GetPushMessageType() PushMessageType

func (*MqMessage) GetSessionId added in v0.0.3

func (x *MqMessage) GetSessionId() int64

func (*MqMessage) GetToUser

func (x *MqMessage) GetToUser() string

func (*MqMessage) ProtoMessage

func (*MqMessage) ProtoMessage()

func (*MqMessage) ProtoReflect

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

func (*MqMessage) Reset

func (x *MqMessage) Reset()

func (*MqMessage) String

func (x *MqMessage) String() string

func (*MqMessage) Validate

func (m *MqMessage) Validate() error

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

func (m *MqMessage) ValidateAll() error

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

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.

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

Cause function returns cause value.

func (PushMessageReqValidationError) Error

Error satisfies the builtin error interface

func (PushMessageReqValidationError) ErrorName

func (e PushMessageReqValidationError) ErrorName() string

ErrorName returns error name.

func (PushMessageReqValidationError) Field

Field function returns field value.

func (PushMessageReqValidationError) Key

Key function returns key value.

func (PushMessageReqValidationError) Reason

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) Enum

func (x PushMessageType) Enum() *PushMessageType

func (PushMessageType) EnumDescriptor deprecated

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

Deprecated: Use PushMessageType.Descriptor instead.

func (PushMessageType) Number

func (PushMessageType) String

func (x PushMessageType) String() string

func (PushMessageType) Type

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.

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

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

Cause function returns cause value.

func (QueryOfflineMessageReqValidationError) Error

Error satisfies the builtin error interface

func (QueryOfflineMessageReqValidationError) ErrorName

ErrorName returns error name.

func (QueryOfflineMessageReqValidationError) Field

Field function returns field value.

func (QueryOfflineMessageReqValidationError) Key

Key function returns key value.

func (QueryOfflineMessageReqValidationError) Reason

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

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

Cause function returns cause value.

func (QueryOfflineMessageRespValidationError) Error

Error satisfies the builtin error interface

func (QueryOfflineMessageRespValidationError) ErrorName

ErrorName returns error name.

func (QueryOfflineMessageRespValidationError) Field

Field function returns field value.

func (QueryOfflineMessageRespValidationError) Key

Key function returns key value.

func (QueryOfflineMessageRespValidationError) Reason

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

Cause function returns cause value.

func (SendMessageReqValidationError) Error

Error satisfies the builtin error interface

func (SendMessageReqValidationError) ErrorName

func (e SendMessageReqValidationError) ErrorName() string

ErrorName returns error name.

func (SendMessageReqValidationError) Field

Field function returns field value.

func (SendMessageReqValidationError) Key

Key function returns key value.

func (SendMessageReqValidationError) Reason

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

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

Cause function returns cause value.

func (SendMessageRespValidationError) Error

Error satisfies the builtin error interface

func (SendMessageRespValidationError) ErrorName

func (e SendMessageRespValidationError) ErrorName() string

ErrorName returns error name.

func (SendMessageRespValidationError) Field

Field function returns field value.

func (SendMessageRespValidationError) Key

Key function returns key value.

func (SendMessageRespValidationError) Reason

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.

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

type UnimplementedPushMessagerServer

type UnimplementedPushMessagerServer struct {
}

UnimplementedPushMessagerServer must be embedded to have forward compatible implementations.

func (UnimplementedPushMessagerServer) PushMessage

type UnimplementedSendMessagerServer

type UnimplementedSendMessagerServer struct {
}

UnimplementedSendMessagerServer must be embedded to have forward compatible implementations.

func (UnimplementedSendMessagerServer) Broadcast

func (UnimplementedSendMessagerServer) SendMessage

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.

Jump to

Keyboard shortcuts

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