v1

package
v0.0.0-...-7d1b39b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageService_GetMessageList_FullMethodName = "/message.service.v1.messageService/GetMessageList"
	MessageService_MessageAction_FullMethodName  = "/message.service.v1.messageService/MessageAction"
)
View Source
const OperationMessageServiceGetMessageList = "/message.service.v1.messageService/GetMessageList"
View Source
const OperationMessageServiceMessageAction = "/message.service.v1.messageService/MessageAction"

Variables

View Source
var File_message_service_v1_message_proto protoreflect.FileDescriptor
View Source
var MessageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "message.service.v1.messageService",
	HandlerType: (*MessageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMessageList",
			Handler:    _MessageService_GetMessageList_Handler,
		},
		{
			MethodName: "MessageAction",
			Handler:    _MessageService_MessageAction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "message/service/v1/message.proto",
}

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

Functions

func RegisterMessageServiceHTTPServer

func RegisterMessageServiceHTTPServer(s *http.Server, srv MessageServiceHTTPServer)

func RegisterMessageServiceServer

func RegisterMessageServiceServer(s grpc.ServiceRegistrar, srv MessageServiceServer)

Types

type Message

type Message struct {

	// 消息id
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 该消息接收者的id
	ToUserId uint32 `protobuf:"varint,2,opt,name=to_user_id,proto3" json:"to_user_id,omitempty"`
	// 该消息发送者的id
	FromUserId uint32 `protobuf:"varint,3,opt,name=from_user_id,proto3" json:"from_user_id,omitempty"`
	// 消息内容
	Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	// 消息创建时间
	CreateTime int64 `protobuf:"varint,5,opt,name=create_time,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetCreateTime

func (x *Message) GetCreateTime() int64

func (*Message) GetFromUserId

func (x *Message) GetFromUserId() uint32

func (*Message) GetId

func (x *Message) GetId() uint64

func (*Message) GetToUserId

func (x *Message) GetToUserId() uint32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

func (*Message) Validate

func (m *Message) Validate() error

Validate checks the field values on Message 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 (*Message) ValidateAll

func (m *Message) ValidateAll() error

ValidateAll checks the field values on Message 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 MessageMultiError, or nil if none found.

type MessageActionReply

type MessageActionReply struct {

	// 状态码,0-成功,其他值-失败
	StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"`
	// 返回状态描述
	StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageActionReply) Descriptor deprecated

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

Deprecated: Use MessageActionReply.ProtoReflect.Descriptor instead.

func (*MessageActionReply) GetStatusCode

func (x *MessageActionReply) GetStatusCode() int32

func (*MessageActionReply) GetStatusMsg

func (x *MessageActionReply) GetStatusMsg() string

func (*MessageActionReply) ProtoMessage

func (*MessageActionReply) ProtoMessage()

func (*MessageActionReply) ProtoReflect

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

func (*MessageActionReply) Reset

func (x *MessageActionReply) Reset()

func (*MessageActionReply) String

func (x *MessageActionReply) String() string

func (*MessageActionReply) Validate

func (m *MessageActionReply) Validate() error

Validate checks the field values on MessageActionReply 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 (*MessageActionReply) ValidateAll

func (m *MessageActionReply) ValidateAll() error

ValidateAll checks the field values on MessageActionReply 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 MessageActionReplyMultiError, or nil if none found.

type MessageActionReplyMultiError

type MessageActionReplyMultiError []error

MessageActionReplyMultiError is an error wrapping multiple validation errors returned by MessageActionReply.ValidateAll() if the designated constraints aren't met.

func (MessageActionReplyMultiError) AllErrors

