rename libp2p test dir and rebuild protobufs

This commit is contained in:
pacrob
2024-03-02 11:10:05 -07:00
parent 318ce66ef5
commit ee4e9c4645
14 changed files with 526 additions and 2537 deletions

View File

@ -1,946 +1,50 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: libp2p/pubsub/pb/rpc.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
# Protobuf Python Version: 4.25.3
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name="libp2p/pubsub/pb/rpc.proto",
package="pubsub.pb",
syntax="proto2",
serialized_options=None,
serialized_pb=_b(
'\n\x1alibp2p/pubsub/pb/rpc.proto\x12\tpubsub.pb"\xb4\x01\n\x03RPC\x12-\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x16.pubsub.pb.RPC.SubOpts\x12#\n\x07publish\x18\x02 \x03(\x0b\x32\x12.pubsub.pb.Message\x12*\n\x07\x63ontrol\x18\x03 \x01(\x0b\x32\x19.pubsub.pb.ControlMessage\x1a-\n\x07SubOpts\x12\x11\n\tsubscribe\x18\x01 \x01(\x08\x12\x0f\n\x07topicid\x18\x02 \x01(\t"i\n\x07Message\x12\x0f\n\x07\x66rom_id\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05seqno\x18\x03 \x01(\x0c\x12\x10\n\x08topicIDs\x18\x04 \x03(\t\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12\x0b\n\x03key\x18\x06 \x01(\x0c"\xb0\x01\n\x0e\x43ontrolMessage\x12&\n\x05ihave\x18\x01 \x03(\x0b\x32\x17.pubsub.pb.ControlIHave\x12&\n\x05iwant\x18\x02 \x03(\x0b\x32\x17.pubsub.pb.ControlIWant\x12&\n\x05graft\x18\x03 \x03(\x0b\x32\x17.pubsub.pb.ControlGraft\x12&\n\x05prune\x18\x04 \x03(\x0b\x32\x17.pubsub.pb.ControlPrune"3\n\x0c\x43ontrolIHave\x12\x0f\n\x07topicID\x18\x01 \x01(\t\x12\x12\n\nmessageIDs\x18\x02 \x03(\t""\n\x0c\x43ontrolIWant\x12\x12\n\nmessageIDs\x18\x01 \x03(\t"\x1f\n\x0c\x43ontrolGraft\x12\x0f\n\x07topicID\x18\x01 \x01(\t"\x1f\n\x0c\x43ontrolPrune\x12\x0f\n\x07topicID\x18\x01 \x01(\t"\x87\x03\n\x0fTopicDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x04\x61uth\x18\x02 \x01(\x0b\x32#.pubsub.pb.TopicDescriptor.AuthOpts\x12/\n\x03\x65nc\x18\x03 \x01(\x0b\x32".pubsub.pb.TopicDescriptor.EncOpts\x1a|\n\x08\x41uthOpts\x12:\n\x04mode\x18\x01 \x01(\x0e\x32,.pubsub.pb.TopicDescriptor.AuthOpts.AuthMode\x12\x0c\n\x04keys\x18\x02 \x03(\x0c"&\n\x08\x41uthMode\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03KEY\x10\x01\x12\x07\n\x03WOT\x10\x02\x1a\x83\x01\n\x07\x45ncOpts\x12\x38\n\x04mode\x18\x01 \x01(\x0e\x32*.pubsub.pb.TopicDescriptor.EncOpts.EncMode\x12\x11\n\tkeyHashes\x18\x02 \x03(\x0c"+\n\x07\x45ncMode\x12\x08\n\x04NONE\x10\x00\x12\r\n\tSHAREDKEY\x10\x01\x12\x07\n\x03WOT\x10\x02'
),
)
_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE = _descriptor.EnumDescriptor(
name="AuthMode",
full_name="pubsub.pb.TopicDescriptor.AuthOpts.AuthMode",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="NONE", index=0, number=0, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="KEY", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="WOT", index=2, number=2, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=885,
serialized_end=923,
)
_sym_db.RegisterEnumDescriptor(_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE)
_TOPICDESCRIPTOR_ENCOPTS_ENCMODE = _descriptor.EnumDescriptor(
name="EncMode",
full_name="pubsub.pb.TopicDescriptor.EncOpts.EncMode",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="NONE", index=0, number=0, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="SHAREDKEY", index=1, number=1, serialized_options=None, type=None
),
_descriptor.EnumValueDescriptor(
name="WOT", index=2, number=2, serialized_options=None, type=None
),
],
containing_type=None,
serialized_options=None,
serialized_start=1014,
serialized_end=1057,
)
_sym_db.RegisterEnumDescriptor(_TOPICDESCRIPTOR_ENCOPTS_ENCMODE)
_RPC_SUBOPTS = _descriptor.Descriptor(
name="SubOpts",
full_name="pubsub.pb.RPC.SubOpts",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="subscribe",
full_name="pubsub.pb.RPC.SubOpts.subscribe",
index=0,
number=1,
type=8,
cpp_type=7,
label=1,
has_default_value=False,
default_value=False,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="topicid",
full_name="pubsub.pb.RPC.SubOpts.topicid",
index=1,
number=2,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=177,
serialized_end=222,
)
_RPC = _descriptor.Descriptor(
name="RPC",
full_name="pubsub.pb.RPC",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="subscriptions",
full_name="pubsub.pb.RPC.subscriptions",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="publish",
full_name="pubsub.pb.RPC.publish",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="control",
full_name="pubsub.pb.RPC.control",
index=2,
number=3,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[
_RPC_SUBOPTS,
],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=42,
serialized_end=222,
)
_MESSAGE = _descriptor.Descriptor(
name="Message",
full_name="pubsub.pb.Message",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="from_id",
full_name="pubsub.pb.Message.from_id",
index=0,
number=1,
type=12,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b(""),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="data",
full_name="pubsub.pb.Message.data",
index=1,
number=2,
type=12,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b(""),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="seqno",
full_name="pubsub.pb.Message.seqno",
index=2,
number=3,
type=12,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b(""),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="topicIDs",
full_name="pubsub.pb.Message.topicIDs",
index=3,
number=4,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="signature",
full_name="pubsub.pb.Message.signature",
index=4,
number=5,
type=12,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b(""),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="key",
full_name="pubsub.pb.Message.key",
index=5,
number=6,
type=12,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b(""),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=224,
serialized_end=329,
)
_CONTROLMESSAGE = _descriptor.Descriptor(
name="ControlMessage",
full_name="pubsub.pb.ControlMessage",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="ihave",
full_name="pubsub.pb.ControlMessage.ihave",
index=0,
number=1,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="iwant",
full_name="pubsub.pb.ControlMessage.iwant",
index=1,
number=2,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="graft",
full_name="pubsub.pb.ControlMessage.graft",
index=2,
number=3,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="prune",
full_name="pubsub.pb.ControlMessage.prune",
index=3,
number=4,
type=11,
cpp_type=10,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=332,
serialized_end=508,
)
_CONTROLIHAVE = _descriptor.Descriptor(
name="ControlIHave",
full_name="pubsub.pb.ControlIHave",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="topicID",
full_name="pubsub.pb.ControlIHave.topicID",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="messageIDs",
full_name="pubsub.pb.ControlIHave.messageIDs",
index=1,
number=2,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=510,
serialized_end=561,
)
_CONTROLIWANT = _descriptor.Descriptor(
name="ControlIWant",
full_name="pubsub.pb.ControlIWant",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="messageIDs",
full_name="pubsub.pb.ControlIWant.messageIDs",
index=0,
number=1,
type=9,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=563,
serialized_end=597,
)
_CONTROLGRAFT = _descriptor.Descriptor(
name="ControlGraft",
full_name="pubsub.pb.ControlGraft",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="topicID",
full_name="pubsub.pb.ControlGraft.topicID",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=599,
serialized_end=630,
)
_CONTROLPRUNE = _descriptor.Descriptor(
name="ControlPrune",
full_name="pubsub.pb.ControlPrune",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="topicID",
full_name="pubsub.pb.ControlPrune.topicID",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=632,
serialized_end=663,
)
_TOPICDESCRIPTOR_AUTHOPTS = _descriptor.Descriptor(
name="AuthOpts",
full_name="pubsub.pb.TopicDescriptor.AuthOpts",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="mode",
full_name="pubsub.pb.TopicDescriptor.AuthOpts.mode",
index=0,
number=1,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="keys",
full_name="pubsub.pb.TopicDescriptor.AuthOpts.keys",
index=1,
number=2,
type=12,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[
_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE,
],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=799,
serialized_end=923,
)
_TOPICDESCRIPTOR_ENCOPTS = _descriptor.Descriptor(
name="EncOpts",
full_name="pubsub.pb.TopicDescriptor.EncOpts",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="mode",
full_name="pubsub.pb.TopicDescriptor.EncOpts.mode",
index=0,
number=1,
type=14,
cpp_type=8,
label=1,
has_default_value=False,
default_value=0,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="keyHashes",
full_name="pubsub.pb.TopicDescriptor.EncOpts.keyHashes",
index=1,
number=2,
type=12,
cpp_type=9,
label=3,
has_default_value=False,
default_value=[],
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[],
enum_types=[
_TOPICDESCRIPTOR_ENCOPTS_ENCMODE,
],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=926,
serialized_end=1057,
)
_TOPICDESCRIPTOR = _descriptor.Descriptor(
name="TopicDescriptor",
full_name="pubsub.pb.TopicDescriptor",
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name="name",
full_name="pubsub.pb.TopicDescriptor.name",
index=0,
number=1,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="auth",
full_name="pubsub.pb.TopicDescriptor.auth",
index=1,
number=2,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
_descriptor.FieldDescriptor(
name="enc",
full_name="pubsub.pb.TopicDescriptor.enc",
index=2,
number=3,
type=11,
cpp_type=10,
label=1,
has_default_value=False,
default_value=None,
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
],
extensions=[],
nested_types=[
_TOPICDESCRIPTOR_AUTHOPTS,
_TOPICDESCRIPTOR_ENCOPTS,
],
enum_types=[],
serialized_options=None,
is_extendable=False,
syntax="proto2",
extension_ranges=[],
oneofs=[],
serialized_start=666,
serialized_end=1057,
)
_RPC_SUBOPTS.containing_type = _RPC
_RPC.fields_by_name["subscriptions"].message_type = _RPC_SUBOPTS
_RPC.fields_by_name["publish"].message_type = _MESSAGE
_RPC.fields_by_name["control"].message_type = _CONTROLMESSAGE
_CONTROLMESSAGE.fields_by_name["ihave"].message_type = _CONTROLIHAVE
_CONTROLMESSAGE.fields_by_name["iwant"].message_type = _CONTROLIWANT
_CONTROLMESSAGE.fields_by_name["graft"].message_type = _CONTROLGRAFT
_CONTROLMESSAGE.fields_by_name["prune"].message_type = _CONTROLPRUNE
_TOPICDESCRIPTOR_AUTHOPTS.fields_by_name[
"mode"
].enum_type = _TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE
_TOPICDESCRIPTOR_AUTHOPTS.containing_type = _TOPICDESCRIPTOR
_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE.containing_type = _TOPICDESCRIPTOR_AUTHOPTS
_TOPICDESCRIPTOR_ENCOPTS.fields_by_name[
"mode"
].enum_type = _TOPICDESCRIPTOR_ENCOPTS_ENCMODE
_TOPICDESCRIPTOR_ENCOPTS.containing_type = _TOPICDESCRIPTOR
_TOPICDESCRIPTOR_ENCOPTS_ENCMODE.containing_type = _TOPICDESCRIPTOR_ENCOPTS
_TOPICDESCRIPTOR.fields_by_name["auth"].message_type = _TOPICDESCRIPTOR_AUTHOPTS
_TOPICDESCRIPTOR.fields_by_name["enc"].message_type = _TOPICDESCRIPTOR_ENCOPTS
DESCRIPTOR.message_types_by_name["RPC"] = _RPC
DESCRIPTOR.message_types_by_name["Message"] = _MESSAGE
DESCRIPTOR.message_types_by_name["ControlMessage"] = _CONTROLMESSAGE
DESCRIPTOR.message_types_by_name["ControlIHave"] = _CONTROLIHAVE
DESCRIPTOR.message_types_by_name["ControlIWant"] = _CONTROLIWANT
DESCRIPTOR.message_types_by_name["ControlGraft"] = _CONTROLGRAFT
DESCRIPTOR.message_types_by_name["ControlPrune"] = _CONTROLPRUNE
DESCRIPTOR.message_types_by_name["TopicDescriptor"] = _TOPICDESCRIPTOR
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
RPC = _reflection.GeneratedProtocolMessageType(
"RPC",
(_message.Message,),
{
"SubOpts": _reflection.GeneratedProtocolMessageType(
"SubOpts",
(_message.Message,),
{
"DESCRIPTOR": _RPC_SUBOPTS,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.RPC.SubOpts)
},
),
"DESCRIPTOR": _RPC,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.RPC)
},
)
_sym_db.RegisterMessage(RPC)
_sym_db.RegisterMessage(RPC.SubOpts)
Message = _reflection.GeneratedProtocolMessageType(
"Message",
(_message.Message,),
{
"DESCRIPTOR": _MESSAGE,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.Message)
},
)
_sym_db.RegisterMessage(Message)
ControlMessage = _reflection.GeneratedProtocolMessageType(
"ControlMessage",
(_message.Message,),
{
"DESCRIPTOR": _CONTROLMESSAGE,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.ControlMessage)
},
)
_sym_db.RegisterMessage(ControlMessage)
ControlIHave = _reflection.GeneratedProtocolMessageType(
"ControlIHave",
(_message.Message,),
{
"DESCRIPTOR": _CONTROLIHAVE,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.ControlIHave)
},
)
_sym_db.RegisterMessage(ControlIHave)
ControlIWant = _reflection.GeneratedProtocolMessageType(
"ControlIWant",
(_message.Message,),
{
"DESCRIPTOR": _CONTROLIWANT,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.ControlIWant)
},
)
_sym_db.RegisterMessage(ControlIWant)
ControlGraft = _reflection.GeneratedProtocolMessageType(
"ControlGraft",
(_message.Message,),
{
"DESCRIPTOR": _CONTROLGRAFT,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.ControlGraft)
},
)
_sym_db.RegisterMessage(ControlGraft)
ControlPrune = _reflection.GeneratedProtocolMessageType(
"ControlPrune",
(_message.Message,),
{
"DESCRIPTOR": _CONTROLPRUNE,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.ControlPrune)
},
)
_sym_db.RegisterMessage(ControlPrune)
TopicDescriptor = _reflection.GeneratedProtocolMessageType(
"TopicDescriptor",
(_message.Message,),
{
"AuthOpts": _reflection.GeneratedProtocolMessageType(
"AuthOpts",
(_message.Message,),
{
"DESCRIPTOR": _TOPICDESCRIPTOR_AUTHOPTS,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.TopicDescriptor.AuthOpts)
},
),
"EncOpts": _reflection.GeneratedProtocolMessageType(
"EncOpts",
(_message.Message,),
{
"DESCRIPTOR": _TOPICDESCRIPTOR_ENCOPTS,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.TopicDescriptor.EncOpts)
},
),
"DESCRIPTOR": _TOPICDESCRIPTOR,
"__module__": "libp2p.pubsub.pb.rpc_pb2"
# @@protoc_insertion_point(class_scope:pubsub.pb.TopicDescriptor)
},
)
_sym_db.RegisterMessage(TopicDescriptor)
_sym_db.RegisterMessage(TopicDescriptor.AuthOpts)
_sym_db.RegisterMessage(TopicDescriptor.EncOpts)
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1alibp2p/pubsub/pb/rpc.proto\x12\tpubsub.pb\"\xb4\x01\n\x03RPC\x12-\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x16.pubsub.pb.RPC.SubOpts\x12#\n\x07publish\x18\x02 \x03(\x0b\x32\x12.pubsub.pb.Message\x12*\n\x07\x63ontrol\x18\x03 \x01(\x0b\x32\x19.pubsub.pb.ControlMessage\x1a-\n\x07SubOpts\x12\x11\n\tsubscribe\x18\x01 \x01(\x08\x12\x0f\n\x07topicid\x18\x02 \x01(\t\"i\n\x07Message\x12\x0f\n\x07\x66rom_id\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05seqno\x18\x03 \x01(\x0c\x12\x10\n\x08topicIDs\x18\x04 \x03(\t\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12\x0b\n\x03key\x18\x06 \x01(\x0c\"\xb0\x01\n\x0e\x43ontrolMessage\x12&\n\x05ihave\x18\x01 \x03(\x0b\x32\x17.pubsub.pb.ControlIHave\x12&\n\x05iwant\x18\x02 \x03(\x0b\x32\x17.pubsub.pb.ControlIWant\x12&\n\x05graft\x18\x03 \x03(\x0b\x32\x17.pubsub.pb.ControlGraft\x12&\n\x05prune\x18\x04 \x03(\x0b\x32\x17.pubsub.pb.ControlPrune\"3\n\x0c\x43ontrolIHave\x12\x0f\n\x07topicID\x18\x01 \x01(\t\x12\x12\n\nmessageIDs\x18\x02 \x03(\t\"\"\n\x0c\x43ontrolIWant\x12\x12\n\nmessageIDs\x18\x01 \x03(\t\"\x1f\n\x0c\x43ontrolGraft\x12\x0f\n\x07topicID\x18\x01 \x01(\t\"\x1f\n\x0c\x43ontrolPrune\x12\x0f\n\x07topicID\x18\x01 \x01(\t\"\x87\x03\n\x0fTopicDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x04\x61uth\x18\x02 \x01(\x0b\x32#.pubsub.pb.TopicDescriptor.AuthOpts\x12/\n\x03\x65nc\x18\x03 \x01(\x0b\x32\".pubsub.pb.TopicDescriptor.EncOpts\x1a|\n\x08\x41uthOpts\x12:\n\x04mode\x18\x01 \x01(\x0e\x32,.pubsub.pb.TopicDescriptor.AuthOpts.AuthMode\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\"&\n\x08\x41uthMode\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03KEY\x10\x01\x12\x07\n\x03WOT\x10\x02\x1a\x83\x01\n\x07\x45ncOpts\x12\x38\n\x04mode\x18\x01 \x01(\x0e\x32*.pubsub.pb.TopicDescriptor.EncOpts.EncMode\x12\x11\n\tkeyHashes\x18\x02 \x03(\x0c\"+\n\x07\x45ncMode\x12\x08\n\x04NONE\x10\x00\x12\r\n\tSHAREDKEY\x10\x01\x12\x07\n\x03WOT\x10\x02')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.pubsub.pb.rpc_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_RPC']._serialized_start=42
_globals['_RPC']._serialized_end=222
_globals['_RPC_SUBOPTS']._serialized_start=177
_globals['_RPC_SUBOPTS']._serialized_end=222
_globals['_MESSAGE']._serialized_start=224
_globals['_MESSAGE']._serialized_end=329
_globals['_CONTROLMESSAGE']._serialized_start=332
_globals['_CONTROLMESSAGE']._serialized_end=508
_globals['_CONTROLIHAVE']._serialized_start=510
_globals['_CONTROLIHAVE']._serialized_end=561
_globals['_CONTROLIWANT']._serialized_start=563
_globals['_CONTROLIWANT']._serialized_end=597
_globals['_CONTROLGRAFT']._serialized_start=599
_globals['_CONTROLGRAFT']._serialized_end=630
_globals['_CONTROLPRUNE']._serialized_start=632
_globals['_CONTROLPRUNE']._serialized_end=663
_globals['_TOPICDESCRIPTOR']._serialized_start=666
_globals['_TOPICDESCRIPTOR']._serialized_end=1057
_globals['_TOPICDESCRIPTOR_AUTHOPTS']._serialized_start=799
_globals['_TOPICDESCRIPTOR_AUTHOPTS']._serialized_end=923
_globals['_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE']._serialized_start=885
_globals['_TOPICDESCRIPTOR_AUTHOPTS_AUTHMODE']._serialized_end=923
_globals['_TOPICDESCRIPTOR_ENCOPTS']._serialized_start=926
_globals['_TOPICDESCRIPTOR_ENCOPTS']._serialized_end=1057
_globals['_TOPICDESCRIPTOR_ENCOPTS_ENCMODE']._serialized_start=1014
_globals['_TOPICDESCRIPTOR_ENCOPTS_ENCMODE']._serialized_end=1057
# @@protoc_insertion_point(module_scope)

