v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const OperationTimelineGetGroupHistoryMessage = "/timeline.v1.Timeline/GetGroupHistoryMessage"
View Source
const OperationTimelineGetSingleHistoryMessage = "/timeline.v1.Timeline/GetSingleHistoryMessage"
View Source
const OperationTimelineGetSyncMessage = "/timeline.v1.Timeline/GetSyncMessage"
View Source
const OperationTimelineSend = "/timeline.v1.Timeline/Send"
View Source
const OperationTimelineSendGroup = "/timeline.v1.Timeline/SendGroup"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "GEETER_UNSPECIFIED",
		1: "USER_NOT_FOUND",
		2: "TIMELINE_INVALID_PARAM",
	}
	ErrorReason_value = map[string]int32{
		"GEETER_UNSPECIFIED":     0,
		"USER_NOT_FOUND":         1,
		"TIMELINE_INVALID_PARAM": 2,
	}
)

Enum value maps for ErrorReason.

View Source
var File_api_timeline_v1_error_reason_proto protoreflect.FileDescriptor
View Source
var File_api_timeline_v1_timeline_proto protoreflect.FileDescriptor
View Source
var Timeline_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "timeline.v1.Timeline",
	HandlerType: (*TimelineServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _Timeline_Send_Handler,
		},
		{
			MethodName: "SendGroup",
			Handler:    _Timeline_SendGroup_Handler,
		},
		{
			MethodName: "GetSyncMessage",
			Handler:    _Timeline_GetSyncMessage_Handler,
		},
		{
			MethodName: "GetSingleHistoryMessage",
			Handler:    _Timeline_GetSingleHistoryMessage_Handler,
		},
		{
			MethodName: "GetGroupHistoryMessage",
			Handler:    _Timeline_GetGroupHistoryMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/timeline/v1/timeline.proto",
}

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

Functions

func RegisterTimelineHTTPServer

func RegisterTimelineHTTPServer(s *http.Server, srv TimelineHTTPServer)

func RegisterTimelineServer

func RegisterTimelineServer(s grpc.ServiceRegistrar, srv TimelineServer)

Types

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_GEETER_UNSPECIFIED     ErrorReason = 0
	ErrorReason_USER_NOT_FOUND         ErrorReason = 1
	ErrorReason_TIMELINE_INVALID_PARAM ErrorReason = 2
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GetGroupHistoryMessageReply