func (m MessageActionReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MessageActionReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MessageActionReplyValidationError

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

MessageActionReplyValidationError is the validation error returned by MessageActionReply.Validate if the designated constraints aren't met.

func (MessageActionReplyValidationError) Cause

Cause function returns cause value.

func (MessageActionReplyValidationError) Error

Error satisfies the builtin error interface

func (MessageActionReplyValidationError) ErrorName

ErrorName returns error name.

func (MessageActionReplyValidationError) Field

Field function returns field value.

func (MessageActionReplyValidationError) Key

Key function returns key value.

func (MessageActionReplyValidationError) Reason

Reason function returns reason value.

type MessageActionRequest

type MessageActionRequest struct {

	// 用户鉴权token
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// 对方用户id
	ToUserId uint32 `protobuf:"varint,2,opt,name=to_user_id,json=toUserId,proto3" json:"to_user_id,omitempty"`
	// 1-发送消息
	ActionType uint32 `protobuf:"varint,3,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
	// 消息内容
	Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageActionRequest) Descriptor deprecated

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

Deprecated: Use MessageActionRequest.ProtoReflect.Descriptor instead.

func (*MessageActionRequest) GetActionType

func (x *MessageActionRequest) GetActionType() uint32

func (*MessageActionRequest) GetContent

func (x *MessageActionRequest) GetContent() string

func (*MessageActionRequest) GetToUserId

func (x *MessageActionRequest) GetToUserId() uint32

func (*MessageActionRequest) GetToken

func (x *MessageActionRequest) GetToken() string

func (*MessageActionRequest) ProtoMessage

func (*MessageActionRequest) ProtoMessage()

func (*MessageActionRequest) ProtoReflect

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

func (*MessageActionRequest) Reset

func (x *MessageActionRequest) Reset()

func (*MessageActionRequest) String

func (x *MessageActionRequest) String() string

func (*MessageActionRequest) Validate

func (m *MessageActionRequest) Validate() error

Validate checks the field values on MessageActionRequest 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 (*MessageActionRequest) ValidateAll

func (m *MessageActionRequest) ValidateAll() error

ValidateAll checks the field values on MessageActionRequest 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 MessageActionRequestMultiError, or nil if none found.

type MessageActionRequestMultiError

type MessageActionRequestMultiError []error

MessageActionRequestMultiError is an error wrapping multiple validation errors returned by MessageActionRequest.ValidateAll() if the designated constraints aren't met.

func (MessageActionRequestMultiError) AllErrors

func (m MessageActionRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MessageActionRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MessageActionRequestValidationError

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

MessageActionRequestValidationError is the validation error returned by MessageActionRequest.Validate if the designated constraints aren't met.

func (MessageActionRequestValidationError) Cause

Cause function returns cause value.

func (MessageActionRequestValidationError) Error

Error satisfies the builtin error interface

func (MessageActionRequestValidationError) ErrorName

ErrorName returns error name.

func (MessageActionRequestValidationError) Field

Field function returns field value.

func (MessageActionRequestValidationError) Key

Key function returns key value.

func (MessageActionRequestValidationError) Reason

Reason function returns reason value.

type MessageListReply

type MessageListReply struct {

	// 状态码,0-成功,其他值-失败
	StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"`
	// 返回状态描述
	StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"`
	// 消息列表
	MessageList []*Message `protobuf:"bytes,3,rep,name=message_list,proto3" json:"message_list,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageListReply) Descriptor deprecated

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

Deprecated: Use MessageListReply.ProtoReflect.Descriptor instead.

func (*MessageListReply) GetMessageList

func (x *MessageListReply) GetMessageList() []*Message

func (*MessageListReply) GetStatusCode

func (x *MessageListReply) GetStatusCode() int32

func (*MessageListReply) GetStatusMsg

func (x *MessageListReply) GetStatusMsg() string

func (*MessageListReply) ProtoMessage

func (*MessageListReply) ProtoMessage()

func (*MessageListReply) ProtoReflect

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

func (*MessageListReply) Reset

func (x *MessageListReply) Reset()

func (*MessageListReply) String

func (x *MessageListReply) String() string

func (*MessageListReply) Validate

func (m *MessageListReply) Validate() error

Validate checks the field values on MessageListReply 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 (*MessageListReply) ValidateAll

func (m *MessageListReply) ValidateAll() error

ValidateAll checks the field values on MessageListReply 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 MessageListReplyMultiError, or nil if none found.

type MessageListReplyMultiError

type MessageListReplyMultiError []error

MessageListReplyMultiError is an error wrapping multiple validation errors returned by MessageListReply.ValidateAll() if the designated constraints aren't met.

func (MessageListReplyMultiError) AllErrors

func (m MessageListReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MessageListReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MessageListReplyValidationError

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

MessageListReplyValidationError is the validation error returned by MessageListReply.Validate if the designated constraints aren't met.

func (MessageListReplyValidationError) Cause

Cause function returns cause value.

func (MessageListReplyValidationError) Error

Error satisfies the builtin error interface

func (MessageListReplyValidationError) ErrorName

ErrorName returns error name.

func (MessageListReplyValidationError) Field

Field function returns field value.

func (MessageListReplyValidationError) Key

Key function returns key value.

func (MessageListReplyValidationError) Reason

Reason function returns reason value.

type MessageListRequest

type MessageListRequest struct {

	// 用户鉴权token
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// 对方用户id
	ToUserId uint32 `protobuf:"varint,2,opt,name=to_user_id,json=toUserId,proto3" json:"to_user_id,omitempty"`
	//上次最新消息的时间
	PreMsgTime int64 `protobuf:"varint,3,opt,name=pre_msg_time,json=preMsgTime,proto3" json:"pre_msg_time,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageListRequest) Descriptor deprecated

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

Deprecated: Use MessageListRequest.ProtoReflect.Descriptor instead.

func (*MessageListRequest) GetPreMsgTime

func (x *MessageListRequest) GetPreMsgTime() int64

func (*MessageListRequest) GetToUserId

func (x *MessageListRequest) GetToUserId() uint32

func (*MessageListRequest) GetToken

func (x *MessageListRequest) GetToken() string

func (*MessageListRequest) ProtoMessage

func (*MessageListRequest) ProtoMessage()

func (*MessageListRequest) ProtoReflect

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

func (*MessageListRequest) Reset

func (x *MessageListRequest) Reset()

func (*MessageListRequest) String

func (x *MessageListRequest) String() string

func (*MessageListRequest) Validate

func (m *MessageListRequest) Validate() error

Validate checks the field values on MessageListRequest 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 (*MessageListRequest) ValidateAll

func (m *MessageListRequest) ValidateAll() error

ValidateAll checks the field values on MessageListRequest 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 MessageListRequestMultiError, or nil if none found.

type MessageListRequestMultiError

type MessageListRequestMultiError []error

MessageListRequestMultiError is an error wrapping multiple validation errors returned by MessageListRequest.ValidateAll() if the designated constraints aren't met.

func (MessageListRequestMultiError) AllErrors

func (m MessageListRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MessageListRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type MessageListRequestValidationError

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

MessageListRequestValidationError is the validation error returned by MessageListRequest.Validate if the designated constraints aren't met.

func (MessageListRequestValidationError) Cause

Cause function returns cause value.

func (MessageListRequestValidationError) Error

Error satisfies the builtin error interface

func (MessageListRequestValidationError) ErrorName

ErrorName returns error name.

func (MessageListRequestValidationError) Field

Field function returns field value.

func (MessageListRequestValidationError) Key

Key function returns key value.

func (MessageListRequestValidationError) Reason

Reason function returns reason value.

type MessageMultiError

type MessageMultiError []error

MessageMultiError is an error wrapping multiple validation errors returned by Message.ValidateAll() if the designated constraints aren't met.

func (MessageMultiError) AllErrors

func (m MessageMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MessageMultiError) Error

func (m MessageMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MessageServiceClient

type MessageServiceClient interface {
	GetMessageList(ctx context.Context, in *MessageListRequest, opts ...grpc.CallOption) (*MessageListReply, error)
	MessageAction(ctx context.Context, in *MessageActionRequest, opts ...grpc.CallOption) (*MessageActionReply, error)
}

MessageServiceClient is the client API for MessageService 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 MessageServiceHTTPClient

type MessageServiceHTTPClient interface {
	GetMessageList(ctx context.Context, req *MessageListRequest, opts ...http.CallOption) (rsp *MessageListReply, err error)
	MessageAction(ctx context.Context, req *MessageActionRequest, opts ...http.CallOption) (rsp *MessageActionReply, err error)
}

func NewMessageServiceHTTPClient

func NewMessageServiceHTTPClient(client *http.Client) MessageServiceHTTPClient

type MessageServiceHTTPClientImpl

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

func (*MessageServiceHTTPClientImpl) GetMessageList

func (*MessageServiceHTTPClientImpl) MessageAction

type MessageServiceHTTPServer

type MessageServiceHTTPServer interface {
	GetMessageList(context.Context, *MessageListRequest) (*MessageListReply, error)
	MessageAction(context.Context, *MessageActionRequest) (*MessageActionReply, error)
}

type MessageServiceServer

type MessageServiceServer interface {
	GetMessageList(context.Context, *MessageListRequest) (*MessageListReply, error)
	MessageAction(context.Context, *MessageActionRequest) (*MessageActionReply, error)
	// contains filtered or unexported methods
}

MessageServiceServer is the server API for MessageService service. All implementations must embed UnimplementedMessageServiceServer for forward compatibility

type MessageValidationError

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

MessageValidationError is the validation error returned by Message.Validate if the designated constraints aren't met.

func (MessageValidationError) Cause

func (e MessageValidationError) Cause() error

Cause function returns cause value.

func (MessageValidationError) Error

func (e MessageValidationError) Error() string

Error satisfies the builtin error interface

func (MessageValidationError) ErrorName

func (e MessageValidationError) ErrorName() string

ErrorName returns error name.

func (MessageValidationError) Field

func (e MessageValidationError) Field() string

Field function returns field value.

func (MessageValidationError) Key

func (e MessageValidationError) Key() bool

Key function returns key value.

func (MessageValidationError) Reason

func (e MessageValidationError) Reason() string

Reason function returns reason value.

type UnimplementedMessageServiceServer

type UnimplementedMessageServiceServer struct {
}

UnimplementedMessageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMessageServiceServer) GetMessageList

func (UnimplementedMessageServiceServer) MessageAction

type UnsafeMessageServiceServer

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

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

Jump to

Keyboard shortcuts

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