collection

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Collection_CreateCollectionRecord_FullMethodName = "/api.collection.Collection/CreateCollectionRecord"
	Collection_ListCollectionRecord_FullMethodName   = "/api.collection.Collection/ListCollectionRecord"
)
View Source
const OperationCollectionCreateCollectionRecord = "/api.collection.Collection/CreateCollectionRecord"
View Source
const OperationCollectionListCollectionRecord = "/api.collection.Collection/ListCollectionRecord"

Variables

View Source
var (
	CollectionRecordOrder_name = map[int32]string{
		0: "TIMESTAMP",
		1: "CREATED_AT",
	}
	CollectionRecordOrder_value = map[string]int32{
		"TIMESTAMP":  0,
		"CREATED_AT": 1,
	}
)

Enum value maps for CollectionRecordOrder.

View Source
var (
	Sort_name = map[int32]string{
		0: "DESC",
		1: "ASC",
	}
	Sort_value = map[string]int32{
		"DESC": 0,
		"ASC":  1,
	}
)

Enum value maps for Sort.

View Source
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)

View Source
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 CollectionData added in v0.2.3

type CollectionData struct {
	Timestamp   int64     `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp"`             // @gotags: json:"timestamp"
	GeoPoint    *GeoPoint `protobuf:"bytes,2,opt,name=geo_point,json=geoPoint,proto3" json:"geoPoint"` // @gotags: json:"geoPoint"
	Temperature float32   `protobuf:"fixed32,3,opt,name=temperature,proto3" json:"temperature"`        // @gotags: json:"temperature"
	// contains filtered or unexported fields
}

func (*CollectionData) Descriptor deprecated added in v0.2.3

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

Deprecated: Use CollectionData.ProtoReflect.Descriptor instead.

func (*CollectionData) GetGeoPoint added in v0.2.3

func (x *CollectionData) GetGeoPoint() *GeoPoint

func (*CollectionData) GetTemperature added in v0.2.3

func (x *CollectionData) GetTemperature() float32

func (*CollectionData) GetTimestamp added in v0.2.3

func (x *CollectionData) GetTimestamp() int64

func (*CollectionData) ProtoMessage added in v0.2.3

func (*CollectionData) ProtoMessage()

func (*CollectionData) ProtoReflect added in v0.2.3

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

func (*CollectionData) Reset added in v0.2.3

func (x *CollectionData) Reset()

func (*CollectionData) String added in v0.2.3

func (x *CollectionData) String() string

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

type CollectionHTTPServer

type CollectionHTTPServer interface {
	CreateCollectionRecord(context.Context, *CollectionRecord) (*Empty, error)
	ListCollectionRecord(context.Context, *ListCollectionRecordReq) (*ListCollectionRecordResp, error)
}

type CollectionRecord

type CollectionRecord struct {
	Id        uint64          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	DeviceId  uint64          `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3" json:"deviceId"`    // @gotags: json:"deviceId"
	CreatedAt int64           `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"createdAt"` // @gotags: json:"createdAt"
	Data      *CollectionData `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionRecord) Descriptor deprecated

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

Deprecated: Use CollectionRecord.ProtoReflect.Descriptor instead.

func (*CollectionRecord) GetCreatedAt added in v0.2.2

func (x *CollectionRecord) GetCreatedAt() int64

func (*CollectionRecord) GetData added in v0.2.3

func (x *CollectionRecord) GetData() *CollectionData

func (*CollectionRecord) GetDeviceId

func (x *CollectionRecord) GetDeviceId() uint64

func (*CollectionRecord) GetId added in v0.2.2

func (x *CollectionRecord) GetId() uint64

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 CollectionRecordOrder added in v0.2.2

type CollectionRecordOrder int32
const (
	CollectionRecordOrder_TIMESTAMP  CollectionRecordOrder = 0
	CollectionRecordOrder_CREATED_AT CollectionRecordOrder = 1
)

func (CollectionRecordOrder) Descriptor added in v0.2.2

func (CollectionRecordOrder) Enum added in v0.2.2

func (CollectionRecordOrder) EnumDescriptor deprecated added in v0.2.2

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

Deprecated: Use CollectionRecordOrder.Descriptor instead.

func (CollectionRecordOrder) Number added in v0.2.2

func (CollectionRecordOrder) String added in v0.2.2

func (x CollectionRecordOrder) String() string

func (CollectionRecordOrder) Type added in v0.2.2

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GeoPoint

type GeoPoint struct {
	Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat"` // @gotags: json:"lat"
	Lon float64 `protobuf:"fixed64,2,opt,name=lon,proto3" json:"lon"` // @gotags: json:"lon"
	// contains filtered or unexported fields
}