type GetGroupHistoryMessageReply struct {
	EntrySet []*TimelineEntry `protobuf:"bytes,1,rep,name=entry_set,json=entrySet,proto3" json:"entry_set,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGroupHistoryMessageReply) Descriptor deprecated

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

Deprecated: Use GetGroupHistoryMessageReply.ProtoReflect.Descriptor instead.

func (*GetGroupHistoryMessageReply) GetEntrySet

func (x *GetGroupHistoryMessageReply) GetEntrySet() []*TimelineEntry

func (*GetGroupHistoryMessageReply) ProtoMessage

func (*GetGroupHistoryMessageReply) ProtoMessage()

func (*GetGroupHistoryMessageReply) ProtoReflect

func (*GetGroupHistoryMessageReply) Reset

func (x *GetGroupHistoryMessageReply) Reset()

func (*GetGroupHistoryMessageReply) String

func (x *GetGroupHistoryMessageReply) String() string

type GetGroupHistoryMessageRequest

type GetGroupHistoryMessageRequest struct {
	Group    string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	LastRead int64  `protobuf:"varint,3,opt,name=last_read,json=lastRead,proto3" json:"last_read,omitempty"`
	Count    int32  `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

查询群历史消息请求

func (*GetGroupHistoryMessageRequest) Descriptor deprecated

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

Deprecated: Use GetGroupHistoryMessageRequest.ProtoReflect.Descriptor instead.

func (*GetGroupHistoryMessageRequest) GetCount

func (x *GetGroupHistoryMessageRequest) GetCount() int32

func (*GetGroupHistoryMessageRequest) GetGroup

func (x *GetGroupHistoryMessageRequest) GetGroup() string

func (*GetGroupHistoryMessageRequest) GetLastRead

func (x *GetGroupHistoryMessageRequest) GetLastRead() int64

func (*GetGroupHistoryMessageRequest) ProtoMessage

func (*GetGroupHistoryMessageRequest) ProtoMessage()

func (*GetGroupHistoryMessageRequest) ProtoReflect

func (*GetGroupHistoryMessageRequest) Reset

func (x *GetGroupHistoryMessageRequest) Reset()

func (*GetGroupHistoryMessageRequest) String

type GetSingleHistoryMessageReply

type GetSingleHistoryMessageReply struct {
	EntrySet []*TimelineEntry `protobuf:"bytes,1,rep,name=entry_set,json=entrySet,proto3" json:"entry_set,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSingleHistoryMessageReply) Descriptor deprecated

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

Deprecated: Use GetSingleHistoryMessageReply.ProtoReflect.Descriptor instead.

func (*GetSingleHistoryMessageReply) GetEntrySet

func (x *GetSingleHistoryMessageReply) GetEntrySet() []*TimelineEntry

func (*GetSingleHistoryMessageReply) ProtoMessage

func (*GetSingleHistoryMessageReply) ProtoMessage()

func (*GetSingleHistoryMessageReply) ProtoReflect

func (*GetSingleHistoryMessageReply) Reset

func (x *GetSingleHistoryMessageReply) Reset()

func (*GetSingleHistoryMessageReply) String

type GetSingleHistoryMessageRequest

type GetSingleHistoryMessageRequest struct {
	From     string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To       string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	LastRead int64  `protobuf:"varint,3,opt,name=last_read,json=lastRead,proto3" json:"last_read,omitempty"`
	Count    int32  `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

查询单聊历史消息请求

func (*GetSingleHistoryMessageRequest) Descriptor deprecated

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

Deprecated: Use GetSingleHistoryMessageRequest.ProtoReflect.Descriptor instead.

func (*GetSingleHistoryMessageRequest) GetCount

func (x *GetSingleHistoryMessageRequest) GetCount() int32

func (*GetSingleHistoryMessageRequest) GetFrom

func (*GetSingleHistoryMessageRequest) GetLastRead

func (x *GetSingleHistoryMessageRequest) GetLastRead() int64

func (*GetSingleHistoryMessageRequest) GetTo

func (*GetSingleHistoryMessageRequest) ProtoMessage

func (*GetSingleHistoryMessageRequest) ProtoMessage()

func (*GetSingleHistoryMessageRequest) ProtoReflect

func (*GetSingleHistoryMessageRequest) Reset

func (x *GetSingleHistoryMessageRequest) Reset()

func (*GetSingleHistoryMessageRequest) String

type SendGroupReply

type SendGroupReply struct {
	FailedMembers []string `protobuf:"bytes,1,rep,name=failed_members,json=failedMembers,proto3" json:"failed_members,omitempty"`
	// contains filtered or unexported fields
}

func (*SendGroupReply) Descriptor deprecated

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

Deprecated: Use SendGroupReply.ProtoReflect.Descriptor instead.

func (*SendGroupReply) GetFailedMembers

func (x *SendGroupReply) GetFailedMembers() []string

func (*SendGroupReply) ProtoMessage

func (*SendGroupReply) ProtoMessage()

func (*SendGroupReply) ProtoReflect

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

func (*SendGroupReply) Reset

func (x *SendGroupReply) Reset()

func (*SendGroupReply) String

func (x *SendGroupReply) String() string

type SendGroupRequest

type SendGroupRequest struct {
	GroupName    string   `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"`
	GroupMembers []string `protobuf:"bytes,2,rep,name=group_members,json=groupMembers,proto3" json:"group_members,omitempty"`
	Message      string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

发送消息请求(c2g)

func (*SendGroupRequest) Descriptor deprecated

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

Deprecated: Use SendGroupRequest.ProtoReflect.Descriptor instead.

func (*SendGroupRequest) GetGroupMembers

func (x *SendGroupRequest) GetGroupMembers() []string

func (*SendGroupRequest) GetGroupName

func (x *SendGroupRequest) GetGroupName() string

func (*SendGroupRequest) GetMessage

func (x *SendGroupRequest) GetMessage() string

func (*SendGroupRequest) ProtoMessage

func (*SendGroupRequest) ProtoMessage()

func (*SendGroupRequest) ProtoReflect

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

func (*SendGroupRequest) Reset

func (x *SendGroupRequest) Reset()

func (*SendGroupRequest) String

func (x *SendGroupRequest) String() string

type SendMessageReply

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

func (*SendMessageReply) Descriptor deprecated

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

Deprecated: Use SendMessageReply.ProtoReflect.Descriptor instead.

func (*SendMessageReply) GetSequence

func (x *SendMessageReply) GetSequence() int64

func (*SendMessageReply) ProtoMessage

func (*SendMessageReply) ProtoMessage()

func (*SendMessageReply) ProtoReflect

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

func (*SendMessageReply) Reset

func (x *SendMessageReply) Reset()

func (*SendMessageReply) String

func (x *SendMessageReply) String() string

type SendMessageRequest

type SendMessageRequest struct {
	From    string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To      string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

发送消息请求(c2c)

func (*SendMessageRequest) Descriptor deprecated

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

Deprecated: Use SendMessageRequest.ProtoReflect.Descriptor instead.

func (*SendMessageRequest) GetFrom

func (x *SendMessageRequest) GetFrom() string

func (*SendMessageRequest) GetMessage

func (x *SendMessageRequest) GetMessage() string

func (*SendMessageRequest) GetTo

func (x *SendMessageRequest) GetTo() string

func (*SendMessageRequest) ProtoMessage

func (*SendMessageRequest) ProtoMessage()

func (*SendMessageRequest) ProtoReflect

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

func (*SendMessageRequest) Reset

func (x *SendMessageRequest) Reset()

func (*SendMessageRequest) String

func (x *SendMessageRequest) String() string

type SyncMessageReply

type SyncMessageReply struct {

	// 最新的消息序号
	LatestSeq int64 `protobuf:"varint,1,opt,name=latest_seq,json=latestSeq,proto3" json:"latest_seq,omitempty"`
	// entry_set 中最后的序号值
	EntrySetLastSeq int64 `protobuf:"varint,2,opt,name=entry_set_last_seq,json=entrySetLastSeq,proto3" json:"entry_set_last_seq,omitempty"`
	// 如果拉取到的结果为空,说明同步完成
	EntrySet []*TimelineEntry `protobuf:"bytes,3,rep,name=entry_set,json=entrySet,proto3" json:"entry_set,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncMessageReply) Descriptor deprecated

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

Deprecated: Use SyncMessageReply.ProtoReflect.Descriptor instead.

func (*SyncMessageReply) GetEntrySet

func (x *SyncMessageReply) GetEntrySet() []*TimelineEntry

func (*SyncMessageReply) GetEntrySetLastSeq

func (x *SyncMessageReply) GetEntrySetLastSeq() int64

func (*SyncMessageReply) GetLatestSeq

func (x *SyncMessageReply) GetLatestSeq() int64

func (*SyncMessageReply) ProtoMessage

func (*SyncMessageReply) ProtoMessage()

func (*SyncMessageReply) ProtoReflect

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

func (*SyncMessageReply) Reset

func (x *SyncMessageReply) Reset()

func (*SyncMessageReply) String

func (x *SyncMessageReply) String() string

type SyncMessageRequest

type SyncMessageRequest struct {
	Member   string `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"`
	LastRead int64  `protobuf:"varint,2,opt,name=last_read,json=lastRead,proto3" json:"last_read,omitempty"`
	Count    int32  `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

同步消息请求

func (*SyncMessageRequest) Descriptor deprecated

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

Deprecated: Use SyncMessageRequest.ProtoReflect.Descriptor instead.

func (*SyncMessageRequest) GetCount

func (x *SyncMessageRequest) GetCount() int32

func (*SyncMessageRequest) GetLastRead

func (x *SyncMessageRequest) GetLastRead() int64

func (*SyncMessageRequest) GetMember

func (x *SyncMessageRequest) GetMember() string

func (*SyncMessageRequest) ProtoMessage

func (*SyncMessageRequest) ProtoMessage()

func (*SyncMessageRequest) ProtoReflect

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

func (*SyncMessageRequest) Reset

func (x *SyncMessageRequest) Reset()

func (*SyncMessageRequest) String

func (x *SyncMessageRequest) String() string

type TimelineClient

type TimelineClient interface {
	// c2c 发送消息请求
	Send(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*SendMessageReply, error)
	// c2g 发送消息请求
	SendGroup(ctx context.Context, in *SendGroupRequest, opts ...grpc.CallOption) (*SendGroupReply, error)
	// 同步消息请求
	GetSyncMessage(ctx context.Context, in *SyncMessageRequest, opts ...grpc.CallOption) (*SyncMessageReply, error)
	// 查询单聊历史消息请求
	GetSingleHistoryMessage(ctx context.Context, in *GetSingleHistoryMessageRequest, opts ...grpc.CallOption) (*GetSingleHistoryMessageReply, error)
	// 查询群历史消息请求
	GetGroupHistoryMessage(ctx context.Context, in *GetGroupHistoryMessageRequest, opts ...grpc.CallOption) (*GetGroupHistoryMessageReply, error)
}

TimelineClient is the client API for Timeline 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 NewTimelineClient

func NewTimelineClient(cc grpc.ClientConnInterface) TimelineClient

type TimelineEntry

type TimelineEntry struct {
	Sequence int64  `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Message  string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*TimelineEntry) Descriptor deprecated

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

Deprecated: Use TimelineEntry.ProtoReflect.Descriptor instead.

func (*TimelineEntry) GetMessage

func (x *TimelineEntry) GetMessage() string

func (*TimelineEntry) GetSequence

func (x *TimelineEntry) GetSequence() int64

func (*TimelineEntry) ProtoMessage

func (*TimelineEntry) ProtoMessage()

func (*TimelineEntry) ProtoReflect

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

func (*TimelineEntry) Reset

func (x *TimelineEntry) Reset()

func (*TimelineEntry) String

func (x *TimelineEntry) String() string

type TimelineHTTPClient

type TimelineHTTPClient interface {
	GetGroupHistoryMessage(ctx context.Context, req *GetGroupHistoryMessageRequest, opts ...http.CallOption) (rsp *GetGroupHistoryMessageReply, err error)
	GetSingleHistoryMessage(ctx context.Context, req *GetSingleHistoryMessageRequest, opts ...http.CallOption) (rsp *GetSingleHistoryMessageReply, err error)
	GetSyncMessage(ctx context.Context, req *SyncMessageRequest, opts ...http.CallOption) (rsp *SyncMessageReply, err error)
	Send(ctx context.Context, req *SendMessageRequest, opts ...http.CallOption) (rsp *SendMessageReply, err error)
	SendGroup(ctx context.Context, req *SendGroupRequest, opts ...http.CallOption) (rsp *SendGroupReply, err error)
}

func NewTimelineHTTPClient

func NewTimelineHTTPClient(client *http.Client) TimelineHTTPClient

type TimelineHTTPClientImpl

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

func (*TimelineHTTPClientImpl) GetGroupHistoryMessage

func (*TimelineHTTPClientImpl) GetSingleHistoryMessage

func (*TimelineHTTPClientImpl) GetSyncMessage

func (*TimelineHTTPClientImpl) Send

func (*TimelineHTTPClientImpl) SendGroup

type TimelineServer

type TimelineServer interface {
	// c2c 发送消息请求
	Send(context.Context, *SendMessageRequest) (*SendMessageReply, error)
	// c2g 发送消息请求
	SendGroup(context.Context, *SendGroupRequest) (*SendGroupReply, error)
	// 同步消息请求
	GetSyncMessage(context.Context, *SyncMessageRequest) (*SyncMessageReply, error)
	// 查询单聊历史消息请求
	GetSingleHistoryMessage(context.Context, *GetSingleHistoryMessageRequest) (*GetSingleHistoryMessageReply, error)
	// 查询群历史消息请求
	GetGroupHistoryMessage(context.Context, *GetGroupHistoryMessageRequest) (*GetGroupHistoryMessageReply, error)
	// contains filtered or unexported methods
}

TimelineServer is the server API for Timeline service. All implementations must embed UnimplementedTimelineServer for forward compatibility

type UnimplementedTimelineServer

type UnimplementedTimelineServer struct {
}

UnimplementedTimelineServer must be embedded to have forward compatible implementations.

func (UnimplementedTimelineServer) GetSyncMessage

func (UnimplementedTimelineServer) Send

func (UnimplementedTimelineServer) SendGroup

type UnsafeTimelineServer

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

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

Jump to

Keyboard shortcuts

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