store

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dtalk.store.Store",
	HandlerType: (*StoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DelRecord",
			Handler:    _Store_DelRecord_Handler,
		},
		{
			MethodName: "GetRecord",
			Handler:    _Store_GetRecord_Handler,
		},
		{
			MethodName: "AddRecordFocus",
			Handler:    _Store_AddRecordFocus_Handler,
		},
		{
			MethodName: "GetRecordsAfterMid",
			Handler:    _Store_GetRecordsAfterMid_Handler,
		},
		{
			MethodName: "GetSyncRecordsAfterMid",
			Handler:    _Store_GetSyncRecordsAfterMid_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api.proto",
}

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

Functions

func RegisterStoreServer

func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer)

Types

type AddRecordFocusReply

type AddRecordFocusReply struct {
	CurrentNum int32 `protobuf:"varint,1,opt,name=currentNum,proto3" json:"currentNum,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRecordFocusReply) Descriptor deprecated

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

Deprecated: Use AddRecordFocusReply.ProtoReflect.Descriptor instead.

func (*AddRecordFocusReply) GetCurrentNum

func (x *AddRecordFocusReply) GetCurrentNum() int32

func (*AddRecordFocusReply) ProtoMessage

func (*AddRecordFocusReply) ProtoMessage()

func (*AddRecordFocusReply) ProtoReflect

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

func (*AddRecordFocusReply) Reset

func (x *AddRecordFocusReply) Reset()

func (*AddRecordFocusReply) String

func (x *AddRecordFocusReply) String() string

type AddRecordFocusReq

type AddRecordFocusReq struct {
	Uid  string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Mid  int64  `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty"`
	Time uint64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRecordFocusReq) Descriptor deprecated

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

Deprecated: Use AddRecordFocusReq.ProtoReflect.Descriptor instead.

func (*AddRecordFocusReq) GetMid

func (x *AddRecordFocusReq) GetMid() int64

func (*AddRecordFocusReq) GetTime

func (x *AddRecordFocusReq) GetTime() uint64

func (*AddRecordFocusReq) GetUid

func (x *AddRecordFocusReq) GetUid() string

func (*AddRecordFocusReq) ProtoMessage

func (*AddRecordFocusReq) ProtoMessage()

func (*AddRecordFocusReq) ProtoReflect

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

func (*AddRecordFocusReq) Reset

func (x *AddRecordFocusReq) Reset()

func (*AddRecordFocusReq) String

func (x *AddRecordFocusReq) String() string

type Client

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

func New

func New(etcdAddr, schema, srvName string, dial time.Duration) *Client

func (*Client) AddRecordFocus

func (c *Client) AddRecordFocus(ctx context.Context, uid string, mid int64, time uint64) (int32, error)

func (*Client) DelRecord

func (c *Client) DelRecord(ctx context.Context, tp xproto.Channel, mid int64) error

func (*Client) GetRecord

func (c *Client) GetRecord(ctx context.Context, tp xproto.Channel, mid int64) (*model.MsgContent, error)

func (*Client) GetRecordsAfterMid

func (c *Client) GetRecordsAfterMid(ctx context.Context, req *GetRecordsAfterMidReq) (*GetRecordsAfterMidReply, error)

func (*Client) GetSyncRecordsAfterMid

func (c *Client) GetSyncRecordsAfterMid(ctx context.Context, req *GetSyncRecordsAfterMidReq) (*GetSyncRecordsAfterMidReply, error)

type DelRecordReply

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

func (*DelRecordReply) Descriptor deprecated

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

Deprecated: Use DelRecordReply.ProtoReflect.Descriptor instead.

func (*DelRecordReply) ProtoMessage

func (*DelRecordReply) ProtoMessage()

func (*DelRecordReply) ProtoReflect

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

func (*DelRecordReply) Reset

func (x *DelRecordReply) Reset()

func (*DelRecordReply) String

func (x *DelRecordReply) String() string

type DelRecordReq

type DelRecordReq struct {
	Tp  proto.Channel `protobuf:"varint,1,opt,name=tp,proto3,enum=imparse.v1.Channel" json:"tp,omitempty"`
	Mid int64         `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty"`
	// contains filtered or unexported fields
}

func (*DelRecordReq) Descriptor deprecated

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

Deprecated: Use DelRecordReq.ProtoReflect.Descriptor instead.

func (*DelRecordReq) GetMid

func (x *DelRecordReq) GetMid() int64

func (*DelRecordReq) GetTp

func (x *DelRecordReq) GetTp() proto.Channel

func (*DelRecordReq) ProtoMessage

func (*DelRecordReq) ProtoMessage()

func (*DelRecordReq) ProtoReflect

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

func (*DelRecordReq) Reset

func (x *DelRecordReq) Reset()

func (*DelRecordReq) String

