mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-06-13 04:58:09 +00:00
api: Refactor api/request_log.proto to streams/api_requests.proto.
This commit is contained in:
2
api/python/Makefile
vendored
2
api/python/Makefile
vendored
@ -36,7 +36,6 @@ api:
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/device.proto
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/gateway.proto
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/multicast_group.proto
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/request_log.proto
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/relay.proto
|
||||
|
||||
integration:
|
||||
@ -45,3 +44,4 @@ integration:
|
||||
streams:
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/streams/meta.proto
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/streams/frames.proto
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/streams/api_requests.proto
|
@ -1,24 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/api";
|
||||
option java_package = "io.chirpstack.api";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "RequestLogProto";
|
||||
option csharp_namespace = "Chirpstack.Api";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "chirpstack-api/common/common.proto";
|
||||
import "chirpstack-api/gw/gw.proto";
|
||||
|
||||
message RequestLog {
|
||||
// API service name.
|
||||
string service = 1;
|
||||
|
||||
// API method name.
|
||||
string method = 2;
|
||||
|
||||
// Metadata.
|
||||
map<string, string> metadata = 3;
|
||||
}
|
24
api/python/proto/chirpstack-api/streams/api_requests.proto
vendored
Normal file
24
api/python/proto/chirpstack-api/streams/api_requests.proto
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package streams;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/streams";
|
||||
option java_package = "io.chirpstack.api.streams";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ApiRequestsProto";
|
||||
option csharp_namespace = "Chirpstack.Streams";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "chirpstack-api/common/common.proto";
|
||||
import "chirpstack-api/gw/gw.proto";
|
||||
|
||||
message ApiRequestLog {
|
||||
// API service name.
|
||||
string service = 1;
|
||||
|
||||
// API method name.
|
||||
string method = 2;
|
||||
|
||||
// Metadata.
|
||||
map<string, string> metadata = 3;
|
||||
}
|
@ -18,6 +18,5 @@ from .tenant_pb2 import *
|
||||
from .tenant_pb2_grpc import *
|
||||
from .user_pb2 import *
|
||||
from .user_pb2_grpc import *
|
||||
from .request_log_pb2 import *
|
||||
from .relay_pb2 import *
|
||||
from .relay_pb2_grpc import *
|
||||
|
@ -1,34 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/request_log.proto
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
||||
from chirpstack_api.common import common_pb2 as chirpstack__api_dot_common_dot_common__pb2
|
||||
from chirpstack_api.gw import gw_pb2 as chirpstack__api_dot_gw_dot_gw__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$chirpstack-api/api/request_log.proto\x12\x03\x61pi\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"chirpstack-api/common/common.proto\x1a\x1a\x63hirpstack-api/gw/gw.proto\"\x8f\x01\n\nRequestLog\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12/\n\x08metadata\x18\x03 \x03(\x0b\x32\x1d.api.RequestLog.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42g\n\x11io.chirpstack.apiB\x0fRequestLogProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/api\xaa\x02\x0e\x43hirpstack.Apib\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.api.request_log_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b'\n\021io.chirpstack.apiB\017RequestLogProtoP\001Z.github.com/chirpstack/chirpstack/api/go/v4/api\252\002\016Chirpstack.Api'
|
||||
_REQUESTLOG_METADATAENTRY._options = None
|
||||
_REQUESTLOG_METADATAENTRY._serialized_options = b'8\001'
|
||||
_globals['_REQUESTLOG']._serialized_start=143
|
||||
_globals['_REQUESTLOG']._serialized_end=286
|
||||
_globals['_REQUESTLOG_METADATAENTRY']._serialized_start=239
|
||||
_globals['_REQUESTLOG_METADATAENTRY']._serialized_end=286
|
||||
# @@protoc_insertion_point(module_scope)
|
@ -1,2 +1,3 @@
|
||||
from .frames_pb2 import *
|
||||
from .meta_pb2 import *
|
||||
from .api_requests_pb2 import *
|
||||
|
34
api/python/src/chirpstack_api/streams/api_requests_pb2.py
vendored
Normal file
34
api/python/src/chirpstack_api/streams/api_requests_pb2.py
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/streams/api_requests.proto
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
||||
from chirpstack_api.common import common_pb2 as chirpstack__api_dot_common_dot_common__pb2
|
||||
from chirpstack_api.gw import gw_pb2 as chirpstack__api_dot_gw_dot_gw__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)chirpstack-api/streams/api_requests.proto\x12\x07streams\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"chirpstack-api/common/common.proto\x1a\x1a\x63hirpstack-api/gw/gw.proto\"\x99\x01\n\rApiRequestLog\x12\x0f\n\x07service\x18\x01 \x01(\t\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x36\n\x08metadata\x18\x03 \x03(\x0b\x32$.streams.ApiRequestLog.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42x\n\x19io.chirpstack.api.streamsB\x10\x41piRequestsProtoP\x01Z2github.com/chirpstack/chirpstack/api/go/v4/streams\xaa\x02\x12\x43hirpstack.Streamsb\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.streams.api_requests_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b'\n\031io.chirpstack.api.streamsB\020ApiRequestsProtoP\001Z2github.com/chirpstack/chirpstack/api/go/v4/streams\252\002\022Chirpstack.Streams'
|
||||
_APIREQUESTLOG_METADATAENTRY._options = None
|
||||
_APIREQUESTLOG_METADATAENTRY._serialized_options = b'8\001'
|
||||
_globals['_APIREQUESTLOG']._serialized_start=152
|
||||
_globals['_APIREQUESTLOG']._serialized_end=305
|
||||
_globals['_APIREQUESTLOG_METADATAENTRY']._serialized_start=258
|
||||
_globals['_APIREQUESTLOG_METADATAENTRY']._serialized_end=305
|
||||
# @@protoc_insertion_point(module_scope)
|
@ -8,7 +8,7 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti
|
||||
|
||||
DESCRIPTOR: _descriptor.FileDescriptor
|
||||
|
||||
class RequestLog(_message.Message):
|
||||
class ApiRequestLog(_message.Message):
|
||||
__slots__ = ["service", "method", "metadata"]
|
||||
class MetadataEntry(_message.Message):
|
||||
__slots__ = ["key", "value"]
|
Reference in New Issue
Block a user