2 Star 0 Fork 0

成都极趣科技/chirpstack-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
statistics.pb.go 21.49 KB
一键复制 编辑 原始数据 按行查看 历史
Arya11111 提交于 2024-04-23 11:06 +08:00 . V1.0
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: as/external/api/statistics.proto
package api
import (
context "context"
fmt "fmt"
gw "gitee.com/dfrobotcd/chirpstack-api/go/gw"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type DeviceStatsRequest struct {
// Device EUI (HEX encoded).
DevEui string `protobuf:"bytes,1,opt,name=dev_eui,json=devEUI,proto3" json:"dev_eui,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceStatsRequest) Reset() { *m = DeviceStatsRequest{} }
func (m *DeviceStatsRequest) String() string { return proto.CompactTextString(m) }
func (*DeviceStatsRequest) ProtoMessage() {}
func (*DeviceStatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b7403c477e552842, []int{0}
}
func (m *DeviceStatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceStatsRequest.Unmarshal(m, b)
}
func (m *DeviceStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceStatsRequest.Marshal(b, m, deterministic)
}
func (m *DeviceStatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceStatsRequest.Merge(m, src)
}
func (m *DeviceStatsRequest) XXX_Size() int {
return xxx_messageInfo_DeviceStatsRequest.Size(m)
}
func (m *DeviceStatsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceStatsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceStatsRequest proto.InternalMessageInfo
func (m *DeviceStatsRequest) GetDevEui() string {
if m != nil {
return m.DevEui
}
return ""
}
type GatewayStatsRequest struct {
GatewayId string `protobuf:"bytes,1,opt,name=gateway_id,json=gatewayID,proto3" json:"gateway_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GatewayStatsRequest) Reset() { *m = GatewayStatsRequest{} }
func (m *GatewayStatsRequest) String() string { return proto.CompactTextString(m) }
func (*GatewayStatsRequest) ProtoMessage() {}
func (*GatewayStatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b7403c477e552842, []int{1}
}
func (m *GatewayStatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GatewayStatsRequest.Unmarshal(m, b)
}
func (m *GatewayStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GatewayStatsRequest.Marshal(b, m, deterministic)
}
func (m *GatewayStatsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GatewayStatsRequest.Merge(m, src)
}
func (m *GatewayStatsRequest) XXX_Size() int {
return xxx_messageInfo_GatewayStatsRequest.Size(m)
}
func (m *GatewayStatsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GatewayStatsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GatewayStatsRequest proto.InternalMessageInfo
func (m *GatewayStatsRequest) GetGatewayId() string {
if m != nil {
return m.GatewayId
}
return ""
}
type StreamGatewayStatsResponse struct {
Stats *gw.GatewayStatitics `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StreamGatewayStatsResponse) Reset() { *m = StreamGatewayStatsResponse{} }
func (m *StreamGatewayStatsResponse) String() string { return proto.CompactTextString(m) }
func (*StreamGatewayStatsResponse) ProtoMessage() {}
func (*StreamGatewayStatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b7403c477e552842, []int{2}
}
func (m *StreamGatewayStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StreamGatewayStatsResponse.Unmarshal(m, b)
}
func (m *StreamGatewayStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StreamGatewayStatsResponse.Marshal(b, m, deterministic)
}
func (m *StreamGatewayStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StreamGatewayStatsResponse.Merge(m, src)
}
func (m *StreamGatewayStatsResponse) XXX_Size() int {
return xxx_messageInfo_StreamGatewayStatsResponse.Size(m)
}
func (m *StreamGatewayStatsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StreamGatewayStatsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StreamGatewayStatsResponse proto.InternalMessageInfo
func (m *StreamGatewayStatsResponse) GetStats() *gw.GatewayStatitics {
if m != nil {
return m.Stats
}
return nil
}
type StreamDeviceStatsResponse struct {
Stats *gw.DeviceStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StreamDeviceStatsResponse) Reset() { *m = StreamDeviceStatsResponse{} }
func (m *StreamDeviceStatsResponse) String() string { return proto.CompactTextString(m) }
func (*StreamDeviceStatsResponse) ProtoMessage() {}
func (*StreamDeviceStatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b7403c477e552842, []int{3}
}
func (m *StreamDeviceStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StreamDeviceStatsResponse.Unmarshal(m, b)
}
func (m *StreamDeviceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StreamDeviceStatsResponse.Marshal(b, m, deterministic)
}
func (m *StreamDeviceStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StreamDeviceStatsResponse.Merge(m, src)
}
func (m *StreamDeviceStatsResponse) XXX_Size() int {
return xxx_messageInfo_StreamDeviceStatsResponse.Size(m)
}
func (m *StreamDeviceStatsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StreamDeviceStatsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StreamDeviceStatsResponse proto.InternalMessageInfo
func (m *StreamDeviceStatsResponse) GetStats() *gw.DeviceStats {
if m != nil {
return m.Stats
}
return nil
}
type GatewayStatsResponse struct {
Stats *gw.GatewayStatitics `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GatewayStatsResponse) Reset() { *m = GatewayStatsResponse{} }
func (m *GatewayStatsResponse) String() string { return proto.CompactTextString(m) }
func (*GatewayStatsResponse) ProtoMessage() {}
func (*GatewayStatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b7403c477e552842, []int{4}
}
func (m *GatewayStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GatewayStatsResponse.Unmarshal(m, b)
}
func (m *GatewayStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GatewayStatsResponse.Marshal(b, m, deterministic)
}
func (m *GatewayStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GatewayStatsResponse.Merge(m, src)
}
func (m *GatewayStatsResponse) XXX_Size() int {
return xxx_messageInfo_GatewayStatsResponse.Size(m)
}
func (m *GatewayStatsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GatewayStatsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GatewayStatsResponse proto.InternalMessageInfo
func (m *GatewayStatsResponse) GetStats() *gw.GatewayStatitics {
if m != nil {
return m.Stats
}
return nil
}
type DeviceStatsResponse struct {
Stats *gw.DeviceStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeviceStatsResponse) Reset() { *m = DeviceStatsResponse{} }
func (m *DeviceStatsResponse) String() string { return proto.CompactTextString(m) }
func (*DeviceStatsResponse) ProtoMessage() {}
func (*DeviceStatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b7403c477e552842, []int{5}
}
func (m *DeviceStatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceStatsResponse.Unmarshal(m, b)
}
func (m *DeviceStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeviceStatsResponse.Marshal(b, m, deterministic)
}
func (m *DeviceStatsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeviceStatsResponse.Merge(m, src)
}
func (m *DeviceStatsResponse) XXX_Size() int {
return xxx_messageInfo_DeviceStatsResponse.Size(m)
}
func (m *DeviceStatsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DeviceStatsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DeviceStatsResponse proto.InternalMessageInfo
func (m *DeviceStatsResponse) GetStats() *gw.DeviceStats {
if m != nil {
return m.Stats
}
return nil
}
func init() {
proto.RegisterType((*DeviceStatsRequest)(nil), "api.DeviceStatsRequest")
proto.RegisterType((*GatewayStatsRequest)(nil), "api.GatewayStatsRequest")
proto.RegisterType((*StreamGatewayStatsResponse)(nil), "api.StreamGatewayStatsResponse")
proto.RegisterType((*StreamDeviceStatsResponse)(nil), "api.StreamDeviceStatsResponse")
proto.RegisterType((*GatewayStatsResponse)(nil), "api.GatewayStatsResponse")
proto.RegisterType((*DeviceStatsResponse)(nil), "api.DeviceStatsResponse")
}
func init() {
proto.RegisterFile("as/external/api/statistics.proto", fileDescriptor_b7403c477e552842)
}
var fileDescriptor_b7403c477e552842 = []byte{
// 433 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x8e, 0xd3, 0x30,
0x10, 0x56, 0x58, 0xb1, 0x68, 0x5d, 0x24, 0x84, 0x77, 0xa5, 0xed, 0x46, 0xfc, 0x6c, 0x83, 0x2a,
0x28, 0xa8, 0x36, 0x14, 0xb8, 0x71, 0xaa, 0x8a, 0xa0, 0xd7, 0x46, 0x5c, 0x7a, 0xa9, 0xdc, 0x64,
0x30, 0x56, 0xdb, 0x38, 0xc4, 0x6e, 0x03, 0xaa, 0x7a, 0x41, 0xbc, 0x01, 0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xaf, 0x86, 0x28, 0x04, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// StatisticsServiceClient is the client API for StatisticsService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type StatisticsServiceClient interface {
// Get user list.
StreamDeviceStats(ctx context.Context, in *DeviceStatsRequest, opts ...grpc.CallOption) (StatisticsService_StreamDeviceStatsClient, error)
// Get data for a particular user.
StreamGatewayStats(ctx context.Context, in *GatewayStatsRequest, opts ...grpc.CallOption) (StatisticsService_StreamGatewayStatsClient, error)
DeviceStats(ctx context.Context, in *DeviceStatsRequest, opts ...grpc.CallOption) (*DeviceStatsResponse, error)
// Get data for a particular user.
GatewayStats(ctx context.Context, in *GatewayStatsRequest, opts ...grpc.CallOption) (*GatewayStatsResponse, error)
}
type statisticsServiceClient struct {
cc grpc.ClientConnInterface
}
func NewStatisticsServiceClient(cc grpc.ClientConnInterface) StatisticsServiceClient {
return &statisticsServiceClient{cc}
}
func (c *statisticsServiceClient) StreamDeviceStats(ctx context.Context, in *DeviceStatsRequest, opts ...grpc.CallOption) (StatisticsService_StreamDeviceStatsClient, error) {
stream, err := c.cc.NewStream(ctx, &_StatisticsService_serviceDesc.Streams[0], "/api.StatisticsService/StreamDeviceStats", opts...)
if err != nil {
return nil, err
}
x := &statisticsServiceStreamDeviceStatsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type StatisticsService_StreamDeviceStatsClient interface {
Recv() (*StreamDeviceStatsResponse, error)
grpc.ClientStream
}
type statisticsServiceStreamDeviceStatsClient struct {
grpc.ClientStream
}
func (x *statisticsServiceStreamDeviceStatsClient) Recv() (*StreamDeviceStatsResponse, error) {
m := new(StreamDeviceStatsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *statisticsServiceClient) StreamGatewayStats(ctx context.Context, in *GatewayStatsRequest, opts ...grpc.CallOption) (StatisticsService_StreamGatewayStatsClient, error) {
stream, err := c.cc.NewStream(ctx, &_StatisticsService_serviceDesc.Streams[1], "/api.StatisticsService/StreamGatewayStats", opts...)
if err != nil {
return nil, err
}
x := &statisticsServiceStreamGatewayStatsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type StatisticsService_StreamGatewayStatsClient interface {
Recv() (*StreamGatewayStatsResponse, error)
grpc.ClientStream
}
type statisticsServiceStreamGatewayStatsClient struct {
grpc.ClientStream
}
func (x *statisticsServiceStreamGatewayStatsClient) Recv() (*StreamGatewayStatsResponse, error) {
m := new(StreamGatewayStatsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *statisticsServiceClient) DeviceStats(ctx context.Context, in *DeviceStatsRequest, opts ...grpc.CallOption) (*DeviceStatsResponse, error) {
out := new(DeviceStatsResponse)
err := c.cc.Invoke(ctx, "/api.StatisticsService/DeviceStats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *statisticsServiceClient) GatewayStats(ctx context.Context, in *GatewayStatsRequest, opts ...grpc.CallOption) (*GatewayStatsResponse, error) {
out := new(GatewayStatsResponse)
err := c.cc.Invoke(ctx, "/api.StatisticsService/GatewayStats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// StatisticsServiceServer is the server API for StatisticsService service.
type StatisticsServiceServer interface {
// Get user list.
StreamDeviceStats(*DeviceStatsRequest, StatisticsService_StreamDeviceStatsServer) error
// Get data for a particular user.
StreamGatewayStats(*GatewayStatsRequest, StatisticsService_StreamGatewayStatsServer) error
DeviceStats(context.Context, *DeviceStatsRequest) (*DeviceStatsResponse, error)
// Get data for a particular user.
GatewayStats(context.Context, *GatewayStatsRequest) (*GatewayStatsResponse, error)
}
// UnimplementedStatisticsServiceServer can be embedded to have forward compatible implementations.
type UnimplementedStatisticsServiceServer struct {
}
func (*UnimplementedStatisticsServiceServer) StreamDeviceStats(req *DeviceStatsRequest, srv StatisticsService_StreamDeviceStatsServer) error {
return status.Errorf(codes.Unimplemented, "method StreamDeviceStats not implemented")
}
func (*UnimplementedStatisticsServiceServer) StreamGatewayStats(req *GatewayStatsRequest, srv StatisticsService_StreamGatewayStatsServer) error {
return status.Errorf(codes.Unimplemented, "method StreamGatewayStats not implemented")
}
func (*UnimplementedStatisticsServiceServer) DeviceStats(ctx context.Context, req *DeviceStatsRequest) (*DeviceStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeviceStats not implemented")
}
func (*UnimplementedStatisticsServiceServer) GatewayStats(ctx context.Context, req *GatewayStatsRequest) (*GatewayStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GatewayStats not implemented")
}
func RegisterStatisticsServiceServer(s *grpc.Server, srv StatisticsServiceServer) {
s.RegisterService(&_StatisticsService_serviceDesc, srv)
}
func _StatisticsService_StreamDeviceStats_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DeviceStatsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(StatisticsServiceServer).StreamDeviceStats(m, &statisticsServiceStreamDeviceStatsServer{stream})
}
type StatisticsService_StreamDeviceStatsServer interface {
Send(*StreamDeviceStatsResponse) error
grpc.ServerStream
}
type statisticsServiceStreamDeviceStatsServer struct {
grpc.ServerStream
}
func (x *statisticsServiceStreamDeviceStatsServer) Send(m *StreamDeviceStatsResponse) error {
return x.ServerStream.SendMsg(m)
}
func _StatisticsService_StreamGatewayStats_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GatewayStatsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(StatisticsServiceServer).StreamGatewayStats(m, &statisticsServiceStreamGatewayStatsServer{stream})
}
type StatisticsService_StreamGatewayStatsServer interface {
Send(*StreamGatewayStatsResponse) error
grpc.ServerStream
}
type statisticsServiceStreamGatewayStatsServer struct {
grpc.ServerStream
}
func (x *statisticsServiceStreamGatewayStatsServer) Send(m *StreamGatewayStatsResponse) error {
return x.ServerStream.SendMsg(m)
}
func _StatisticsService_DeviceStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeviceStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StatisticsServiceServer).DeviceStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.StatisticsService/DeviceStats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StatisticsServiceServer).DeviceStats(ctx, req.(*DeviceStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _StatisticsService_GatewayStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GatewayStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StatisticsServiceServer).GatewayStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.StatisticsService/GatewayStats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StatisticsServiceServer).GatewayStats(ctx, req.(*GatewayStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _StatisticsService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.StatisticsService",
HandlerType: (*StatisticsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeviceStats",
Handler: _StatisticsService_DeviceStats_Handler,
},
{
MethodName: "GatewayStats",
Handler: _StatisticsService_GatewayStats_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamDeviceStats",
Handler: _StatisticsService_StreamDeviceStats_Handler,
ServerStreams: true,
},
{
StreamName: "StreamGatewayStats",
Handler: _StatisticsService_StreamGatewayStats_Handler,
ServerStreams: true,
},
},
Metadata: "as/external/api/statistics.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dfrobotcd/chirpstack-api.git
git@gitee.com:dfrobotcd/chirpstack-api.git
dfrobotcd
chirpstack-api
chirpstack-api
d91e8b8d685d

搜索帮助