Documentation
¶
Index ¶
- Variables
- func New(i *common.Inject) (s *grpc.Server, err error)
- func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)
- type API
- func (x *API) Create(ctx context.Context, req *CreateRequest) (_ *empty.Empty, err error)
- func (x *API) Delete(ctx context.Context, req *DeleteRequest) (_ *empty.Empty, err error)
- func (x *API) Get(ctx context.Context, _ *empty.Empty) (rep *GetReply, err error)
- func (x *API) Info(ctx context.Context, req *InfoRequest) (rep *InfoReply, err error)
- func (x *API) Publish(ctx context.Context, req *PublishRequest) (_ *empty.Empty, err error)
- func (x *API) Update(ctx context.Context, req *UpdateRequest) (_ *empty.Empty, err error)
- type APIClient
- type APIServer
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetDescription() string
- func (x *CreateRequest) GetKey() string
- func (x *CreateRequest) GetTopic() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type DeleteRequest
- type GetReply
- type InfoReply
- type InfoRequest
- type InfoState
- func (*InfoState) Descriptor() ([]byte, []int)deprecated
- func (x *InfoState) GetBytes() uint64
- func (x *InfoState) GetConsumerCount() int64
- func (x *InfoState) GetFirstSeq() uint64
- func (x *InfoState) GetFirstTime() int64
- func (x *InfoState) GetLastSeq() uint64
- func (x *InfoState) GetLastTime() int64
- func (x *InfoState) GetMessages() uint64
- func (*InfoState) ProtoMessage()
- func (x *InfoState) ProtoReflect() protoreflect.Message
- func (x *InfoState) Reset()
- func (x *InfoState) String() string
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishRequest) GetPayload() []byte
- func (x *PublishRequest) GetTopic() string
- func (*PublishRequest) ProtoMessage()
- func (x *PublishRequest) ProtoReflect() protoreflect.Message
- func (x *PublishRequest) Reset()
- func (x *PublishRequest) String() string
- type Transfer
- func (*Transfer) Descriptor() ([]byte, []int)deprecated
- func (x *Transfer) GetDescription() string
- func (x *Transfer) GetKey() string
- func (x *Transfer) GetTopic() string
- func (*Transfer) ProtoMessage()
- func (x *Transfer) ProtoReflect() protoreflect.Message
- func (x *Transfer) Reset()
- func (x *Transfer) String() string
- type UnimplementedAPIServer
- func (UnimplementedAPIServer) Create(context.Context, *CreateRequest) (*emptypb.Empty, error)
- func (UnimplementedAPIServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedAPIServer) Get(context.Context, *emptypb.Empty) (*GetReply, error)
- func (UnimplementedAPIServer) Info(context.Context, *InfoRequest) (*InfoReply, error)
- func (UnimplementedAPIServer) Publish(context.Context, *PublishRequest) (*emptypb.Empty, error)
- func (UnimplementedAPIServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
- type UnsafeAPIServer
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetDescription() string
- func (x *UpdateRequest) GetKey() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var API_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transfer.API", HandlerType: (*APIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _API_Get_Handler, }, { MethodName: "Create", Handler: _API_Create_Handler, }, { MethodName: "Update", Handler: _API_Update_Handler, }, { MethodName: "Delete", Handler: _API_Delete_Handler, }, { MethodName: "Info", Handler: _API_Info_Handler, }, { MethodName: "Publish", Handler: _API_Publish_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "transfer.proto", }
API_ServiceDesc is the grpc.ServiceDesc for API service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_transfer_proto protoreflect.FileDescriptor
var Provides = wire.NewSet(New)
Functions ¶
func RegisterAPIServer ¶
func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)
Types ¶
type API ¶
type API struct {
UnimplementedAPIServer
*common.Inject
}
type APIClient ¶
type APIClient interface {
Get(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetReply, error)
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoReply, error)
Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
APIClient is the client API for API 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 NewAPIClient ¶
func NewAPIClient(cc grpc.ClientConnInterface) APIClient
type APIServer ¶
type APIServer interface {
Get(context.Context, *emptypb.Empty) (*GetReply, error)
Create(context.Context, *CreateRequest) (*emptypb.Empty, error)
Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
Info(context.Context, *InfoRequest) (*InfoReply, error)
Publish(context.Context, *PublishRequest) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility
type CreateRequest ¶ added in v1.1.1
type CreateRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
func (*CreateRequest) Descriptor
deprecated
added in
v1.1.1
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetDescription ¶ added in v1.1.1
func (x *CreateRequest) GetDescription() string
func (*CreateRequest) GetKey ¶ added in v1.1.1
func (x *CreateRequest) GetKey() string
func (*CreateRequest) GetTopic ¶ added in v1.1.1
func (x *CreateRequest) GetTopic() string
func (*CreateRequest) ProtoMessage ¶ added in v1.1.1
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶ added in v1.1.1
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶ added in v1.1.1
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶ added in v1.1.1
func (x *CreateRequest) String() string
type DeleteRequest ¶ added in v1.1.1
type DeleteRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteRequest) Descriptor
deprecated
added in
v1.1.1
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetKey ¶ added in v1.1.1
func (x *DeleteRequest) GetKey() string
func (*DeleteRequest) ProtoMessage ¶ added in v1.1.1
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶ added in v1.1.1
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶ added in v1.1.1
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶ added in v1.1.1
func (x *DeleteRequest) String() string
type GetReply ¶ added in v1.1.1
type GetReply struct {
Data []*Transfer `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetReply) Descriptor
deprecated
added in
v1.1.1
func (*GetReply) ProtoMessage ¶ added in v1.1.1
func (*GetReply) ProtoMessage()
func (*GetReply) ProtoReflect ¶ added in v1.1.1
func (x *GetReply) ProtoReflect() protoreflect.Message
type InfoReply ¶
type InfoReply struct {
State *InfoState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
CreateTime int64 `protobuf:"varint,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// contains filtered or unexported fields
}
func (*InfoReply) Descriptor
deprecated
func (*InfoReply) GetCreateTime ¶
func (*InfoReply) ProtoMessage ¶
func (*InfoReply) ProtoMessage()
func (*InfoReply) ProtoReflect ¶
func (x *InfoReply) ProtoReflect() protoreflect.Message
type InfoRequest ¶
type InfoRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) GetKey ¶
func (x *InfoRequest) GetKey() string
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
type InfoState ¶
type InfoState struct {
Messages uint64 `protobuf:"varint,1,opt,name=messages,proto3" json:"messages,omitempty"`
Bytes uint64 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
FirstSeq uint64 `protobuf:"varint,3,opt,name=first_seq,json=firstSeq,proto3" json:"first_seq,omitempty"`
FirstTime int64 `protobuf:"varint,4,opt,name=first_time,json=firstTime,proto3" json:"first_time,omitempty"`
LastSeq uint64 `protobuf:"varint,5,opt,name=last_seq,json=lastSeq,proto3" json:"last_seq,omitempty"`
LastTime int64 `protobuf:"varint,6,opt,name=last_time,json=lastTime,proto3" json:"last_time,omitempty"`
ConsumerCount int64 `protobuf:"varint,7,opt,name=consumer_count,json=consumerCount,proto3" json:"consumer_count,omitempty"`
// contains filtered or unexported fields
}
func (*InfoState) Descriptor
deprecated
func (*InfoState) GetConsumerCount ¶
func (*InfoState) GetFirstSeq ¶
func (*InfoState) GetFirstTime ¶
func (*InfoState) GetLastSeq ¶
func (*InfoState) GetLastTime ¶
func (*InfoState) GetMessages ¶
func (*InfoState) ProtoMessage ¶
func (*InfoState) ProtoMessage()
func (*InfoState) ProtoReflect ¶
func (x *InfoState) ProtoReflect() protoreflect.Message
type PublishRequest ¶
type PublishRequest struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// contains filtered or unexported fields
}
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetPayload ¶
func (x *PublishRequest) GetPayload() []byte
func (*PublishRequest) GetTopic ¶
func (x *PublishRequest) GetTopic() string
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type Transfer ¶ added in v1.1.1
type Transfer struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
func (*Transfer) Descriptor
deprecated
added in
v1.1.1
func (*Transfer) GetDescription ¶ added in v1.1.1
func (*Transfer) ProtoMessage ¶ added in v1.1.1
func (*Transfer) ProtoMessage()
func (*Transfer) ProtoReflect ¶ added in v1.1.1
func (x *Transfer) ProtoReflect() protoreflect.Message
type UnimplementedAPIServer ¶
type UnimplementedAPIServer struct {
}
UnimplementedAPIServer must be embedded to have forward compatible implementations.
func (UnimplementedAPIServer) Create ¶ added in v1.1.1
func (UnimplementedAPIServer) Create(context.Context, *CreateRequest) (*emptypb.Empty, error)
func (UnimplementedAPIServer) Delete ¶ added in v1.1.1
func (UnimplementedAPIServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedAPIServer) Info ¶
func (UnimplementedAPIServer) Info(context.Context, *InfoRequest) (*InfoReply, error)
func (UnimplementedAPIServer) Publish ¶
func (UnimplementedAPIServer) Publish(context.Context, *PublishRequest) (*emptypb.Empty, error)
func (UnimplementedAPIServer) Update ¶ added in v1.1.1
func (UnimplementedAPIServer) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
type UnsafeAPIServer ¶
type UnsafeAPIServer interface {
// contains filtered or unexported methods
}
UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIServer will result in compilation errors.
type UpdateRequest ¶ added in v1.1.1
type UpdateRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateRequest) Descriptor
deprecated
added in
v1.1.1
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetDescription ¶ added in v1.1.1
func (x *UpdateRequest) GetDescription() string
func (*UpdateRequest) GetKey ¶ added in v1.1.1
func (x *UpdateRequest) GetKey() string
func (*UpdateRequest) ProtoMessage ¶ added in v1.1.1
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶ added in v1.1.1
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶ added in v1.1.1
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶ added in v1.1.1
func (x *UpdateRequest) String() string