func (x *DelRecordReq) String() string

type GetRecordReply

type GetRecordReply struct {
	Mid        string `protobuf:"bytes,1,opt,name=mid,proto3" json:"mid,omitempty"`
	Seq        string `protobuf:"bytes,2,opt,name=seq,proto3" json:"seq,omitempty"`
	SenderId   string `protobuf:"bytes,3,opt,name=senderId,proto3" json:"senderId,omitempty"`
	ReceiverId string `protobuf:"bytes,4,opt,name=receiverId,proto3" json:"receiverId,omitempty"`
	MsgType    uint32 `protobuf:"varint,5,opt,name=msgType,proto3" json:"msgType,omitempty"`
	Content    string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"`
	CreateTime uint64 `protobuf:"varint,7,opt,name=createTime,proto3" json:"createTime,omitempty"`
	Source     string `protobuf:"bytes,8,opt,name=source,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordReply) Descriptor deprecated

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

Deprecated: Use GetRecordReply.ProtoReflect.Descriptor instead.

func (*GetRecordReply) GetContent

func (x *GetRecordReply) GetContent() string

func (*GetRecordReply) GetCreateTime

func (x *GetRecordReply) GetCreateTime() uint64

func (*GetRecordReply) GetMid

func (x *GetRecordReply) GetMid() string

func (*GetRecordReply) GetMsgType

func (x *GetRecordReply) GetMsgType() uint32

func (*GetRecordReply) GetReceiverId

func (x *GetRecordReply) GetReceiverId() string

func (*GetRecordReply) GetSenderId

func (x *GetRecordReply) GetSenderId() string

func (*GetRecordReply) GetSeq

func (x *GetRecordReply) GetSeq() string

func (*GetRecordReply) GetSource

func (x *GetRecordReply) GetSource() string

func (*GetRecordReply) ProtoMessage

func (*GetRecordReply) ProtoMessage()

func (*GetRecordReply) ProtoReflect

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

func (*GetRecordReply) Reset

func (x *GetRecordReply) Reset()

func (*GetRecordReply) String

func (x *GetRecordReply) String() string

type GetRecordReq

type GetRecordReq struct {
	Tp  proto.Channel `protobuf:"varint,1,opt,name=tp,proto3,enum=imparse.v1.Channel" json:"tp,omitempty"`
	Mid int64         `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordReq) Descriptor deprecated

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

Deprecated: Use GetRecordReq.ProtoReflect.Descriptor instead.

func (*GetRecordReq) GetMid

func (x *GetRecordReq) GetMid() int64

func (*GetRecordReq) GetTp

func (x *GetRecordReq) GetTp() proto.Channel

func (*GetRecordReq) ProtoMessage

func (*GetRecordReq) ProtoMessage()

func (*GetRecordReq) ProtoReflect

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

func (*GetRecordReq) Reset

func (x *GetRecordReq) Reset()

func (*GetRecordReq) String

func (x *GetRecordReq) String() string

type GetRecordsAfterMidReply

type GetRecordsAfterMidReply struct {
	Records []*GetRecordReply `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordsAfterMidReply) Descriptor deprecated

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

Deprecated: Use GetRecordsAfterMidReply.ProtoReflect.Descriptor instead.

func (*GetRecordsAfterMidReply) GetRecords

func (x *GetRecordsAfterMidReply) GetRecords() []*GetRecordReply

func (*GetRecordsAfterMidReply) ProtoMessage

func (*GetRecordsAfterMidReply) ProtoMessage()

func (*GetRecordsAfterMidReply) ProtoReflect

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

func (*GetRecordsAfterMidReply) Reset

func (x *GetRecordsAfterMidReply) Reset()

func (*GetRecordsAfterMidReply) String

func (x *GetRecordsAfterMidReply) String() string

type GetRecordsAfterMidReq

type GetRecordsAfterMidReq struct {
	Tp     proto.Channel `protobuf:"varint,1,opt,name=tp,proto3,enum=imparse.v1.Channel" json:"tp,omitempty"`
	Mid    int64         `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty"`
	From   string        `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
	Target string        `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"`
	Count  int64         `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecordsAfterMidReq) Descriptor deprecated

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

Deprecated: Use GetRecordsAfterMidReq.ProtoReflect.Descriptor instead.

func (*GetRecordsAfterMidReq) GetCount

func (x *GetRecordsAfterMidReq) GetCount() int64

func (*GetRecordsAfterMidReq) GetFrom

func (x *GetRecordsAfterMidReq) GetFrom() string

func (*GetRecordsAfterMidReq) GetMid

func (x *GetRecordsAfterMidReq) GetMid() int64

func (*GetRecordsAfterMidReq) GetTarget

func (x *GetRecordsAfterMidReq) GetTarget() string

func (*GetRecordsAfterMidReq) GetTp

func (x *GetRecordsAfterMidReq) GetTp() proto.Channel

func (*GetRecordsAfterMidReq) ProtoMessage

func (*GetRecordsAfterMidReq) ProtoMessage()

func (*GetRecordsAfterMidReq) ProtoReflect

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

func (*GetRecordsAfterMidReq) Reset

func (x *GetRecordsAfterMidReq) Reset()

func (*GetRecordsAfterMidReq) String

func (x *GetRecordsAfterMidReq) String() string

type GetSyncRecordsAfterMidReply

type GetSyncRecordsAfterMidReply struct {
	Records [][]byte `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSyncRecordsAfterMidReply) Descriptor deprecated

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

