Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCollectionHTTPServer(s *http.Server, srv CollectionHTTPServer)
- func RegisterCollectionServer(s grpc.ServiceRegistrar, srv CollectionServer)
- type CollectionClient
- type CollectionHTTPClient
- type CollectionHTTPClientImpl
- func (c *CollectionHTTPClientImpl) CreateCollectionRecord(ctx context.Context, in *CollectionRecord, opts ...http.CallOption) (*Empty, error)
- func (c *CollectionHTTPClientImpl) ListCollectionRecord(ctx context.Context, in *ListCollectionRecordReq, opts ...http.CallOption) (*ListCollectionRecordResp, error)
- type CollectionHTTPServer
- type CollectionRecord
- func (*CollectionRecord) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionRecord) GetDeviceId() uint64
- func (x *CollectionRecord) GetGeoPoint() *GeoPoint
- func (x *CollectionRecord) GetTemperature() float32
- func (x *CollectionRecord) GetTimestamp() int64
- func (*CollectionRecord) ProtoMessage()
- func (x *CollectionRecord) ProtoReflect() protoreflect.Message
- func (x *CollectionRecord) Reset()
- func (x *CollectionRecord) String() string
- type CollectionServer
- type Empty
- type GeoPoint
- type ListCollectionRecordReq
- func (*ListCollectionRecordReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListCollectionRecordReq) GetDeviceId() uint64
- func (x *ListCollectionRecordReq) GetEndTimestamp() int64
- func (x *ListCollectionRecordReq) GetPage() uint64
- func (x *ListCollectionRecordReq) GetPageSize() uint64
- func (x *ListCollectionRecordReq) GetStartTimestamp() int64
- func (*ListCollectionRecordReq) ProtoMessage()
- func (x *ListCollectionRecordReq) ProtoReflect() protoreflect.Message
- func (x *ListCollectionRecordReq) Reset()
- func (x *ListCollectionRecordReq) String() string
- type ListCollectionRecordResp
- func (*ListCollectionRecordResp) Descriptor() ([]byte, []int)deprecated
- func (x *ListCollectionRecordResp) GetCollectionInfos() []*ListCollectionRecordResp_CollectionRecord
- func (*ListCollectionRecordResp) ProtoMessage()
- func (x *ListCollectionRecordResp) ProtoReflect() protoreflect.Message
- func (x *ListCollectionRecordResp) Reset()
- func (x *ListCollectionRecordResp) String() string
- type ListCollectionRecordResp_CollectionRecord
- func (*ListCollectionRecordResp_CollectionRecord) Descriptor() ([]byte, []int)deprecated
- func (x *ListCollectionRecordResp_CollectionRecord) GetCreatedAt() int64
- func (x *ListCollectionRecordResp_CollectionRecord) GetDeviceId() uint64
- func (x *ListCollectionRecordResp_CollectionRecord) GetGeoPoint() *GeoPoint
- func (x *ListCollectionRecordResp_CollectionRecord) GetTimestamp() int64
- func (*ListCollectionRecordResp_CollectionRecord) ProtoMessage()
- func (x *ListCollectionRecordResp_CollectionRecord) ProtoReflect() protoreflect.Message
- func (x *ListCollectionRecordResp_CollectionRecord) Reset()
- func (x *ListCollectionRecordResp_CollectionRecord) String() string
- type UnimplementedCollectionServer
- type UnsafeCollectionServer
Constants ¶
const ( Collection_CreateCollectionRecord_FullMethodName = "/api.collection.Collection/CreateCollectionRecord" Collection_ListCollectionRecord_FullMethodName = "/api.collection.Collection/ListCollectionRecord" )
const OperationCollectionCreateCollectionRecord = "/api.collection.Collection/CreateCollectionRecord"
const OperationCollectionListCollectionRecord = "/api.collection.Collection/ListCollectionRecord"
Variables ¶
var Collection_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.collection.Collection", HandlerType: (*CollectionServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateCollectionRecord", Handler: _Collection_CreateCollectionRecord_Handler, }, { MethodName: "ListCollectionRecord", Handler: _Collection_ListCollectionRecord_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "collection/collection.proto", }
Collection_ServiceDesc is the grpc.ServiceDesc for Collection service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_collection_collection_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCollectionHTTPServer ¶
func RegisterCollectionHTTPServer(s *http.Server, srv CollectionHTTPServer)
func RegisterCollectionServer ¶
func RegisterCollectionServer(s grpc.ServiceRegistrar, srv CollectionServer)
Types ¶
type CollectionClient ¶
type CollectionClient interface {
CreateCollectionRecord(ctx context.Context, in *CollectionRecord, opts ...grpc.CallOption) (*Empty, error)
ListCollectionRecord(ctx context.Context, in *ListCollectionRecordReq, opts ...grpc.CallOption) (*ListCollectionRecordResp, error)
}
CollectionClient is the client API for Collection 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 NewCollectionClient ¶
func NewCollectionClient(cc grpc.ClientConnInterface) CollectionClient
type CollectionHTTPClient ¶
type CollectionHTTPClient interface {
CreateCollectionRecord(ctx context.Context, req *CollectionRecord, opts ...http.CallOption) (rsp *Empty, err error)
ListCollectionRecord(ctx context.Context, req *ListCollectionRecordReq, opts ...http.CallOption) (rsp *ListCollectionRecordResp, err error)
}
func NewCollectionHTTPClient ¶
func NewCollectionHTTPClient(client *http.Client) CollectionHTTPClient
type CollectionHTTPClientImpl ¶
type CollectionHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CollectionHTTPClientImpl) CreateCollectionRecord ¶
func (c *CollectionHTTPClientImpl) CreateCollectionRecord(ctx context.Context, in *CollectionRecord, opts ...http.CallOption) (*Empty, error)
func (*CollectionHTTPClientImpl) ListCollectionRecord ¶
func (c *CollectionHTTPClientImpl) ListCollectionRecord(ctx context.Context, in *ListCollectionRecordReq, opts ...http.CallOption) (*ListCollectionRecordResp, error)
type CollectionHTTPServer ¶
type CollectionHTTPServer interface {
CreateCollectionRecord(context.Context, *CollectionRecord) (*Empty, error)
ListCollectionRecord(context.Context, *ListCollectionRecordReq) (*ListCollectionRecordResp, error)
}
type CollectionRecord ¶
type CollectionRecord struct {
DeviceId uint64 `protobuf:"varint,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
GeoPoint *GeoPoint `protobuf:"bytes,3,opt,name=geo_point,json=geoPoint,proto3" json:"geo_point,omitempty"`
Temperature float32 `protobuf:"fixed32,4,opt,name=temperature,proto3" json:"temperature,omitempty"`
// contains filtered or unexported fields
}
func (*CollectionRecord) Descriptor
deprecated
func (*CollectionRecord) Descriptor() ([]byte, []int)
Deprecated: Use CollectionRecord.ProtoReflect.Descriptor instead.
func (*CollectionRecord) GetDeviceId ¶
func (x *CollectionRecord) GetDeviceId() uint64
func (*CollectionRecord) GetGeoPoint ¶
func (x *CollectionRecord) GetGeoPoint() *GeoPoint
func (*CollectionRecord) GetTemperature ¶
func (x *CollectionRecord) GetTemperature() float32
func (*CollectionRecord) GetTimestamp ¶
func (x *CollectionRecord) GetTimestamp() int64
func (*CollectionRecord) ProtoMessage ¶
func (*CollectionRecord) ProtoMessage()
func (*CollectionRecord) ProtoReflect ¶
func (x *CollectionRecord) ProtoReflect() protoreflect.Message
func (*CollectionRecord) Reset ¶
func (x *CollectionRecord) Reset()
func (*CollectionRecord) String ¶
func (x *CollectionRecord) String() string
type CollectionServer ¶
type CollectionServer interface {
CreateCollectionRecord(context.Context, *CollectionRecord) (*Empty, error)
ListCollectionRecord(context.Context, *ListCollectionRecordReq) (*ListCollectionRecordResp, error)
// contains filtered or unexported methods
}
CollectionServer is the server API for Collection service. All implementations must embed UnimplementedCollectionServer for forward compatibility
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GeoPoint ¶
type GeoPoint struct {
Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"`
Lng float64 `protobuf:"fixed64,2,opt,name=lng,proto3" json:"lng,omitempty"`
// contains filtered or unexported fields
}
func (*GeoPoint) Descriptor
deprecated
func (*GeoPoint) ProtoMessage ¶
func (*GeoPoint) ProtoMessage()
func (*GeoPoint) ProtoReflect ¶
func (x *GeoPoint) ProtoReflect() protoreflect.Message
type ListCollectionRecordReq ¶
type ListCollectionRecordReq struct {
Page uint64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
PageSize uint64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
DeviceId uint64 `protobuf:"varint,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
StartTimestamp int64 `protobuf:"varint,4,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
EndTimestamp int64 `protobuf:"varint,5,opt,name=end_timestamp,json=endTimestamp,proto3" json:"end_timestamp,omitempty"`
// contains filtered or unexported fields
}
func (*ListCollectionRecordReq) Descriptor
deprecated
func (*ListCollectionRecordReq) Descriptor() ([]byte, []int)
Deprecated: Use ListCollectionRecordReq.ProtoReflect.Descriptor instead.
func (*ListCollectionRecordReq) GetDeviceId ¶
func (x *ListCollectionRecordReq) GetDeviceId() uint64
func (*ListCollectionRecordReq) GetEndTimestamp ¶
func (x *ListCollectionRecordReq) GetEndTimestamp() int64
func (*ListCollectionRecordReq) GetPage ¶
func (x *ListCollectionRecordReq) GetPage() uint64
func (*ListCollectionRecordReq) GetPageSize ¶
func (x *ListCollectionRecordReq) GetPageSize() uint64
func (*ListCollectionRecordReq) GetStartTimestamp ¶
func (x *ListCollectionRecordReq) GetStartTimestamp() int64
func (*ListCollectionRecordReq) ProtoMessage ¶
func (*ListCollectionRecordReq) ProtoMessage()
func (*ListCollectionRecordReq) ProtoReflect ¶
func (x *ListCollectionRecordReq) ProtoReflect() protoreflect.Message
func (*ListCollectionRecordReq) Reset ¶
func (x *ListCollectionRecordReq) Reset()
func (*ListCollectionRecordReq) String ¶
func (x *ListCollectionRecordReq) String() string
type ListCollectionRecordResp ¶
type ListCollectionRecordResp struct {
CollectionInfos []*ListCollectionRecordResp_CollectionRecord `protobuf:"bytes,1,rep,name=collection_infos,json=collectionInfos,proto3" json:"collection_infos,omitempty"`
// contains filtered or unexported fields
}
func (*ListCollectionRecordResp) Descriptor
deprecated
func (*ListCollectionRecordResp) Descriptor() ([]byte, []int)
Deprecated: Use ListCollectionRecordResp.ProtoReflect.Descriptor instead.
func (*ListCollectionRecordResp) GetCollectionInfos ¶
func (x *ListCollectionRecordResp) GetCollectionInfos() []*ListCollectionRecordResp_CollectionRecord
func (*ListCollectionRecordResp) ProtoMessage ¶
func (*ListCollectionRecordResp) ProtoMessage()
func (*ListCollectionRecordResp) ProtoReflect ¶
func (x *ListCollectionRecordResp) ProtoReflect() protoreflect.Message
func (*ListCollectionRecordResp) Reset ¶
func (x *ListCollectionRecordResp) Reset()
func (*ListCollectionRecordResp) String ¶
func (x *ListCollectionRecordResp) String() string
type ListCollectionRecordResp_CollectionRecord ¶
type ListCollectionRecordResp_CollectionRecord struct {
CreatedAt int64 `protobuf:"varint,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
DeviceId uint64 `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
GeoPoint *GeoPoint `protobuf:"bytes,4,opt,name=geo_point,json=geoPoint,proto3" json:"geo_point,omitempty"`
// contains filtered or unexported fields
}
func (*ListCollectionRecordResp_CollectionRecord) Descriptor
deprecated
func (*ListCollectionRecordResp_CollectionRecord) Descriptor() ([]byte, []int)
Deprecated: Use ListCollectionRecordResp_CollectionRecord.ProtoReflect.Descriptor instead.
func (*ListCollectionRecordResp_CollectionRecord) GetCreatedAt ¶
func (x *ListCollectionRecordResp_CollectionRecord) GetCreatedAt() int64
func (*ListCollectionRecordResp_CollectionRecord) GetDeviceId ¶
func (x *ListCollectionRecordResp_CollectionRecord) GetDeviceId() uint64
func (*ListCollectionRecordResp_CollectionRecord) GetGeoPoint ¶
func (x *ListCollectionRecordResp_CollectionRecord) GetGeoPoint() *GeoPoint
func (*ListCollectionRecordResp_CollectionRecord) GetTimestamp ¶
func (x *ListCollectionRecordResp_CollectionRecord) GetTimestamp() int64
func (*ListCollectionRecordResp_CollectionRecord) ProtoMessage ¶
func (*ListCollectionRecordResp_CollectionRecord) ProtoMessage()
func (*ListCollectionRecordResp_CollectionRecord) ProtoReflect ¶
func (x *ListCollectionRecordResp_CollectionRecord) ProtoReflect() protoreflect.Message
func (*ListCollectionRecordResp_CollectionRecord) Reset ¶
func (x *ListCollectionRecordResp_CollectionRecord) Reset()
func (*ListCollectionRecordResp_CollectionRecord) String ¶
func (x *ListCollectionRecordResp_CollectionRecord) String() string
type UnimplementedCollectionServer ¶
type UnimplementedCollectionServer struct {
}
UnimplementedCollectionServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectionServer) CreateCollectionRecord ¶
func (UnimplementedCollectionServer) CreateCollectionRecord(context.Context, *CollectionRecord) (*Empty, error)
func (UnimplementedCollectionServer) ListCollectionRecord ¶
func (UnimplementedCollectionServer) ListCollectionRecord(context.Context, *ListCollectionRecordReq) (*ListCollectionRecordResp, error)
type UnsafeCollectionServer ¶
type UnsafeCollectionServer interface {
// contains filtered or unexported methods
}
UnsafeCollectionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectionServer will result in compilation errors.