View File

@ -1,535 +1,294 @@
# @generated by generate_proto_mypy_stubs.py. Do not edit!
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
Modified from https://github.com/libp2p/go-libp2p-pubsub/blob/master/pb/rpc.proto"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
EnumDescriptor as google___protobuf___descriptor___EnumDescriptor,
)
import typing
from google.protobuf.internal.containers import (
RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer,
RepeatedScalarFieldContainer as google___protobuf___internal___containers___RepeatedScalarFieldContainer,
)
if sys.version_info >= (3, 10):
import typing as typing_extensions
else:
import typing_extensions
from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
from typing import (
Iterable as typing___Iterable,
List as typing___List,
Optional as typing___Optional,
Text as typing___Text,
Tuple as typing___Tuple,
cast as typing___cast,
)
@typing_extensions.final
class RPC(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
from typing_extensions import (
Literal as typing_extensions___Literal,
)
class RPC(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
class SubOpts(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
subscribe = ... # type: bool
topicid = ... # type: typing___Text
@typing_extensions.final
class SubOpts(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
SUBSCRIBE_FIELD_NUMBER: builtins.int
TOPICID_FIELD_NUMBER: builtins.int
subscribe: builtins.bool
"""subscribe or unsubscribe"""
topicid: builtins.str
def __init__(
self,
*,
subscribe: typing___Optional[bool] = None,
topicid: typing___Optional[typing___Text] = None,
subscribe: builtins.bool | None = ...,
topicid: builtins.str | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> RPC.SubOpts: ...
def MergeFrom(
self, other_msg: google___protobuf___message___Message
) -> None: ...
def CopyFrom(
self, other_msg: google___protobuf___message___Message
) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["subscribe", "topicid"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["subscribe", "topicid"]
) -> None: ...
else:
def HasField(
self,
field_name: typing_extensions___Literal[
"subscribe", b"subscribe", "topicid", b"topicid"
],
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"subscribe", b"subscribe", "topicid", b"topicid"
],
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["subscribe", b"subscribe", "topicid", b"topicid"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["subscribe", b"subscribe", "topicid", b"topicid"]) -> None: ...
SUBSCRIPTIONS_FIELD_NUMBER: builtins.int
PUBLISH_FIELD_NUMBER: builtins.int
CONTROL_FIELD_NUMBER: builtins.int
@property
def subscriptions(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
RPC.SubOpts
]: ...
def subscriptions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RPC.SubOpts]: ...
@property
def publish(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
Message
]: ...
def publish(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Message]: ...
@property
def control(self) -> ControlMessage: ...
def control(self) -> global___ControlMessage: ...
def __init__(
self,
*,
subscriptions: typing___Optional[typing___Iterable[RPC.SubOpts]] = None,
publish: typing___Optional[typing___Iterable[Message]] = None,
control: typing___Optional[ControlMessage] = None,
subscriptions: collections.abc.Iterable[global___RPC.SubOpts] | None = ...,
publish: collections.abc.Iterable[global___Message] | None = ...,
control: global___ControlMessage | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> RPC: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["control"]
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"control", "publish", "subscriptions"
],
) -> None: ...
else:
def HasField(
self, field_name: typing_extensions___Literal["control", b"control"]
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"control",
b"control",
"publish",
b"publish",
"subscriptions",
b"subscriptions",
],
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["control", b"control"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["control", b"control", "publish", b"publish", "subscriptions", b"subscriptions"]) -> None: ...
class Message(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
from_id = ... # type: bytes
data = ... # type: bytes
seqno = ... # type: bytes
topicIDs = (
...
) # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text]
signature = ... # type: bytes
key = ... # type: bytes
global___RPC = RPC
def __init__(
self,
*,
from_id: typing___Optional[bytes] = None,
data: typing___Optional[bytes] = None,
seqno: typing___Optional[bytes] = None,
topicIDs: typing___Optional[typing___Iterable[typing___Text]] = None,
signature: typing___Optional[bytes] = None,
key: typing___Optional[bytes] = None,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> Message: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def HasField(
self,
field_name: typing_extensions___Literal[
"data", "from_id", "key", "seqno", "signature"
],
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"data", "from_id", "key", "seqno", "signature", "topicIDs"
],
) -> None: ...
else:
def HasField(
self,
field_name: typing_extensions___Literal[
"data",
b"data",
"from_id",
b"from_id",
"key",
b"key",
"seqno",
b"seqno",
"signature",
b"signature",
],
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"data",
b"data",
"from_id",
b"from_id",
"key",
b"key",
"seqno",
b"seqno",
"signature",
b"signature",
"topicIDs",
b"topicIDs",
],
) -> None: ...
class ControlMessage(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
@typing_extensions.final
class Message(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FROM_ID_FIELD_NUMBER: builtins.int
DATA_FIELD_NUMBER: builtins.int
SEQNO_FIELD_NUMBER: builtins.int
TOPICIDS_FIELD_NUMBER: builtins.int
SIGNATURE_FIELD_NUMBER: builtins.int
KEY_FIELD_NUMBER: builtins.int
from_id: builtins.bytes
data: builtins.bytes
seqno: builtins.bytes
@property
def ihave(
def topicIDs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
signature: builtins.bytes
key: builtins.bytes
def __init__(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
ControlIHave
]: ...
*,
from_id: builtins.bytes | None = ...,
data: builtins.bytes | None = ...,
seqno: builtins.bytes | None = ...,
topicIDs: collections.abc.Iterable[builtins.str] | None = ...,
signature: builtins.bytes | None = ...,
key: builtins.bytes | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["data", b"data", "from_id", b"from_id", "key", b"key", "seqno", b"seqno", "signature", b"signature"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "from_id", b"from_id", "key", b"key", "seqno", b"seqno", "signature", b"signature", "topicIDs", b"topicIDs"]) -> None: ...
global___Message = Message
@typing_extensions.final
class ControlMessage(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
IHAVE_FIELD_NUMBER: builtins.int
IWANT_FIELD_NUMBER: builtins.int
GRAFT_FIELD_NUMBER: builtins.int
PRUNE_FIELD_NUMBER: builtins.int
@property
def iwant(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
ControlIWant
]: ...
def ihave(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlIHave]: ...
@property
def graft(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
ControlGraft
]: ...
def iwant(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlIWant]: ...
@property
def prune(
self,
) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[
ControlPrune
]: ...
def graft(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlGraft]: ...
@property
def prune(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ControlPrune]: ...
def __init__(
self,
*,
ihave: typing___Optional[typing___Iterable[ControlIHave]] = None,
iwant: typing___Optional[typing___Iterable[ControlIWant]] = None,
graft: typing___Optional[typing___Iterable[ControlGraft]] = None,
prune: typing___Optional[typing___Iterable[ControlPrune]] = None,
ihave: collections.abc.Iterable[global___ControlIHave] | None = ...,
iwant: collections.abc.Iterable[global___ControlIWant] | None = ...,
graft: collections.abc.Iterable[global___ControlGraft] | None = ...,
prune: collections.abc.Iterable[global___ControlPrune] | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> ControlMessage: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def ClearField(
self,
field_name: typing_extensions___Literal["graft", "ihave", "iwant", "prune"],
) -> None: ...
else:
def ClearField(
self,
field_name: typing_extensions___Literal[
"graft",
b"graft",
"ihave",
b"ihave",
"iwant",
b"iwant",
"prune",
b"prune",
],
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["graft", b"graft", "ihave", b"ihave", "iwant", b"iwant", "prune", b"prune"]) -> None: ...
class ControlIHave(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
topicID = ... # type: typing___Text
messageIDs = (
...
) # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text]
global___ControlMessage = ControlMessage
@typing_extensions.final
class ControlIHave(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
TOPICID_FIELD_NUMBER: builtins.int
MESSAGEIDS_FIELD_NUMBER: builtins.int
topicID: builtins.str
@property
def messageIDs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def __init__(
self,
*,
topicID: typing___Optional[typing___Text] = None,
messageIDs: typing___Optional[typing___Iterable[typing___Text]] = None,
topicID: builtins.str | None = ...,
messageIDs: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> ControlIHave: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["topicID"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["messageIDs", "topicID"]
) -> None: ...
else:
def HasField(
self, field_name: typing_extensions___Literal["topicID", b"topicID"]
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"messageIDs", b"messageIDs", "topicID", b"topicID"
],
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["topicID", b"topicID"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["messageIDs", b"messageIDs", "topicID", b"topicID"]) -> None: ...
class ControlIWant(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
messageIDs = (
...
) # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text]
global___ControlIHave = ControlIHave
@typing_extensions.final
class ControlIWant(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
MESSAGEIDS_FIELD_NUMBER: builtins.int
@property
def messageIDs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def __init__(
self,
*,
messageIDs: typing___Optional[typing___Iterable[typing___Text]] = None,
messageIDs: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> ControlIWant: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def ClearField(
self, field_name: typing_extensions___Literal["messageIDs"]
) -> None: ...
else:
def ClearField(
self, field_name: typing_extensions___Literal["messageIDs", b"messageIDs"]
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["messageIDs", b"messageIDs"]) -> None: ...
class ControlGraft(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
topicID = ... # type: typing___Text
global___ControlIWant = ControlIWant
@typing_extensions.final
class ControlGraft(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
TOPICID_FIELD_NUMBER: builtins.int
topicID: builtins.str
def __init__(
self,
*,
topicID: typing___Optional[typing___Text] = None,
topicID: builtins.str | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> ControlGraft: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["topicID"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["topicID"]
) -> None: ...
else:
def HasField(
self, field_name: typing_extensions___Literal["topicID", b"topicID"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["topicID", b"topicID"]
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["topicID", b"topicID"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["topicID", b"topicID"]) -> None: ...
class ControlPrune(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
topicID = ... # type: typing___Text
global___ControlGraft = ControlGraft
@typing_extensions.final
class ControlPrune(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
TOPICID_FIELD_NUMBER: builtins.int
topicID: builtins.str
def __init__(
self,
*,
topicID: typing___Optional[typing___Text] = None,
topicID: builtins.str | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> ControlPrune: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["topicID"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["topicID"]
) -> None: ...
else:
def HasField(
self, field_name: typing_extensions___Literal["topicID", b"topicID"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["topicID", b"topicID"]
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["topicID", b"topicID"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["topicID", b"topicID"]) -> None: ...
class TopicDescriptor(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
global___ControlPrune = ControlPrune
class AuthOpts(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
@typing_extensions.final
class TopicDescriptor(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class AuthMode(int):
DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ...
@classmethod
def Name(cls, number: int) -> str: ...
@classmethod
def Value(cls, name: str) -> TopicDescriptor.AuthOpts.AuthMode: ...
@classmethod
def keys(cls) -> typing___List[str]: ...
@classmethod
def values(cls) -> typing___List[TopicDescriptor.AuthOpts.AuthMode]: ...
@classmethod
def items(
cls,
) -> typing___List[
typing___Tuple[str, TopicDescriptor.AuthOpts.AuthMode]
]: ...
NONE = typing___cast(TopicDescriptor.AuthOpts.AuthMode, 0)
KEY = typing___cast(TopicDescriptor.AuthOpts.AuthMode, 1)
WOT = typing___cast(TopicDescriptor.AuthOpts.AuthMode, 2)
NONE = typing___cast(TopicDescriptor.AuthOpts.AuthMode, 0)
KEY = typing___cast(TopicDescriptor.AuthOpts.AuthMode, 1)
WOT = typing___cast(TopicDescriptor.AuthOpts.AuthMode, 2)
@typing_extensions.final
class AuthOpts(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
mode = ... # type: TopicDescriptor.AuthOpts.AuthMode
keys = (
...
) # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[bytes]
class _AuthMode:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
class _AuthModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[TopicDescriptor.AuthOpts._AuthMode.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
NONE: TopicDescriptor.AuthOpts._AuthMode.ValueType # 0
"""no authentication, anyone can publish"""
KEY: TopicDescriptor.AuthOpts._AuthMode.ValueType # 1
"""only messages signed by keys in the topic descriptor are accepted"""
WOT: TopicDescriptor.AuthOpts._AuthMode.ValueType # 2
"""web of trust, certificates can allow publisher set to grow"""
class AuthMode(_AuthMode, metaclass=_AuthModeEnumTypeWrapper): ...
NONE: TopicDescriptor.AuthOpts.AuthMode.ValueType # 0
"""no authentication, anyone can publish"""
KEY: TopicDescriptor.AuthOpts.AuthMode.ValueType # 1
"""only messages signed by keys in the topic descriptor are accepted"""
WOT: TopicDescriptor.AuthOpts.AuthMode.ValueType # 2
"""web of trust, certificates can allow publisher set to grow"""
MODE_FIELD_NUMBER: builtins.int
KEYS_FIELD_NUMBER: builtins.int
mode: global___TopicDescriptor.AuthOpts.AuthMode.ValueType
@property
def keys(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
"""root keys to trust"""
def __init__(
self,
*,
mode: typing___Optional[TopicDescriptor.AuthOpts.AuthMode] = None,
keys: typing___Optional[typing___Iterable[bytes]] = None,
mode: global___TopicDescriptor.AuthOpts.AuthMode.ValueType | None = ...,
keys: collections.abc.Iterable[builtins.bytes] | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> TopicDescriptor.AuthOpts: ...
def MergeFrom(
self, other_msg: google___protobuf___message___Message
) -> None: ...
def CopyFrom(
self, other_msg: google___protobuf___message___Message
) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["mode"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["keys", "mode"]
) -> None: ...
else:
def HasField(
self, field_name: typing_extensions___Literal["mode", b"mode"]
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"keys", b"keys", "mode", b"mode"
],
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["mode", b"mode"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["keys", b"keys", "mode", b"mode"]) -> None: ...
class EncOpts(google___protobuf___message___Message):
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
@typing_extensions.final
class EncOpts(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class EncMode(int):
DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ...
@classmethod
def Name(cls, number: int) -> str: ...
@classmethod
def Value(cls, name: str) -> TopicDescriptor.EncOpts.EncMode: ...
@classmethod
def keys(cls) -> typing___List[str]: ...
@classmethod
def values(cls) -> typing___List[TopicDescriptor.EncOpts.EncMode]: ...
@classmethod
def items(
cls,
) -> typing___List[
typing___Tuple[str, TopicDescriptor.EncOpts.EncMode]
]: ...
NONE = typing___cast(TopicDescriptor.EncOpts.EncMode, 0)
SHAREDKEY = typing___cast(TopicDescriptor.EncOpts.EncMode, 1)
WOT = typing___cast(TopicDescriptor.EncOpts.EncMode, 2)
NONE = typing___cast(TopicDescriptor.EncOpts.EncMode, 0)
SHAREDKEY = typing___cast(TopicDescriptor.EncOpts.EncMode, 1)
WOT = typing___cast(TopicDescriptor.EncOpts.EncMode, 2)
class _EncMode:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
mode = ... # type: TopicDescriptor.EncOpts.EncMode
keyHashes = (
...
) # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[bytes]
class _EncModeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[TopicDescriptor.EncOpts._EncMode.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
NONE: TopicDescriptor.EncOpts._EncMode.ValueType # 0
"""no encryption, anyone can read"""
SHAREDKEY: TopicDescriptor.EncOpts._EncMode.ValueType # 1
"""messages are encrypted with shared key"""
WOT: TopicDescriptor.EncOpts._EncMode.ValueType # 2
"""web of trust, certificates can allow publisher set to grow"""
class EncMode(_EncMode, metaclass=_EncModeEnumTypeWrapper): ...
NONE: TopicDescriptor.EncOpts.EncMode.ValueType # 0
"""no encryption, anyone can read"""
SHAREDKEY: TopicDescriptor.EncOpts.EncMode.ValueType # 1
"""messages are encrypted with shared key"""
WOT: TopicDescriptor.EncOpts.EncMode.ValueType # 2
"""web of trust, certificates can allow publisher set to grow"""
MODE_FIELD_NUMBER: builtins.int
KEYHASHES_FIELD_NUMBER: builtins.int
mode: global___TopicDescriptor.EncOpts.EncMode.ValueType
@property
def keyHashes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
"""the hashes of the shared keys used (salted)"""
def __init__(
self,
*,
mode: typing___Optional[TopicDescriptor.EncOpts.EncMode] = None,
keyHashes: typing___Optional[typing___Iterable[bytes]] = None,
mode: global___TopicDescriptor.EncOpts.EncMode.ValueType | None = ...,
keyHashes: collections.abc.Iterable[builtins.bytes] | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> TopicDescriptor.EncOpts: ...
def MergeFrom(
self, other_msg: google___protobuf___message___Message
) -> None: ...
def CopyFrom(
self, other_msg: google___protobuf___message___Message
) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["mode"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["keyHashes", "mode"]
) -> None: ...
else:
def HasField(
self, field_name: typing_extensions___Literal["mode", b"mode"]
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"keyHashes", b"keyHashes", "mode", b"mode"
],
) -> None: ...
name = ... # type: typing___Text
def HasField(self, field_name: typing_extensions.Literal["mode", b"mode"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["keyHashes", b"keyHashes", "mode", b"mode"]) -> None: ...
NAME_FIELD_NUMBER: builtins.int
AUTH_FIELD_NUMBER: builtins.int
ENC_FIELD_NUMBER: builtins.int
name: builtins.str
@property
def auth(self) -> TopicDescriptor.AuthOpts: ...
def auth(self) -> global___TopicDescriptor.AuthOpts: ...
@property
def enc(self) -> TopicDescriptor.EncOpts: ...
def enc(self) -> global___TopicDescriptor.EncOpts: ...
def __init__(
self,
*,
name: typing___Optional[typing___Text] = None,
auth: typing___Optional[TopicDescriptor.AuthOpts] = None,
enc: typing___Optional[TopicDescriptor.EncOpts] = None,
name: builtins.str | None = ...,
auth: global___TopicDescriptor.AuthOpts | None = ...,
enc: global___TopicDescriptor.EncOpts | None = ...,
) -> None: ...
@classmethod
def FromString(cls, s: bytes) -> TopicDescriptor: ...
def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
if sys.version_info >= (3,):
def HasField(
self, field_name: typing_extensions___Literal["auth", "enc", "name"]
) -> bool: ...
def ClearField(
self, field_name: typing_extensions___Literal["auth", "enc", "name"]
) -> None: ...
else:
def HasField(
self,
field_name: typing_extensions___Literal[
"auth", b"auth", "enc", b"enc", "name", b"name"
],
) -> bool: ...
def ClearField(
self,
field_name: typing_extensions___Literal[
"auth", b"auth", "enc", b"enc", "name", b"name"
],
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["auth", b"auth", "enc", b"enc", "name", b"name"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["auth", b"auth", "enc", b"enc", "name", b"name"]) -> None: ...
global___TopicDescriptor = TopicDescriptor