func (*GeoPoint) Descriptor deprecated

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

Deprecated: Use GeoPoint.ProtoReflect.Descriptor instead.

func (*GeoPoint) GetLat

func (x *GeoPoint) GetLat() float64

func (*GeoPoint) GetLon added in v0.2.3

func (x *GeoPoint) GetLon() float64

func (*GeoPoint) ProtoMessage

func (*GeoPoint) ProtoMessage()

func (*GeoPoint) ProtoReflect

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

func (*GeoPoint) Reset

func (x *GeoPoint) Reset()

func (*GeoPoint) String

func (x *GeoPoint) String() string

type ListCollectionRecordReq

type ListCollectionRecordReq struct {
	DeviceId uint64                `protobuf:"varint,1,opt,name=device_id,json=deviceId,proto3" json:"deviceId" form:"deviceId"`                             // @gotags: form:"deviceId" json:"deviceId"
	Page     uint64                `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty" form:"page"`                                              // @gotags: form:"page"
	Size     uint64                `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty" form:"size"`                                              // @gotags: form:"size"
	Before   int64                 `protobuf:"varint,4,opt,name=before,proto3" json:"before,omitempty" form:"before"`                                        // @gotags: form:"before"
	After    int64                 `protobuf:"varint,5,opt,name=after,proto3" json:"after,omitempty" form:"after"`                                           // @gotags: form:"after"
	Order    CollectionRecordOrder `protobuf:"varint,6,opt,name=order,proto3,enum=api.collection.CollectionRecordOrder" json:"order,omitempty" form:"order"` // @gotags: form:"order"
	Sort     Sort                  `protobuf:"varint,7,opt,name=sort,proto3,enum=api.collection.Sort" json:"sort,omitempty" form:"sort"`                     // @gotags: form:"sort"
	// contains filtered or unexported fields
}

func (*ListCollectionRecordReq) Descriptor deprecated

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

Deprecated: Use ListCollectionRecordReq.ProtoReflect.Descriptor instead.

func (*ListCollectionRecordReq) GetAfter added in v0.2.2

func (x *ListCollectionRecordReq) GetAfter() int64

func (*ListCollectionRecordReq) GetBefore added in v0.2.2

func (x *ListCollectionRecordReq) GetBefore() int64

func (*ListCollectionRecordReq) GetDeviceId

func (x *ListCollectionRecordReq) GetDeviceId() uint64

func (*ListCollectionRecordReq) GetOrder added in v0.2.2

func (*ListCollectionRecordReq) GetPage

func (x *ListCollectionRecordReq) GetPage() uint64

func (*ListCollectionRecordReq) GetSize added in v0.2.2

func (x *ListCollectionRecordReq) GetSize() uint64

func (*ListCollectionRecordReq) GetSort added in v0.2.2

func (x *ListCollectionRecordReq) GetSort() Sort

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 {
	Records []*CollectionRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	Total   int64               `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCollectionRecordResp) Descriptor deprecated

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

Deprecated: Use ListCollectionRecordResp.ProtoReflect.Descriptor instead.

func (*ListCollectionRecordResp) GetRecords added in v0.2.2

func (x *ListCollectionRecordResp) GetRecords() []*CollectionRecord

func (*ListCollectionRecordResp) GetTotal added in v0.2.2

func (x *ListCollectionRecordResp) GetTotal() int64

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 Sort added in v0.2.2

type Sort int32
const (
	Sort_DESC Sort = 0
	Sort_ASC  Sort = 1
)

func (Sort) Descriptor added in v0.2.2

func (Sort) Descriptor() protoreflect.EnumDescriptor

func (Sort) Enum added in v0.2.2

func (x Sort) Enum() *Sort

func (Sort) EnumDescriptor deprecated added in v0.2.2

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

Deprecated: Use Sort.Descriptor instead.

func (Sort) Number added in v0.2.2

func (x Sort) Number() protoreflect.EnumNumber

func (Sort) String added in v0.2.2

func (x Sort) String() string

func (Sort) Type added in v0.2.2

func (Sort) Type() protoreflect.EnumType

type UnimplementedCollectionServer

type UnimplementedCollectionServer struct {
}

UnimplementedCollectionServer must be embedded to have forward compatible implementations.

func (UnimplementedCollectionServer) CreateCollectionRecord

func (UnimplementedCollectionServer) ListCollectionRecord

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.

Jump to

Keyboard shortcuts

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