Deprecated: Use GetSyncRecordsAfterMidReply.ProtoReflect.Descriptor instead.

func (*GetSyncRecordsAfterMidReply) GetRecords

func (x *GetSyncRecordsAfterMidReply) GetRecords() [][]byte

func (*GetSyncRecordsAfterMidReply) ProtoMessage

func (*GetSyncRecordsAfterMidReply) ProtoMessage()

func (*GetSyncRecordsAfterMidReply) ProtoReflect

func (*GetSyncRecordsAfterMidReply) Reset

func (x *GetSyncRecordsAfterMidReply) Reset()

func (*GetSyncRecordsAfterMidReply) String

func (x *GetSyncRecordsAfterMidReply) String() string

type GetSyncRecordsAfterMidReq

type GetSyncRecordsAfterMidReq struct {
	Mid   int64  `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"`
	Uid   string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Count int64  `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSyncRecordsAfterMidReq) Descriptor deprecated

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

Deprecated: Use GetSyncRecordsAfterMidReq.ProtoReflect.Descriptor instead.

func (*GetSyncRecordsAfterMidReq) GetCount

func (x *GetSyncRecordsAfterMidReq) GetCount() int64

func (*GetSyncRecordsAfterMidReq) GetMid

func (x *GetSyncRecordsAfterMidReq) GetMid() int64

func (*GetSyncRecordsAfterMidReq) GetUid

func (x *GetSyncRecordsAfterMidReq) GetUid() string

func (*GetSyncRecordsAfterMidReq) ProtoMessage

func (*GetSyncRecordsAfterMidReq) ProtoMessage()

func (*GetSyncRecordsAfterMidReq) ProtoReflect

func (*GetSyncRecordsAfterMidReq) Reset

func (x *GetSyncRecordsAfterMidReq) Reset()

func (*GetSyncRecordsAfterMidReq) String

func (x *GetSyncRecordsAfterMidReq) String() string

type StoreClient

type StoreClient interface {
	DelRecord(ctx context.Context, in *DelRecordReq, opts ...grpc.CallOption) (*DelRecordReply, error)
	GetRecord(ctx context.Context, in *GetRecordReq, opts ...grpc.CallOption) (*GetRecordReply, error)
	AddRecordFocus(ctx context.Context, in *AddRecordFocusReq, opts ...grpc.CallOption) (*AddRecordFocusReply, error)
	GetRecordsAfterMid(ctx context.Context, in *GetRecordsAfterMidReq, opts ...grpc.CallOption) (*GetRecordsAfterMidReply, error)
	GetSyncRecordsAfterMid(ctx context.Context, in *GetSyncRecordsAfterMidReq, opts ...grpc.CallOption) (*GetSyncRecordsAfterMidReply, error)
}

StoreClient is the client API for Store 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 NewStoreClient

func NewStoreClient(cc grpc.ClientConnInterface) StoreClient

type StoreServer

type StoreServer interface {
	DelRecord(context.Context, *DelRecordReq) (*DelRecordReply, error)
	GetRecord(context.Context, *GetRecordReq) (*GetRecordReply, error)
	AddRecordFocus(context.Context, *AddRecordFocusReq) (*AddRecordFocusReply, error)
	GetRecordsAfterMid(context.Context, *GetRecordsAfterMidReq) (*GetRecordsAfterMidReply, error)
	GetSyncRecordsAfterMid(context.Context, *GetSyncRecordsAfterMidReq) (*GetSyncRecordsAfterMidReply, error)
	// contains filtered or unexported methods
}

StoreServer is the server API for Store service. All implementations must embed UnimplementedStoreServer for forward compatibility

type UnimplementedStoreServer

type UnimplementedStoreServer struct {
}

UnimplementedStoreServer must be embedded to have forward compatible implementations.

func (UnimplementedStoreServer) AddRecordFocus

func (UnimplementedStoreServer) DelRecord

func (UnimplementedStoreServer) GetRecord

func (UnimplementedStoreServer) GetRecordsAfterMid

type UnsafeStoreServer

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

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

Jump to

Keyboard shortcuts

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