From 4be9fbe944ddb4a9f2684c8306b0793bb5a113d1 Mon Sep 17 00:00:00 2001 From: Damien Whitten Date: Tue, 25 Mar 2025 12:37:40 +1100 Subject: [PATCH] New Annotations --- gen/j5/config/v1/config_j5pb/bundle.pb.go | 5 +- gen/j5/config/v1/config_j5pb/input.pb.go | 5 +- gen/j5/config/v1/config_j5pb/lock.pb.go | 5 +- gen/j5/config/v1/config_j5pb/mods.pb.go | 5 +- gen/j5/config/v1/config_j5pb/plugin.pb.go | 5 +- gen/j5/config/v1/config_j5pb/repo.pb.go | 5 +- .../v1/sourcedef_j5pb/annotations.pb.go | 5 +- gen/j5/sourcedef/v1/sourcedef_j5pb/file.pb.go | 750 ++++++++++++------ .../v1/sourcedef_j5pb/file_sugar.pb.go | 10 + gen/test/foo/v1/foo_testpb/foo.pb.go | 5 +- gen/test/foo/v1/foo_testpb/foo_sugar.pb.go | 1 - gen/test/foo/v1/foo_testspb/foo_service.pb.go | 5 +- .../schema/v1/schema_testpb/full_schema.pb.go | 5 +- go.mod | 13 +- go.sum | 30 +- internal/bcl/sourcewalk/entity.go | 70 +- internal/bcl/sourcewalk/topic.go | 23 +- internal/cli/cli.go | 3 + internal/cli/generate.go | 13 +- internal/cli/j5s.go | 34 +- j5.yaml | 5 +- j5stest/gen/j5st/v1/j5st_pb/foo.j5s.pb.go | 706 +++++++++++++++++ .../gen/j5st/v1/j5st_pb/foo.j5s_sugar.pb.go | 110 +++ j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s.pb.go | 569 +++++++++++++ .../j5st/v1/j5st_spb/foo.p.j5s_sugar.pb.go | 3 + j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s.pb.go | 326 ++++++++ .../v1/j5st_tpb/foo.p.j5s_o5_messaging.pb.go | 178 +++++ .../j5st/v1/j5st_tpb/foo.p.j5s_sugar.pb.go | 3 + j5stest/j5.yaml | 50 +- j5stest/proto/j5.bundle.yaml | 9 + j5stest/{foo => proto/j5st}/v1/foo.j5s | 6 +- j5stest/{foo => proto/j5st}/v1/foo.j5s.proto | 2 +- .../j5st}/v1/service/foo.p.j5s.proto | 16 +- .../j5st}/v1/topic/foo.p.j5s.proto | 38 +- proto/j5build/j5/sourcedef/v1/file.proto | 35 +- 35 files changed, 2707 insertions(+), 346 deletions(-) create mode 100644 j5stest/gen/j5st/v1/j5st_pb/foo.j5s.pb.go create mode 100644 j5stest/gen/j5st/v1/j5st_pb/foo.j5s_sugar.pb.go create mode 100644 j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s.pb.go create mode 100644 j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s_sugar.pb.go create mode 100644 j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s.pb.go create mode 100644 j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_o5_messaging.pb.go create mode 100644 j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_sugar.pb.go create mode 100644 j5stest/proto/j5.bundle.yaml rename j5stest/{foo => proto/j5st}/v1/foo.j5s (77%) rename j5stest/{foo => proto/j5st}/v1/foo.j5s.proto (99%) rename j5stest/{foo => proto/j5st}/v1/service/foo.p.j5s.proto (82%) rename j5stest/{foo => proto/j5st}/v1/topic/foo.p.j5s.proto (57%) diff --git a/gen/j5/config/v1/config_j5pb/bundle.pb.go b/gen/j5/config/v1/config_j5pb/bundle.pb.go index ca3d690..0bcb25f 100644 --- a/gen/j5/config/v1/config_j5pb/bundle.pb.go +++ b/gen/j5/config/v1/config_j5pb/bundle.pb.go @@ -7,11 +7,10 @@ package config_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/config/v1/config_j5pb/input.pb.go b/gen/j5/config/v1/config_j5pb/input.pb.go index 198da94..79ef254 100644 --- a/gen/j5/config/v1/config_j5pb/input.pb.go +++ b/gen/j5/config/v1/config_j5pb/input.pb.go @@ -7,11 +7,10 @@ package config_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/config/v1/config_j5pb/lock.pb.go b/gen/j5/config/v1/config_j5pb/lock.pb.go index e31a1c2..bd3f7dc 100644 --- a/gen/j5/config/v1/config_j5pb/lock.pb.go +++ b/gen/j5/config/v1/config_j5pb/lock.pb.go @@ -7,11 +7,10 @@ package config_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/config/v1/config_j5pb/mods.pb.go b/gen/j5/config/v1/config_j5pb/mods.pb.go index 9ce826a..e7490c4 100644 --- a/gen/j5/config/v1/config_j5pb/mods.pb.go +++ b/gen/j5/config/v1/config_j5pb/mods.pb.go @@ -7,11 +7,10 @@ package config_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/config/v1/config_j5pb/plugin.pb.go b/gen/j5/config/v1/config_j5pb/plugin.pb.go index 6afee05..af5620c 100644 --- a/gen/j5/config/v1/config_j5pb/plugin.pb.go +++ b/gen/j5/config/v1/config_j5pb/plugin.pb.go @@ -7,11 +7,10 @@ package config_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/config/v1/config_j5pb/repo.pb.go b/gen/j5/config/v1/config_j5pb/repo.pb.go index f0a559a..308213e 100644 --- a/gen/j5/config/v1/config_j5pb/repo.pb.go +++ b/gen/j5/config/v1/config_j5pb/repo.pb.go @@ -7,11 +7,10 @@ package config_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/sourcedef/v1/sourcedef_j5pb/annotations.pb.go b/gen/j5/sourcedef/v1/sourcedef_j5pb/annotations.pb.go index 39b03f1..e06884f 100644 --- a/gen/j5/sourcedef/v1/sourcedef_j5pb/annotations.pb.go +++ b/gen/j5/sourcedef/v1/sourcedef_j5pb/annotations.pb.go @@ -7,12 +7,11 @@ package sourcedef_j5pb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/j5/sourcedef/v1/sourcedef_j5pb/file.pb.go b/gen/j5/sourcedef/v1/sourcedef_j5pb/file.pb.go index 22344b9..02b731c 100644 --- a/gen/j5/sourcedef/v1/sourcedef_j5pb/file.pb.go +++ b/gen/j5/sourcedef/v1/sourcedef_j5pb/file.pb.go @@ -7,9 +7,6 @@ package sourcedef_j5pb import ( - reflect "reflect" - sync "sync" - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" bcl_j5pb "github.com/pentops/bcl.go/gen/j5/bcl/v1/bcl_j5pb" auth_j5pb "github.com/pentops/j5/gen/j5/auth/v1/auth_j5pb" @@ -19,6 +16,8 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" _ "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" ) const ( @@ -360,6 +359,7 @@ type Entity struct { Events []*Object `protobuf:"bytes,6,rep,name=events,proto3" json:"events,omitempty"` Schemas []*NestedSchema `protobuf:"bytes,7,rep,name=schemas,proto3" json:"schemas,omitempty"` Commands []*Service `protobuf:"bytes,8,rep,name=commands,proto3" json:"commands,omitempty"` + Summaries []*EntitySummary `protobuf:"bytes,10,rep,name=summaries,proto3" json:"summaries,omitempty"` } func (x *Entity) Reset() { @@ -457,6 +457,13 @@ func (x *Entity) GetCommands() []*Service { return nil } +func (x *Entity) GetSummaries() []*EntitySummary { + if x != nil { + return x.Summaries + } + return nil +} + type APIMethod struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -688,6 +695,71 @@ func (x *Service) GetOptions() *ext_j5pb.ServiceOptions { return nil } +// A Topic to publish the entity state as an 'upsert', allowing other services +// to track the state without the full event history. +type EntitySummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Fields []*schema_j5pb.ObjectProperty `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty"` +} + +func (x *EntitySummary) Reset() { + *x = EntitySummary{} + if protoimpl.UnsafeEnabled { + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntitySummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntitySummary) ProtoMessage() {} + +func (x *EntitySummary) ProtoReflect() protoreflect.Message { + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntitySummary.ProtoReflect.Descriptor instead. +func (*EntitySummary) Descriptor() ([]byte, []int) { + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{8} +} + +func (x *EntitySummary) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EntitySummary) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *EntitySummary) GetFields() []*schema_j5pb.ObjectProperty { + if x != nil { + return x.Fields + } + return nil +} + type NestedSchema struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -704,7 +776,7 @@ type NestedSchema struct { func (x *NestedSchema) Reset() { *x = NestedSchema{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[8] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -717,7 +789,7 @@ func (x *NestedSchema) String() string { func (*NestedSchema) ProtoMessage() {} func (x *NestedSchema) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[8] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -730,7 +802,7 @@ func (x *NestedSchema) ProtoReflect() protoreflect.Message { // Deprecated: Use NestedSchema.ProtoReflect.Descriptor instead. func (*NestedSchema) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{8} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{9} } func (m *NestedSchema) GetType() isNestedSchema_Type { @@ -788,22 +860,21 @@ type EntityKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Def *schema_j5pb.ObjectProperty `protobuf:"bytes,1,opt,name=def,proto3" json:"def,omitempty"` - // When true, this field will be added included in all endpoints to identify - // the DB shard. - // The field must be required - // If it is a primary key, the Get and GetEvents endpoints are not modified, - // but it is added to the ListEvents endpoint. - // If it is not a primary key, it is added to all endpoints. - // The order in the path, like primary keys, is defined by the lexical order - // of the fields in the source file. - ShardKey bool `protobuf:"varint,2,opt,name=shard_key,json=shardKey,proto3" json:"shard_key,omitempty"` + Def *schema_j5pb.ObjectProperty `protobuf:"bytes,1,opt,name=def,proto3" json:"def,omitempty"` + ShardKey bool `protobuf:"varint,2,opt,name=shard_key,json=shardKey,proto3" json:"shard_key,omitempty"` + // Marks the key as participating in the primary key of this entity + PrimaryKey bool `protobuf:"varint,3,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` + // Marks the field as a foreign key to the given entity. + ForeignKey *schema_j5pb.EntityRef `protobuf:"bytes,4,opt,name=foreign_key,json=foreignKey,proto3" json:"foreign_key,omitempty"` + // Marks the field as containing a tenant_id for the given tenant. Copies to + // j5.state.v1.PublishAuth.tenant_keys on publish + TenantType *string `protobuf:"bytes,5,opt,name=tenant_type,json=tenantType,proto3,oneof" json:"tenant_type,omitempty"` } func (x *EntityKey) Reset() { *x = EntityKey{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[9] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -816,7 +887,7 @@ func (x *EntityKey) String() string { func (*EntityKey) ProtoMessage() {} func (x *EntityKey) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[9] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -829,7 +900,7 @@ func (x *EntityKey) ProtoReflect() protoreflect.Message { // Deprecated: Use EntityKey.ProtoReflect.Descriptor instead. func (*EntityKey) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{9} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{10} } func (x *EntityKey) GetDef() *schema_j5pb.ObjectProperty { @@ -846,6 +917,27 @@ func (x *EntityKey) GetShardKey() bool { return false } +func (x *EntityKey) GetPrimaryKey() bool { + if x != nil { + return x.PrimaryKey + } + return false +} + +func (x *EntityKey) GetForeignKey() *schema_j5pb.EntityRef { + if x != nil { + return x.ForeignKey + } + return nil +} + +func (x *EntityKey) GetTenantType() string { + if x != nil && x.TenantType != nil { + return *x.TenantType + } + return "" +} + type Oneof struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -858,7 +950,7 @@ type Oneof struct { func (x *Oneof) Reset() { *x = Oneof{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[10] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -871,7 +963,7 @@ func (x *Oneof) String() string { func (*Oneof) ProtoMessage() {} func (x *Oneof) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[10] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -884,7 +976,7 @@ func (x *Oneof) ProtoReflect() protoreflect.Message { // Deprecated: Use Oneof.ProtoReflect.Descriptor instead. func (*Oneof) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{10} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{11} } func (x *Oneof) GetDef() *schema_j5pb.Oneof { @@ -913,7 +1005,7 @@ type Object struct { func (x *Object) Reset() { *x = Object{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[11] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -926,7 +1018,7 @@ func (x *Object) String() string { func (*Object) ProtoMessage() {} func (x *Object) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[11] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -939,7 +1031,7 @@ func (x *Object) ProtoReflect() protoreflect.Message { // Deprecated: Use Object.ProtoReflect.Descriptor instead. func (*Object) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{11} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{12} } func (x *Object) GetDef() *schema_j5pb.Object { @@ -967,7 +1059,7 @@ type EntityElement struct { func (x *EntityElement) Reset() { *x = EntityElement{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[12] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -980,7 +1072,7 @@ func (x *EntityElement) String() string { func (*EntityElement) ProtoMessage() {} func (x *EntityElement) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[12] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -993,7 +1085,7 @@ func (x *EntityElement) ProtoReflect() protoreflect.Message { // Deprecated: Use EntityElement.ProtoReflect.Descriptor instead. func (*EntityElement) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{12} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{13} } func (x *EntityElement) GetEntity() *Entity { @@ -1016,7 +1108,7 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[13] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1029,7 +1121,7 @@ func (x *Topic) String() string { func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[13] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1042,7 +1134,7 @@ func (x *Topic) ProtoReflect() protoreflect.Message { // Deprecated: Use Topic.ProtoReflect.Descriptor instead. func (*Topic) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{13} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{14} } func (x *Topic) GetName() string { @@ -1076,13 +1168,14 @@ type TopicType struct { // *TopicType_Publish_ // *TopicType_Reqres // *TopicType_Upsert_ + // *TopicType_Event_ Type isTopicType_Type `protobuf_oneof:"type"` } func (x *TopicType) Reset() { *x = TopicType{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[14] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1095,7 +1188,7 @@ func (x *TopicType) String() string { func (*TopicType) ProtoMessage() {} func (x *TopicType) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[14] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1108,7 +1201,7 @@ func (x *TopicType) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicType.ProtoReflect.Descriptor instead. func (*TopicType) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{14} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{15} } func (m *TopicType) GetType() isTopicType_Type { @@ -1139,6 +1232,13 @@ func (x *TopicType) GetUpsert() *TopicType_Upsert { return nil } +func (x *TopicType) GetEvent() *TopicType_Event { + if x, ok := x.GetType().(*TopicType_Event_); ok { + return x.Event + } + return nil +} + type isTopicType_Type interface { isTopicType_Type() } @@ -1155,12 +1255,18 @@ type TopicType_Upsert_ struct { Upsert *TopicType_Upsert `protobuf:"bytes,3,opt,name=upsert,proto3,oneof"` } +type TopicType_Event_ struct { + Event *TopicType_Event `protobuf:"bytes,4,opt,name=event,proto3,oneof"` +} + func (*TopicType_Publish_) isTopicType_Type() {} func (*TopicType_Reqres) isTopicType_Type() {} func (*TopicType_Upsert_) isTopicType_Type() {} +func (*TopicType_Event_) isTopicType_Type() {} + type TopicMethod struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1174,7 +1280,7 @@ type TopicMethod struct { func (x *TopicMethod) Reset() { *x = TopicMethod{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[15] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1187,7 +1293,7 @@ func (x *TopicMethod) String() string { func (*TopicMethod) ProtoMessage() {} func (x *TopicMethod) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[15] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1200,7 +1306,7 @@ func (x *TopicMethod) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicMethod.ProtoReflect.Descriptor instead. func (*TopicMethod) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{15} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{16} } func (x *TopicMethod) GetName() string { @@ -1235,7 +1341,7 @@ type TopicType_Publish struct { func (x *TopicType_Publish) Reset() { *x = TopicType_Publish{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[16] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1248,7 +1354,7 @@ func (x *TopicType_Publish) String() string { func (*TopicType_Publish) ProtoMessage() {} func (x *TopicType_Publish) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[16] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1261,7 +1367,7 @@ func (x *TopicType_Publish) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicType_Publish.ProtoReflect.Descriptor instead. func (*TopicType_Publish) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{14, 0} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{15, 0} } func (x *TopicType_Publish) GetMessages() []*TopicMethod { @@ -1283,7 +1389,7 @@ type TopicType_ReqRes struct { func (x *TopicType_ReqRes) Reset() { *x = TopicType_ReqRes{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[17] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1296,7 +1402,7 @@ func (x *TopicType_ReqRes) String() string { func (*TopicType_ReqRes) ProtoMessage() {} func (x *TopicType_ReqRes) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[17] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1309,7 +1415,7 @@ func (x *TopicType_ReqRes) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicType_ReqRes.ProtoReflect.Descriptor instead. func (*TopicType_ReqRes) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{14, 1} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{15, 1} } func (x *TopicType_ReqRes) GetRequest() []*TopicMethod { @@ -1331,13 +1437,14 @@ type TopicType_Upsert struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Message *TopicMethod `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` + Message *TopicMethod `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (x *TopicType_Upsert) Reset() { *x = TopicType_Upsert{} if protoimpl.UnsafeEnabled { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[18] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1350,7 +1457,7 @@ func (x *TopicType_Upsert) String() string { func (*TopicType_Upsert) ProtoMessage() {} func (x *TopicType_Upsert) ProtoReflect() protoreflect.Message { - mi := &file_j5_sourcedef_v1_file_proto_msgTypes[18] + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1363,7 +1470,14 @@ func (x *TopicType_Upsert) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicType_Upsert.ProtoReflect.Descriptor instead. func (*TopicType_Upsert) Descriptor() ([]byte, []int) { - return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{14, 2} + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{15, 2} +} + +func (x *TopicType_Upsert) GetEntityName() string { + if x != nil { + return x.EntityName + } + return "" } func (x *TopicType_Upsert) GetMessage() *TopicMethod { @@ -1373,6 +1487,61 @@ func (x *TopicType_Upsert) GetMessage() *TopicMethod { return nil } +type TopicType_Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` + Message *TopicMethod `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *TopicType_Event) Reset() { + *x = TopicType_Event{} + if protoimpl.UnsafeEnabled { + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopicType_Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopicType_Event) ProtoMessage() {} + +func (x *TopicType_Event) ProtoReflect() protoreflect.Message { + mi := &file_j5_sourcedef_v1_file_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TopicType_Event.ProtoReflect.Descriptor instead. +func (*TopicType_Event) Descriptor() ([]byte, []int) { + return file_j5_sourcedef_v1_file_proto_rawDescGZIP(), []int{15, 3} +} + +func (x *TopicType_Event) GetEntityName() string { + if x != nil { + return x.EntityName + } + return "" +} + +func (x *TopicType_Event) GetMessage() *TopicMethod { + if x != nil { + return x.Message + } + return nil +} + var File_j5_sourcedef_v1_file_proto protoreflect.FileDescriptor var file_j5_sourcedef_v1_file_proto_rawDesc = []byte{ @@ -1434,7 +1603,7 @@ var file_j5_sourcedef_v1_file_proto_rawDesc = []byte{ 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x22, 0xc1, 0x03, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, + 0x70, 0x65, 0x22, 0x92, 0x04, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, @@ -1462,54 +1631,68 @@ var file_j5_sourcedef_v1_file_proto_rawDesc = []byte{ 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x11, 0xc2, 0xff, 0x8e, 0x02, 0x0c, 0xaa, 0x01, 0x09, 0x1a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x93, 0x03, 0x0a, 0x09, 0x41, 0x50, 0x49, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x74, 0x74, - 0x70, 0x50, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6a, - 0x35, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, - 0x20, 0x00, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x42, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x00, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6a, 0x35, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x65, - 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x60, 0x0a, 0x0f, - 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x4d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x42, 0x0f, 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, 0x07, 0x1a, 0x05, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xfa, - 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x50, 0x49, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x42, 0x10, 0xc2, 0xff, 0x8e, 0x02, 0x0b, 0xaa, 0x01, 0x08, 0x1a, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, - 0x33, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x6a, 0x35, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x22, 0xa3, 0x01, 0x0a, 0x0c, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x4f, 0x0a, 0x09, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6a, 0x35, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x11, 0xc2, 0xff, 0x8e, 0x02, 0x0c, + 0xaa, 0x01, 0x09, 0x1a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x09, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x93, 0x03, 0x0a, 0x09, 0x41, 0x50, 0x49, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x74, + 0x74, 0x70, 0x50, 0x61, 0x74, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x6a, 0x35, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, + 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0a, 0xba, 0x48, 0x07, 0x82, 0x01, 0x04, 0x10, + 0x01, 0x20, 0x00, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x42, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, + 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x00, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6a, 0x35, 0x2e, 0x61, 0x75, 0x74, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x41, 0x75, 0x74, 0x68, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, + 0x65, 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x60, 0x0a, + 0x0f, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x4d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x42, 0x0f, 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, 0x07, 0x1a, 0x05, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, + 0xfa, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6a, 0x35, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x50, 0x49, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x10, 0xc2, 0xff, 0x8e, 0x02, 0x0b, 0xaa, 0x01, 0x08, 0x1a, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, + 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x6a, 0x35, 0x2e, 0x65, 0x78, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, + 0x0a, 0x0a, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x22, 0x8c, 0x01, 0x0a, + 0x0d, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x42, 0x0f, 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, 0x07, 0x1a, 0x05, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x0c, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, @@ -1520,89 +1703,110 @@ var file_j5_sourcedef_v1_file_proto_rawDesc = []byte{ 0x28, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x69, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x3f, - 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, - 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x0f, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, 0x08, 0x01, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4b, 0x65, 0x79, 0x22, 0x72, 0x0a, 0x05, - 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x30, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x09, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, - 0x08, 0x01, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, - 0x22, 0x74, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x31, 0x0a, 0x03, 0x64, 0x65, - 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x09, 0xc2, - 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, 0x08, 0x01, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x37, 0x0a, - 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x4b, 0x0a, 0x0d, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x42, 0x09, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, 0x08, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x22, 0x6d, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x22, 0x8a, 0x04, 0x0a, 0x09, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x3e, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x48, 0x00, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x12, 0x3b, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x52, 0x65, 0x71, - 0x52, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x71, 0x72, 0x65, 0x73, 0x12, 0x3b, 0x0a, - 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, - 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x1a, 0x56, 0x0a, 0x07, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x4b, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x11, 0xc2, 0xff, 0x8e, 0x02, 0x0c, 0xaa, 0x01, 0x09, 0x1a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x1a, 0x98, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x71, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x11, 0xc2, 0xff, - 0x8e, 0x02, 0x0c, 0xaa, 0x01, 0x09, 0x1a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, - 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x0f, 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, 0x07, 0x1a, - 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x1a, 0x48, 0x0a, - 0x06, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, - 0xb7, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, - 0x36, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xba, - 0x48, 0x1a, 0x72, 0x18, 0x32, 0x16, 0x5e, 0x5b, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x41, 0x2d, 0x5a, - 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x0f, 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, - 0x07, 0x1a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x6e, 0x74, 0x6f, 0x70, 0x73, 0x2f, - 0x6a, 0x35, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6a, 0x35, 0x2f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x64, 0x65, 0x66, 0x5f, 0x6a, 0x35, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, + 0x3f, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, + 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x0f, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, 0x08, 0x01, 0x52, 0x03, 0x64, 0x65, 0x66, + 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, + 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x38, + 0x0a, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x66, 0x6f, + 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0b, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0a, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0e, + 0x0a, 0x0c, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x72, + 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x30, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x09, 0xc2, 0xff, 0x8e, 0x02, 0x04, + 0x0a, 0x02, 0x08, 0x01, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6a, 0x35, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x22, 0x74, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x31, 0x0a, 0x03, + 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6a, 0x35, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x09, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, 0x08, 0x01, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, + 0x37, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x4b, 0x0a, 0x0d, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x42, 0x09, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x0a, 0x02, 0x08, 0x01, 0x52, 0x06, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x6d, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, + 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x22, 0xcf, 0x05, 0x0a, 0x09, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, + 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x48, 0x00, 0x52, 0x07, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x12, 0x3b, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, + 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x52, + 0x65, 0x71, 0x52, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x71, 0x72, 0x65, 0x73, 0x12, + 0x3b, 0x0a, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x55, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x38, 0x0a, 0x05, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6a, 0x35, + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x56, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x12, 0x4b, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, + 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x42, 0x11, 0xc2, 0xff, 0x8e, 0x02, 0x0c, 0xaa, 0x01, 0x09, 0x1a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x98, + 0x01, 0x0a, 0x06, 0x52, 0x65, 0x71, 0x52, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x11, 0xc2, 0xff, 0x8e, 0x02, 0x0c, 0xaa, + 0x01, 0x09, 0x1a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, + 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x42, 0x0f, 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, 0x07, 0x1a, 0x05, 0x72, 0x65, 0x70, + 0x6c, 0x79, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x1a, 0x69, 0x0a, 0x06, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x1a, 0x68, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x36, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xba, 0x48, 0x1a, 0x72, 0x18, 0x32, 0x16, 0x5e, 0x5b, 0x41, + 0x2d, 0x5a, 0x5d, 0x5b, 0x41, 0x2d, 0x5a, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, + 0x5d, 0x2b, 0x24, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x45, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x0f, + 0xc2, 0xff, 0x8e, 0x02, 0x0a, 0xaa, 0x01, 0x07, 0x1a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x52, + 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x65, 0x6e, 0x74, 0x6f, 0x70, 0x73, 0x2f, 0x6a, 0x35, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x6a, 0x35, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x64, 0x65, 0x66, 0x5f, 0x6a, 0x35, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1617,7 +1821,7 @@ func file_j5_sourcedef_v1_file_proto_rawDescGZIP() []byte { return file_j5_sourcedef_v1_file_proto_rawDescData } -var file_j5_sourcedef_v1_file_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_j5_sourcedef_v1_file_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_j5_sourcedef_v1_file_proto_goTypes = []any{ (*SourceFile)(nil), // 0: j5.sourcedef.v1.SourceFile (*Package)(nil), // 1: j5.sourcedef.v1.Package @@ -1627,76 +1831,84 @@ var file_j5_sourcedef_v1_file_proto_goTypes = []any{ (*APIMethod)(nil), // 5: j5.sourcedef.v1.APIMethod (*AnonymousObject)(nil), // 6: j5.sourcedef.v1.AnonymousObject (*Service)(nil), // 7: j5.sourcedef.v1.Service - (*NestedSchema)(nil), // 8: j5.sourcedef.v1.NestedSchema - (*EntityKey)(nil), // 9: j5.sourcedef.v1.EntityKey - (*Oneof)(nil), // 10: j5.sourcedef.v1.Oneof - (*Object)(nil), // 11: j5.sourcedef.v1.Object - (*EntityElement)(nil), // 12: j5.sourcedef.v1.EntityElement - (*Topic)(nil), // 13: j5.sourcedef.v1.Topic - (*TopicType)(nil), // 14: j5.sourcedef.v1.TopicType - (*TopicMethod)(nil), // 15: j5.sourcedef.v1.TopicMethod - (*TopicType_Publish)(nil), // 16: j5.sourcedef.v1.TopicType.Publish - (*TopicType_ReqRes)(nil), // 17: j5.sourcedef.v1.TopicType.ReqRes - (*TopicType_Upsert)(nil), // 18: j5.sourcedef.v1.TopicType.Upsert - (*bcl_j5pb.SourceLocation)(nil), // 19: j5.bcl.v1.SourceLocation - (*schema_j5pb.Enum)(nil), // 20: j5.schema.v1.Enum - (*schema_j5pb.Enum_Option)(nil), // 21: j5.schema.v1.Enum.Option - (*schema_j5pb.ObjectProperty)(nil), // 22: j5.schema.v1.ObjectProperty - (client_j5pb.HTTPMethod)(0), // 23: j5.client.v1.HTTPMethod - (*auth_j5pb.MethodAuthType)(nil), // 24: j5.auth.v1.MethodAuthType - (*ext_j5pb.MethodOptions)(nil), // 25: j5.ext.v1.MethodOptions - (*ext_j5pb.ServiceOptions)(nil), // 26: j5.ext.v1.ServiceOptions - (*schema_j5pb.Oneof)(nil), // 27: j5.schema.v1.Oneof - (*schema_j5pb.Object)(nil), // 28: j5.schema.v1.Object + (*EntitySummary)(nil), // 8: j5.sourcedef.v1.EntitySummary + (*NestedSchema)(nil), // 9: j5.sourcedef.v1.NestedSchema + (*EntityKey)(nil), // 10: j5.sourcedef.v1.EntityKey + (*Oneof)(nil), // 11: j5.sourcedef.v1.Oneof + (*Object)(nil), // 12: j5.sourcedef.v1.Object + (*EntityElement)(nil), // 13: j5.sourcedef.v1.EntityElement + (*Topic)(nil), // 14: j5.sourcedef.v1.Topic + (*TopicType)(nil), // 15: j5.sourcedef.v1.TopicType + (*TopicMethod)(nil), // 16: j5.sourcedef.v1.TopicMethod + (*TopicType_Publish)(nil), // 17: j5.sourcedef.v1.TopicType.Publish + (*TopicType_ReqRes)(nil), // 18: j5.sourcedef.v1.TopicType.ReqRes + (*TopicType_Upsert)(nil), // 19: j5.sourcedef.v1.TopicType.Upsert + (*TopicType_Event)(nil), // 20: j5.sourcedef.v1.TopicType.Event + (*bcl_j5pb.SourceLocation)(nil), // 21: j5.bcl.v1.SourceLocation + (*schema_j5pb.Enum)(nil), // 22: j5.schema.v1.Enum + (*schema_j5pb.Enum_Option)(nil), // 23: j5.schema.v1.Enum.Option + (*schema_j5pb.ObjectProperty)(nil), // 24: j5.schema.v1.ObjectProperty + (client_j5pb.HTTPMethod)(0), // 25: j5.client.v1.HTTPMethod + (*auth_j5pb.MethodAuthType)(nil), // 26: j5.auth.v1.MethodAuthType + (*ext_j5pb.MethodOptions)(nil), // 27: j5.ext.v1.MethodOptions + (*ext_j5pb.ServiceOptions)(nil), // 28: j5.ext.v1.ServiceOptions + (*schema_j5pb.EntityRef)(nil), // 29: j5.schema.v1.EntityRef + (*schema_j5pb.Oneof)(nil), // 30: j5.schema.v1.Oneof + (*schema_j5pb.Object)(nil), // 31: j5.schema.v1.Object } var file_j5_sourcedef_v1_file_proto_depIdxs = []int32{ 1, // 0: j5.sourcedef.v1.SourceFile.package:type_name -> j5.sourcedef.v1.Package 2, // 1: j5.sourcedef.v1.SourceFile.imports:type_name -> j5.sourcedef.v1.Import 3, // 2: j5.sourcedef.v1.SourceFile.elements:type_name -> j5.sourcedef.v1.RootElement - 19, // 3: j5.sourcedef.v1.SourceFile.source_locations:type_name -> j5.bcl.v1.SourceLocation + 21, // 3: j5.sourcedef.v1.SourceFile.source_locations:type_name -> j5.bcl.v1.SourceLocation 4, // 4: j5.sourcedef.v1.RootElement.entity:type_name -> j5.sourcedef.v1.Entity - 10, // 5: j5.sourcedef.v1.RootElement.oneof:type_name -> j5.sourcedef.v1.Oneof - 11, // 6: j5.sourcedef.v1.RootElement.object:type_name -> j5.sourcedef.v1.Object - 20, // 7: j5.sourcedef.v1.RootElement.enum:type_name -> j5.schema.v1.Enum - 13, // 8: j5.sourcedef.v1.RootElement.topic:type_name -> j5.sourcedef.v1.Topic + 11, // 5: j5.sourcedef.v1.RootElement.oneof:type_name -> j5.sourcedef.v1.Oneof + 12, // 6: j5.sourcedef.v1.RootElement.object:type_name -> j5.sourcedef.v1.Object + 22, // 7: j5.sourcedef.v1.RootElement.enum:type_name -> j5.schema.v1.Enum + 14, // 8: j5.sourcedef.v1.RootElement.topic:type_name -> j5.sourcedef.v1.Topic 7, // 9: j5.sourcedef.v1.RootElement.service:type_name -> j5.sourcedef.v1.Service - 21, // 10: j5.sourcedef.v1.Entity.status:type_name -> j5.schema.v1.Enum.Option - 9, // 11: j5.sourcedef.v1.Entity.keys:type_name -> j5.sourcedef.v1.EntityKey - 22, // 12: j5.sourcedef.v1.Entity.data:type_name -> j5.schema.v1.ObjectProperty - 11, // 13: j5.sourcedef.v1.Entity.events:type_name -> j5.sourcedef.v1.Object - 8, // 14: j5.sourcedef.v1.Entity.schemas:type_name -> j5.sourcedef.v1.NestedSchema + 23, // 10: j5.sourcedef.v1.Entity.status:type_name -> j5.schema.v1.Enum.Option + 10, // 11: j5.sourcedef.v1.Entity.keys:type_name -> j5.sourcedef.v1.EntityKey + 24, // 12: j5.sourcedef.v1.Entity.data:type_name -> j5.schema.v1.ObjectProperty + 12, // 13: j5.sourcedef.v1.Entity.events:type_name -> j5.sourcedef.v1.Object + 9, // 14: j5.sourcedef.v1.Entity.schemas:type_name -> j5.sourcedef.v1.NestedSchema 7, // 15: j5.sourcedef.v1.Entity.commands:type_name -> j5.sourcedef.v1.Service - 23, // 16: j5.sourcedef.v1.APIMethod.http_method:type_name -> j5.client.v1.HTTPMethod - 6, // 17: j5.sourcedef.v1.APIMethod.request:type_name -> j5.sourcedef.v1.AnonymousObject - 6, // 18: j5.sourcedef.v1.APIMethod.response:type_name -> j5.sourcedef.v1.AnonymousObject - 24, // 19: j5.sourcedef.v1.APIMethod.auth:type_name -> j5.auth.v1.MethodAuthType - 25, // 20: j5.sourcedef.v1.APIMethod.options:type_name -> j5.ext.v1.MethodOptions - 22, // 21: j5.sourcedef.v1.AnonymousObject.properties:type_name -> j5.schema.v1.ObjectProperty - 5, // 22: j5.sourcedef.v1.Service.methods:type_name -> j5.sourcedef.v1.APIMethod - 26, // 23: j5.sourcedef.v1.Service.options:type_name -> j5.ext.v1.ServiceOptions - 10, // 24: j5.sourcedef.v1.NestedSchema.oneof:type_name -> j5.sourcedef.v1.Oneof - 11, // 25: j5.sourcedef.v1.NestedSchema.object:type_name -> j5.sourcedef.v1.Object - 20, // 26: j5.sourcedef.v1.NestedSchema.enum:type_name -> j5.schema.v1.Enum - 22, // 27: j5.sourcedef.v1.EntityKey.def:type_name -> j5.schema.v1.ObjectProperty - 27, // 28: j5.sourcedef.v1.Oneof.def:type_name -> j5.schema.v1.Oneof - 8, // 29: j5.sourcedef.v1.Oneof.schemas:type_name -> j5.sourcedef.v1.NestedSchema - 28, // 30: j5.sourcedef.v1.Object.def:type_name -> j5.schema.v1.Object - 8, // 31: j5.sourcedef.v1.Object.schemas:type_name -> j5.sourcedef.v1.NestedSchema - 4, // 32: j5.sourcedef.v1.EntityElement.entity:type_name -> j5.sourcedef.v1.Entity - 14, // 33: j5.sourcedef.v1.Topic.type:type_name -> j5.sourcedef.v1.TopicType - 16, // 34: j5.sourcedef.v1.TopicType.publish:type_name -> j5.sourcedef.v1.TopicType.Publish - 17, // 35: j5.sourcedef.v1.TopicType.reqres:type_name -> j5.sourcedef.v1.TopicType.ReqRes - 18, // 36: j5.sourcedef.v1.TopicType.upsert:type_name -> j5.sourcedef.v1.TopicType.Upsert - 22, // 37: j5.sourcedef.v1.TopicMethod.fields:type_name -> j5.schema.v1.ObjectProperty - 15, // 38: j5.sourcedef.v1.TopicType.Publish.messages:type_name -> j5.sourcedef.v1.TopicMethod - 15, // 39: j5.sourcedef.v1.TopicType.ReqRes.request:type_name -> j5.sourcedef.v1.TopicMethod - 15, // 40: j5.sourcedef.v1.TopicType.ReqRes.reply:type_name -> j5.sourcedef.v1.TopicMethod - 15, // 41: j5.sourcedef.v1.TopicType.Upsert.message:type_name -> j5.sourcedef.v1.TopicMethod - 42, // [42:42] is the sub-list for method output_type - 42, // [42:42] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 8, // 16: j5.sourcedef.v1.Entity.summaries:type_name -> j5.sourcedef.v1.EntitySummary + 25, // 17: j5.sourcedef.v1.APIMethod.http_method:type_name -> j5.client.v1.HTTPMethod + 6, // 18: j5.sourcedef.v1.APIMethod.request:type_name -> j5.sourcedef.v1.AnonymousObject + 6, // 19: j5.sourcedef.v1.APIMethod.response:type_name -> j5.sourcedef.v1.AnonymousObject + 26, // 20: j5.sourcedef.v1.APIMethod.auth:type_name -> j5.auth.v1.MethodAuthType + 27, // 21: j5.sourcedef.v1.APIMethod.options:type_name -> j5.ext.v1.MethodOptions + 24, // 22: j5.sourcedef.v1.AnonymousObject.properties:type_name -> j5.schema.v1.ObjectProperty + 5, // 23: j5.sourcedef.v1.Service.methods:type_name -> j5.sourcedef.v1.APIMethod + 28, // 24: j5.sourcedef.v1.Service.options:type_name -> j5.ext.v1.ServiceOptions + 24, // 25: j5.sourcedef.v1.EntitySummary.fields:type_name -> j5.schema.v1.ObjectProperty + 11, // 26: j5.sourcedef.v1.NestedSchema.oneof:type_name -> j5.sourcedef.v1.Oneof + 12, // 27: j5.sourcedef.v1.NestedSchema.object:type_name -> j5.sourcedef.v1.Object + 22, // 28: j5.sourcedef.v1.NestedSchema.enum:type_name -> j5.schema.v1.Enum + 24, // 29: j5.sourcedef.v1.EntityKey.def:type_name -> j5.schema.v1.ObjectProperty + 29, // 30: j5.sourcedef.v1.EntityKey.foreign_key:type_name -> j5.schema.v1.EntityRef + 30, // 31: j5.sourcedef.v1.Oneof.def:type_name -> j5.schema.v1.Oneof + 9, // 32: j5.sourcedef.v1.Oneof.schemas:type_name -> j5.sourcedef.v1.NestedSchema + 31, // 33: j5.sourcedef.v1.Object.def:type_name -> j5.schema.v1.Object + 9, // 34: j5.sourcedef.v1.Object.schemas:type_name -> j5.sourcedef.v1.NestedSchema + 4, // 35: j5.sourcedef.v1.EntityElement.entity:type_name -> j5.sourcedef.v1.Entity + 15, // 36: j5.sourcedef.v1.Topic.type:type_name -> j5.sourcedef.v1.TopicType + 17, // 37: j5.sourcedef.v1.TopicType.publish:type_name -> j5.sourcedef.v1.TopicType.Publish + 18, // 38: j5.sourcedef.v1.TopicType.reqres:type_name -> j5.sourcedef.v1.TopicType.ReqRes + 19, // 39: j5.sourcedef.v1.TopicType.upsert:type_name -> j5.sourcedef.v1.TopicType.Upsert + 20, // 40: j5.sourcedef.v1.TopicType.event:type_name -> j5.sourcedef.v1.TopicType.Event + 24, // 41: j5.sourcedef.v1.TopicMethod.fields:type_name -> j5.schema.v1.ObjectProperty + 16, // 42: j5.sourcedef.v1.TopicType.Publish.messages:type_name -> j5.sourcedef.v1.TopicMethod + 16, // 43: j5.sourcedef.v1.TopicType.ReqRes.request:type_name -> j5.sourcedef.v1.TopicMethod + 16, // 44: j5.sourcedef.v1.TopicType.ReqRes.reply:type_name -> j5.sourcedef.v1.TopicMethod + 16, // 45: j5.sourcedef.v1.TopicType.Upsert.message:type_name -> j5.sourcedef.v1.TopicMethod + 16, // 46: j5.sourcedef.v1.TopicType.Event.message:type_name -> j5.sourcedef.v1.TopicMethod + 47, // [47:47] is the sub-list for method output_type + 47, // [47:47] is the sub-list for method input_type + 47, // [47:47] is the sub-list for extension type_name + 47, // [47:47] is the sub-list for extension extendee + 0, // [0:47] is the sub-list for field type_name } func init() { file_j5_sourcedef_v1_file_proto_init() } @@ -1802,7 +2014,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*NestedSchema); i { + switch v := v.(*EntitySummary); i { case 0: return &v.state case 1: @@ -1814,7 +2026,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*EntityKey); i { + switch v := v.(*NestedSchema); i { case 0: return &v.state case 1: @@ -1826,7 +2038,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Oneof); i { + switch v := v.(*EntityKey); i { case 0: return &v.state case 1: @@ -1838,7 +2050,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Object); i { + switch v := v.(*Oneof); i { case 0: return &v.state case 1: @@ -1850,7 +2062,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*EntityElement); i { + switch v := v.(*Object); i { case 0: return &v.state case 1: @@ -1862,7 +2074,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { + switch v := v.(*EntityElement); i { case 0: return &v.state case 1: @@ -1874,7 +2086,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*TopicType); i { + switch v := v.(*Topic); i { case 0: return &v.state case 1: @@ -1886,7 +2098,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*TopicMethod); i { + switch v := v.(*TopicType); i { case 0: return &v.state case 1: @@ -1898,7 +2110,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TopicType_Publish); i { + switch v := v.(*TopicMethod); i { case 0: return &v.state case 1: @@ -1910,7 +2122,7 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*TopicType_ReqRes); i { + switch v := v.(*TopicType_Publish); i { case 0: return &v.state case 1: @@ -1922,6 +2134,18 @@ func file_j5_sourcedef_v1_file_proto_init() { } } file_j5_sourcedef_v1_file_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*TopicType_ReqRes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5_sourcedef_v1_file_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*TopicType_Upsert); i { case 0: return &v.state @@ -1933,6 +2157,18 @@ func file_j5_sourcedef_v1_file_proto_init() { return nil } } + file_j5_sourcedef_v1_file_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*TopicType_Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_j5_sourcedef_v1_file_proto_msgTypes[3].OneofWrappers = []any{ (*RootElement_Entity)(nil), @@ -1943,24 +2179,26 @@ func file_j5_sourcedef_v1_file_proto_init() { (*RootElement_Service)(nil), } file_j5_sourcedef_v1_file_proto_msgTypes[7].OneofWrappers = []any{} - file_j5_sourcedef_v1_file_proto_msgTypes[8].OneofWrappers = []any{ + file_j5_sourcedef_v1_file_proto_msgTypes[9].OneofWrappers = []any{ (*NestedSchema_Oneof)(nil), (*NestedSchema_Object)(nil), (*NestedSchema_Enum)(nil), } - file_j5_sourcedef_v1_file_proto_msgTypes[14].OneofWrappers = []any{ + file_j5_sourcedef_v1_file_proto_msgTypes[10].OneofWrappers = []any{} + file_j5_sourcedef_v1_file_proto_msgTypes[15].OneofWrappers = []any{ (*TopicType_Publish_)(nil), (*TopicType_Reqres)(nil), (*TopicType_Upsert_)(nil), + (*TopicType_Event_)(nil), } - file_j5_sourcedef_v1_file_proto_msgTypes[15].OneofWrappers = []any{} + file_j5_sourcedef_v1_file_proto_msgTypes[16].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_j5_sourcedef_v1_file_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/gen/j5/sourcedef/v1/sourcedef_j5pb/file_sugar.pb.go b/gen/j5/sourcedef/v1/sourcedef_j5pb/file_sugar.pb.go index 9adc695..4c93ce1 100644 --- a/gen/j5/sourcedef/v1/sourcedef_j5pb/file_sugar.pb.go +++ b/gen/j5/sourcedef/v1/sourcedef_j5pb/file_sugar.pb.go @@ -16,6 +16,7 @@ const ( Topic_Publish TopicTypeKey = "publish" Topic_Reqres TopicTypeKey = "reqres" Topic_Upsert TopicTypeKey = "upsert" + Topic_Event TopicTypeKey = "event" ) func (x *TopicType) TypeKey() (TopicTypeKey, bool) { @@ -26,6 +27,8 @@ func (x *TopicType) TypeKey() (TopicTypeKey, bool) { return Topic_Reqres, true case *TopicType_Upsert_: return Topic_Upsert, true + case *TopicType_Event_: + return Topic_Event, true default: return "", false } @@ -44,6 +47,8 @@ func (x *TopicType) Set(val IsTopicTypeWrappedType) { x.Type = &TopicType_Reqres{Reqres: v} case *TopicType_Upsert: x.Type = &TopicType_Upsert_{Upsert: v} + case *TopicType_Event: + x.Type = &TopicType_Event_{Event: v} } } func (x *TopicType) Get() IsTopicTypeWrappedType { @@ -54,6 +59,8 @@ func (x *TopicType) Get() IsTopicTypeWrappedType { return v.Reqres case *TopicType_Upsert_: return v.Upsert + case *TopicType_Event_: + return v.Event default: return nil } @@ -67,5 +74,8 @@ func (x *TopicType_ReqRes) TypeKey() TopicTypeKey { func (x *TopicType_Upsert) TypeKey() TopicTypeKey { return Topic_Upsert } +func (x *TopicType_Event) TypeKey() TopicTypeKey { + return Topic_Event +} type IsTopicType_Type = isTopicType_Type diff --git a/gen/test/foo/v1/foo_testpb/foo.pb.go b/gen/test/foo/v1/foo_testpb/foo.pb.go index f9287ba..db7bd45 100644 --- a/gen/test/foo/v1/foo_testpb/foo.pb.go +++ b/gen/test/foo/v1/foo_testpb/foo.pb.go @@ -7,15 +7,14 @@ package foo_testpb import ( - reflect "reflect" - sync "sync" - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" _ "github.com/pentops/j5/gen/j5/list/v1/list_j5pb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/test/foo/v1/foo_testpb/foo_sugar.pb.go b/gen/test/foo/v1/foo_testpb/foo_sugar.pb.go index 98af852..96b062a 100644 --- a/gen/test/foo/v1/foo_testpb/foo_sugar.pb.go +++ b/gen/test/foo/v1/foo_testpb/foo_sugar.pb.go @@ -5,7 +5,6 @@ package foo_testpb import ( driver "database/sql/driver" fmt "fmt" - proto "google.golang.org/protobuf/proto" ) diff --git a/gen/test/foo/v1/foo_testspb/foo_service.pb.go b/gen/test/foo/v1/foo_testspb/foo_service.pb.go index 5a6814a..f835e4b 100644 --- a/gen/test/foo/v1/foo_testspb/foo_service.pb.go +++ b/gen/test/foo/v1/foo_testspb/foo_service.pb.go @@ -7,9 +7,6 @@ package foo_testspb import ( - reflect "reflect" - sync "sync" - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" list_j5pb "github.com/pentops/j5/gen/j5/list/v1/list_j5pb" @@ -18,6 +15,8 @@ import ( httpbody "google.golang.org/genproto/googleapis/api/httpbody" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/gen/test/schema/v1/schema_testpb/full_schema.pb.go b/gen/test/schema/v1/schema_testpb/full_schema.pb.go index 15ad1f6..f0ae84a 100644 --- a/gen/test/schema/v1/schema_testpb/full_schema.pb.go +++ b/gen/test/schema/v1/schema_testpb/full_schema.pb.go @@ -7,13 +7,12 @@ package schema_testpb import ( - reflect "reflect" - sync "sync" - _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( diff --git a/go.mod b/go.mod index 9810720..93099bb 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.24.0 toolchain go1.24.1 require ( - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.5-20250307204501-0409229c3780.1 + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250307204501-0409229c3780.1 buf.build/go/protoyaml v0.3.1 github.com/aws/aws-sdk-go-v2/config v1.29.9 github.com/aws/aws-sdk-go-v2/service/ecr v1.43.0 @@ -14,11 +14,12 @@ require ( github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/iancoleman/strcase v0.3.0 - github.com/pentops/bcl.go v0.0.0-20250323035359-2135602dd209 + github.com/pentops/bcl.go v0.0.0-20250325013323-9fa8edf9fc06 github.com/pentops/flowtest v0.0.0-20241110231021-42663ac00b63 github.com/pentops/golib v0.0.0-20250107012216-1b5307b3bfe0 - github.com/pentops/j5 v0.0.0-20250323180056-4467adb13278 + github.com/pentops/j5 v0.0.0-20250324042848-a1db7999e76c github.com/pentops/log.go v0.0.15 + github.com/pentops/o5-messaging v0.0.0-20250317182016-de51c0e702a3 github.com/pentops/runner v0.0.0-20250116202335-8635b2a42547 github.com/ryanuber/go-glob v1.0.0 github.com/stretchr/testify v1.10.0 @@ -26,8 +27,8 @@ require ( go.opentelemetry.io/otel/trace v1.35.0 golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 golang.org/x/mod v0.24.0 - google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 - google.golang.org/protobuf v1.36.5 + google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 + google.golang.org/protobuf v1.36.6 ) require ( @@ -92,7 +93,7 @@ require ( golang.org/x/sys v0.31.0 // indirect golang.org/x/text v0.23.0 // indirect golang.org/x/time v0.6.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/grpc v1.71.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index 92f17de..3700369 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.5-20250307204501-0409229c3780.1 h1:j+l4+E1EEo83GVIxuqinfFOTyImSQUH90WfufE86xaI= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.5-20250307204501-0409229c3780.1/go.mod h1:eOqrCVUfhh7SLo00urDe/XhJHljj0dWMZirS0aX7cmc= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250307204501-0409229c3780.1 h1:zgJPqo17m28+Lf5BW4xv3PvU20BnrmTcGYrog22lLIU= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.6-20250307204501-0409229c3780.1/go.mod h1:avRlCjnFzl98VPaeCtJ24RrV/wwHFzB8sWXhj26+n/U= buf.build/go/protoyaml v0.3.1 h1:ucyzE7DRnjX+mQ6AH4JzN0Kg50ByHHu+yrSKbgQn2D4= buf.build/go/protoyaml v0.3.1/go.mod h1:0TzNpFQDXhwbkXb/ajLvxIijqbve+vMQvWY/b3/Dzxg= cel.dev/expr v0.22.0 h1:+hFFhLPmquBImfs1BiN2PZmkr5ASse2ZOuaxIs9e4R8= @@ -131,16 +131,18 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pentops/bcl.go v0.0.0-20250323035359-2135602dd209 h1:wqxLGW2rtXRLqooj0aKbBMXniwWvsuaCm57Wkktrh9I= -github.com/pentops/bcl.go v0.0.0-20250323035359-2135602dd209/go.mod h1:ELfmJbJc825Xbm8MXskKvkRro5NnxUrzkPB7AYAxbuY= +github.com/pentops/bcl.go v0.0.0-20250325013323-9fa8edf9fc06 h1:ar+zJUjbIKkOeMQqKi5ic6qR+eSeIsWjTuKp+azblJw= +github.com/pentops/bcl.go v0.0.0-20250325013323-9fa8edf9fc06/go.mod h1:/nmjuK461exJGJh6mGRuOKQNj2LzW1bFMzosnv6SMDo= github.com/pentops/flowtest v0.0.0-20241110231021-42663ac00b63 h1:c/Km4mfvR35s9uPVfSXTaZswD5T93vaeMRdTSJ2SGyY= github.com/pentops/flowtest v0.0.0-20241110231021-42663ac00b63/go.mod h1:vNp8crAKcH0f/sZU9frkmQLUeDsTIgMqV14kQtkAqC0= github.com/pentops/golib v0.0.0-20250107012216-1b5307b3bfe0 h1:GA2C2velp/AoojR+fsf4kFXhJ1MLg0y3H84Z2yJ6/+Q= github.com/pentops/golib v0.0.0-20250107012216-1b5307b3bfe0/go.mod h1:I58JIVvL1/nP4CEHGKGbBhvWIEA9mVkGeoviemaqanU= -github.com/pentops/j5 v0.0.0-20250323180056-4467adb13278 h1:uaiqQ25RdlrvXO2wOReRGUYbMYLvJ5CUZrTMmx2iea0= -github.com/pentops/j5 v0.0.0-20250323180056-4467adb13278/go.mod h1:iEHeUub/dC1C2hoNbl9gvYVcNU6sq8WWBz5TIyqAJW0= +github.com/pentops/j5 v0.0.0-20250324042848-a1db7999e76c h1:fqIgGPAGAwAMj1QcwSAAzr9JVR6wQM/ueDYHvs0Ef1E= +github.com/pentops/j5 v0.0.0-20250324042848-a1db7999e76c/go.mod h1:iEHeUub/dC1C2hoNbl9gvYVcNU6sq8WWBz5TIyqAJW0= github.com/pentops/log.go v0.0.15 h1:yoyu8/2LTvJ4daAkRuKcDyLe1eICwJdiCkWgZwgtq3A= github.com/pentops/log.go v0.0.15/go.mod h1:yR34x8aMlvhdGvqgIU4+0MiLjJTKt0vpcgUnVN2nZV4= +github.com/pentops/o5-messaging v0.0.0-20250317182016-de51c0e702a3 h1:xlKXoYV+A7xFxg1O4HyBSb4/k6hVc+exlEVKeoGXzCc= +github.com/pentops/o5-messaging v0.0.0-20250317182016-de51c0e702a3/go.mod h1:RuFTVPd7iejyBP+Pj3+Udf8gbv5SYtPFlXCrR0BPgqE= github.com/pentops/runner v0.0.0-20250116202335-8635b2a42547 h1:PFKl3Fo73gT208bXmeoIsF58QotFhwNSSOK/vGa8b2s= github.com/pentops/runner v0.0.0-20250116202335-8635b2a42547/go.mod h1:hzPLosxy6O/1qjLUyt9lzE2M1Re/ASxmrErHbImXgNk= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -149,8 +151,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= @@ -289,10 +291,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 h1:IFnXJq3UPB3oBREOodn1v1aGQeZYQclEmvWRMN0PSsY= -google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:c8q6Z6OCqnfVIqUFJkCzKcrj8eCvUrz+K4KRzSTuANg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 h1:iK2jbkWL86DXjEx0qiHcRE9dE4/Ahua5k6V8OWFb//c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 h1:hE3bRWtU6uceqlh4fhrSnUyjKHMKB9KrTLLG+bc0ddM= +google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463/go.mod h1:U90ffi8eUL9MwPcrJylN5+Mk2v3vuPDptd5yyNUiRR8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -300,8 +302,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/internal/bcl/sourcewalk/entity.go b/internal/bcl/sourcewalk/entity.go index f35b7fe..7662157 100644 --- a/internal/bcl/sourcewalk/entity.go +++ b/internal/bcl/sourcewalk/entity.go @@ -24,6 +24,10 @@ func (ent *entityNode) componentName(suffix string) string { return strcase.ToCamel(ent.Schema.Name) + strcase.ToCamel(suffix) } +func (ent *entityNode) fullName() string { + return fmt.Sprintf("%s.%s", ent.packageName, strcase.ToCamel(ent.Schema.Name)) +} + func schemaRefField(pkg, desc string) *schema_j5pb.Field { return &schema_j5pb.Field{ Type: &schema_j5pb.Field_Object{ @@ -75,7 +79,10 @@ func (ent *entityNode) run(visitor FileVisitor) error { if err := ent.acceptCommands(visitor); err != nil { return err } - if err := ent.acceptTopics(visitor); err != nil { + if err := ent.acceptPublishTopic(visitor); err != nil { + return err + } + if err := ent.acceptSummaryTopics(visitor); err != nil { return err } @@ -363,7 +370,55 @@ func (ent *entityNode) acceptCommands(visitor FileVisitor) error { }) } -func (ent *entityNode) acceptTopics(visitor FileVisitor) error { +func (ent *entityNode) acceptSummaryTopics(visitor FileVisitor) error { + + topics := make([]*topicRef, 0) + + names := make(map[string]bool) + for idx, summary := range ent.Schema.Summaries { + source := ent.Source.child("summaries", strconv.Itoa(idx)) + + if names[summary.Name] { + return walkerErrorf("duplicate summary name %q", summary.Name) + } + names[summary.Name] = true + + var name string + if summary.Name == "" { + name = fmt.Sprintf("%sSummary", strcase.ToCamel(ent.Schema.Name)) + } else { + name = fmt.Sprintf("%s%s", strcase.ToCamel(ent.Schema.Name), strcase.ToCamel(summary.Name)) + } + + topicDef := &sourcedef_j5pb.Topic{ + Name: name, + Type: &sourcedef_j5pb.TopicType{ + Type: &sourcedef_j5pb.TopicType_Upsert_{ + Upsert: &sourcedef_j5pb.TopicType_Upsert{ + EntityName: ent.fullName(), + Message: &sourcedef_j5pb.TopicMethod{ + Name: gl.Ptr(name), + Description: fmt.Sprintf("Publishes summary output of state for the %s entity", ent.Schema.Name), + Fields: summary.Fields, + }, + }, + }, + }, + } + + topics = append(topics, &topicRef{ + schema: topicDef, + source: source, + }) + + } + + return visitor.VisitTopicFile(&TopicFileNode{ + topics: topics, + }) +} + +func (ent *entityNode) acceptPublishTopic(visitor FileVisitor) error { source := ent.Source.child(virtualPathNode, "publish") @@ -417,13 +472,14 @@ func (ent *entityNode) acceptTopics(visitor FileVisitor) error { publishTopic := &sourcedef_j5pb.Topic{ Name: fmt.Sprintf("%sPublish", strcase.ToCamel(ent.Schema.Name)), Type: &sourcedef_j5pb.TopicType{ - Type: &sourcedef_j5pb.TopicType_Publish_{ - Publish: &sourcedef_j5pb.TopicType_Publish{ - Messages: []*sourcedef_j5pb.TopicMethod{{ + Type: &sourcedef_j5pb.TopicType_Event_{ + Event: &sourcedef_j5pb.TopicType_Event{ + EntityName: ent.fullName(), + Message: &sourcedef_j5pb.TopicMethod{ Name: gl.Ptr(fmt.Sprintf("%sEvent", strcase.ToCamel(ent.Schema.Name))), - Description: fmt.Sprintf("Publishes an all events for the %s entity", ent.Schema.Name), + Description: fmt.Sprintf("Publishes all events for the %s entity", ent.Schema.Name), Fields: properties, - }}, + }, }, }, }, diff --git a/internal/bcl/sourcewalk/topic.go b/internal/bcl/sourcewalk/topic.go index 857bc4b..19b7efe 100644 --- a/internal/bcl/sourcewalk/topic.go +++ b/internal/bcl/sourcewalk/topic.go @@ -79,6 +79,23 @@ func (tn *topicRef) accept(visitor TopicFileVisitor) error { source := tn.source.child("type", "reqres") return acceptMultiReqResTopic(source, tn.schema.Name, tt.Reqres, visitor) + case *sourcedef_j5pb.TopicType_Event_: + source := tn.source.child("type", "event") + return acceptTopic(source, topicNode{ + name: tn.schema.Name, + methods: []*sourcedef_j5pb.TopicMethod{ + tt.Event.Message, + }, + serviceConfig: &messaging_j5pb.ServiceConfig{ + TopicName: gl.Ptr(strcase.ToSnake(tn.schema.Name)), + Role: &messaging_j5pb.ServiceConfig_Event_{ + Event: &messaging_j5pb.ServiceConfig_Event{ + EntityName: tt.Event.EntityName, + }, + }, + }, + }, visitor) + case *sourcedef_j5pb.TopicType_Upsert_: source := tn.source.child("type", "upsert") name := tn.schema.Name @@ -92,8 +109,10 @@ func (tn *topicRef) accept(visitor TopicFileVisitor) error { }, serviceConfig: &messaging_j5pb.ServiceConfig{ TopicName: gl.Ptr(strcase.ToSnake(name)), - Role: &messaging_j5pb.ServiceConfig_Publish_{ - Publish: &messaging_j5pb.ServiceConfig_Publish{}, + Role: &messaging_j5pb.ServiceConfig_Upsert_{ + Upsert: &messaging_j5pb.ServiceConfig_Upsert{ + EntityName: tt.Upsert.EntityName, + }, }, }, prependFields: []*schema_j5pb.ObjectProperty{{ diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 3941a74..5b34f3e 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -35,6 +35,9 @@ func CommandSet() *commander.CommandSet { cmdGroup.Add("version", commander.NewCommand(runVersion)) cmdGroup.Add("generate", commander.NewCommand(runGenerate)) + // alias for j5s genproto + cmdGroup.Add("genproto", commander.NewCommand(runJ5sGenProto)) + cmdGroup.Add("verify", commander.NewCommand(runVerify)) cmdGroup.Add("publish", commander.NewCommand(runPublish)) diff --git a/internal/cli/generate.go b/internal/cli/generate.go index 5a64454..b6d9207 100644 --- a/internal/cli/generate.go +++ b/internal/cli/generate.go @@ -12,9 +12,18 @@ import ( func runGenerate(ctx context.Context, cfg struct { SourceConfig - Clean bool `flag:"clean" description:"Remove the directories in config as 'managedPaths' before generating"` + NoClean bool `flag:"no-clean" description:"Do not remove the directories in config as 'managedPaths' before generating"` + NoJ5s bool `flag:"no-j5s" description:"Do not convert J5s source files to proto"` }) error { + if !cfg.NoJ5s { + if err := runJ5sGenProto(ctx, j5sGenProtoConfig{ + SourceConfig: cfg.SourceConfig, + }); err != nil { + return err + } + } + src, err := cfg.GetSource(ctx) if err != nil { return err @@ -31,7 +40,7 @@ func runGenerate(ctx context.Context, cfg struct { return err } - if cfg.Clean { + if !cfg.NoClean { repoConfig := src.RepoConfig() if err := outRoot.Clean(repoConfig.ManagedPaths); err != nil { return err diff --git a/internal/cli/j5s.go b/internal/cli/j5s.go index de1afa6..5fd1069 100644 --- a/internal/cli/j5s.go +++ b/internal/cli/j5s.go @@ -212,10 +212,12 @@ func runForJ5Files(ctx context.Context, root fs.FS, doFile func(ctx context.Cont return nil } -func runJ5sGenProto(ctx context.Context, cfg struct { +type j5sGenProtoConfig struct { SourceConfig Verbose bool `flag:"verbose" env:"BCL_VERBOSE" default:"false" desc:"Verbose output"` -}) error { +} + +func runJ5sGenProto(ctx context.Context, cfg j5sGenProtoConfig) error { src, err := cfg.GetSource(ctx) if err != nil { return err @@ -241,6 +243,11 @@ func runJ5sGenProto(ctx context.Context, cfg struct { return err } + err = deleteJ5sProto(ctx, bundle.DirInRepo()) + if err != nil { + return err + } + outWriter, err := cfg.FileWriterAt(ctx, bundle.DirInRepo()) if err != nil { return err @@ -292,3 +299,26 @@ func runJ5sGenProto(ctx context.Context, cfg struct { return err } + +func deleteJ5sProto(ctx context.Context, dir string) error { + err := fs.WalkDir(os.DirFS(dir), ".", func(pathname string, d fs.DirEntry, err error) error { + if err != nil { + return err + } + if d.IsDir() { + return nil + } + + if !strings.HasSuffix(pathname, ".j5s.proto") { + // not using path.Ext because it returns .proto + return nil + } + + log.WithField(ctx, "file", pathname).Debug("Deleting file") + return os.Remove(filepath.Join(dir, pathname)) + }) + if err != nil { + return err + } + return nil +} diff --git a/j5.yaml b/j5.yaml index 22fa55d..6ac0b21 100644 --- a/j5.yaml +++ b/j5.yaml @@ -7,14 +7,11 @@ bundles: - name: j5build dir: proto/j5build - - name: j5stest - dir: j5stest - generate: - name: base inputs: - - local: test - local: j5build + - local: test output: . opts: diff --git a/j5stest/gen/j5st/v1/j5st_pb/foo.j5s.pb.go b/j5stest/gen/j5st/v1/j5st_pb/foo.j5s.pb.go new file mode 100644 index 0000000..3e7cc69 --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_pb/foo.j5s.pb.go @@ -0,0 +1,706 @@ +// Code generated by j5convert. DO NOT EDIT. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: j5st/v1/foo.j5s.proto + +package j5st_pb + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" + psm_j5pb "github.com/pentops/j5/gen/j5/state/v1/psm_j5pb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FooStatus int32 + +const ( + FooStatus_FOO_STATUS_UNSPECIFIED FooStatus = 0 + FooStatus_FOO_STATUS_ACTIVE FooStatus = 1 + FooStatus_FOO_STATUS_INACTIVE FooStatus = 2 +) + +// Enum value maps for FooStatus. +var ( + FooStatus_name = map[int32]string{ + 0: "FOO_STATUS_UNSPECIFIED", + 1: "FOO_STATUS_ACTIVE", + 2: "FOO_STATUS_INACTIVE", + } + FooStatus_value = map[string]int32{ + "FOO_STATUS_UNSPECIFIED": 0, + "FOO_STATUS_ACTIVE": 1, + "FOO_STATUS_INACTIVE": 2, + } +) + +func (x FooStatus) Enum() *FooStatus { + p := new(FooStatus) + *p = x + return p +} + +func (x FooStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FooStatus) Descriptor() protoreflect.EnumDescriptor { + return file_j5st_v1_foo_j5s_proto_enumTypes[0].Descriptor() +} + +func (FooStatus) Type() protoreflect.EnumType { + return &file_j5st_v1_foo_j5s_proto_enumTypes[0] +} + +func (x FooStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FooStatus.Descriptor instead. +func (FooStatus) EnumDescriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{0} +} + +type FooKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FooId string `protobuf:"bytes,1,opt,name=foo_id,json=fooId,proto3" json:"foo_id,omitempty"` +} + +func (x *FooKeys) Reset() { + *x = FooKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooKeys) ProtoMessage() {} + +func (x *FooKeys) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooKeys.ProtoReflect.Descriptor instead. +func (*FooKeys) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{0} +} + +func (x *FooKeys) GetFooId() string { + if x != nil { + return x.FooId + } + return "" +} + +type FooData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *FooData) Reset() { + *x = FooData{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooData) ProtoMessage() {} + +func (x *FooData) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooData.ProtoReflect.Descriptor instead. +func (*FooData) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{1} +} + +func (x *FooData) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type FooState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *psm_j5pb.StateMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Keys *FooKeys `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` + Data *FooData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Status FooStatus `protobuf:"varint,4,opt,name=status,proto3,enum=j5st.v1.FooStatus" json:"status,omitempty"` +} + +func (x *FooState) Reset() { + *x = FooState{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooState) ProtoMessage() {} + +func (x *FooState) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooState.ProtoReflect.Descriptor instead. +func (*FooState) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{2} +} + +func (x *FooState) GetMetadata() *psm_j5pb.StateMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *FooState) GetKeys() *FooKeys { + if x != nil { + return x.Keys + } + return nil +} + +func (x *FooState) GetData() *FooData { + if x != nil { + return x.Data + } + return nil +} + +func (x *FooState) GetStatus() FooStatus { + if x != nil { + return x.Status + } + return FooStatus_FOO_STATUS_UNSPECIFIED +} + +type FooEventType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *FooEventType_Create_ + // *FooEventType_Archive_ + Type isFooEventType_Type `protobuf_oneof:"type"` +} + +func (x *FooEventType) Reset() { + *x = FooEventType{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEventType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEventType) ProtoMessage() {} + +func (x *FooEventType) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEventType.ProtoReflect.Descriptor instead. +func (*FooEventType) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{3} +} + +func (m *FooEventType) GetType() isFooEventType_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *FooEventType) GetCreate() *FooEventType_Create { + if x, ok := x.GetType().(*FooEventType_Create_); ok { + return x.Create + } + return nil +} + +func (x *FooEventType) GetArchive() *FooEventType_Archive { + if x, ok := x.GetType().(*FooEventType_Archive_); ok { + return x.Archive + } + return nil +} + +type isFooEventType_Type interface { + isFooEventType_Type() +} + +type FooEventType_Create_ struct { + Create *FooEventType_Create `protobuf:"bytes,1,opt,name=create,proto3,oneof"` +} + +type FooEventType_Archive_ struct { + Archive *FooEventType_Archive `protobuf:"bytes,2,opt,name=archive,proto3,oneof"` +} + +func (*FooEventType_Create_) isFooEventType_Type() {} + +func (*FooEventType_Archive_) isFooEventType_Type() {} + +type FooEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *psm_j5pb.EventMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Keys *FooKeys `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` + Event *FooEventType `protobuf:"bytes,3,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *FooEvent) Reset() { + *x = FooEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEvent) ProtoMessage() {} + +func (x *FooEvent) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEvent.ProtoReflect.Descriptor instead. +func (*FooEvent) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{4} +} + +func (x *FooEvent) GetMetadata() *psm_j5pb.EventMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *FooEvent) GetKeys() *FooKeys { + if x != nil { + return x.Keys + } + return nil +} + +func (x *FooEvent) GetEvent() *FooEventType { + if x != nil { + return x.Event + } + return nil +} + +type FooEventType_Create struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *FooEventType_Create) Reset() { + *x = FooEventType_Create{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEventType_Create) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEventType_Create) ProtoMessage() {} + +func (x *FooEventType_Create) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEventType_Create.ProtoReflect.Descriptor instead. +func (*FooEventType_Create) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *FooEventType_Create) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type FooEventType_Archive struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FooEventType_Archive) Reset() { + *x = FooEventType_Archive{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEventType_Archive) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEventType_Archive) ProtoMessage() {} + +func (x *FooEventType_Archive) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_foo_j5s_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEventType_Archive.ProtoReflect.Descriptor instead. +func (*FooEventType_Archive) Descriptor() ([]byte, []int) { + return file_j5st_v1_foo_j5s_proto_rawDescGZIP(), []int{3, 1} +} + +var File_j5st_v1_foo_j5s_proto protoreflect.FileDescriptor + +var file_j5st_v1_foo_j5s_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x6f, 0x6f, 0x2e, 0x6a, 0x35, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, + 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6a, + 0x35, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6a, 0x35, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x07, 0x46, 0x6f, 0x6f, 0x4b, 0x65, 0x79, + 0x73, 0x12, 0x37, 0x0a, 0x06, 0x66, 0x6f, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x20, 0xba, 0x48, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x41, + 0x2d, 0x5a, 0x61, 0x2d, 0x7a, 0x5d, 0x7b, 0x32, 0x32, 0x7d, 0x24, 0xc2, 0xff, 0x8e, 0x02, 0x03, + 0xb2, 0x02, 0x00, 0x52, 0x05, 0x66, 0x6f, 0x6f, 0x49, 0x64, 0x3a, 0x13, 0xc2, 0xff, 0x8e, 0x02, + 0x02, 0x52, 0x00, 0xea, 0x85, 0x8f, 0x02, 0x07, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x10, 0x01, 0x22, + 0x3c, 0x0a, 0x07, 0x46, 0x6f, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, + 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x13, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, + 0x00, 0xea, 0x85, 0x8f, 0x02, 0x07, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x10, 0x04, 0x22, 0x92, 0x02, + 0x0a, 0x08, 0x46, 0x6f, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6a, + 0x35, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x35, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x4b, 0x65, 0x79, + 0x73, 0x42, 0x0f, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x52, 0x02, + 0x08, 0x01, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x6f, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, + 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x12, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0xc2, 0xff, + 0x8e, 0x02, 0x02, 0x5a, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x13, 0xc2, + 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0xea, 0x85, 0x8f, 0x02, 0x07, 0x0a, 0x03, 0x66, 0x6f, 0x6f, + 0x10, 0x02, 0x22, 0xe9, 0x01, 0x0a, 0x0c, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, + 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x48, 0x00, 0x52, 0x06, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x48, 0x00, 0x52, + 0x07, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x1a, 0x2f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x1a, 0x12, 0x0a, 0x07, 0x41, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x3a, 0x07, 0xc2, + 0xff, 0x8e, 0x02, 0x02, 0x5a, 0x00, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd9, + 0x01, 0x0a, 0x08, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6a, 0x35, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x35, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x4b, 0x65, + 0x79, 0x73, 0x42, 0x0f, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x52, + 0x02, 0x08, 0x01, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x62, 0x00, 0x52, 0x05, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x13, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0xea, 0x85, + 0x8f, 0x02, 0x07, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x10, 0x03, 0x2a, 0x57, 0x0a, 0x09, 0x46, 0x6f, + 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x4f, 0x4f, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x4f, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x4f, + 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x02, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x65, 0x6e, 0x74, 0x6f, 0x70, 0x73, 0x2f, 0x6a, 0x35, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6a, 0x35, + 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_j5st_v1_foo_j5s_proto_rawDescOnce sync.Once + file_j5st_v1_foo_j5s_proto_rawDescData = file_j5st_v1_foo_j5s_proto_rawDesc +) + +func file_j5st_v1_foo_j5s_proto_rawDescGZIP() []byte { + file_j5st_v1_foo_j5s_proto_rawDescOnce.Do(func() { + file_j5st_v1_foo_j5s_proto_rawDescData = protoimpl.X.CompressGZIP(file_j5st_v1_foo_j5s_proto_rawDescData) + }) + return file_j5st_v1_foo_j5s_proto_rawDescData +} + +var file_j5st_v1_foo_j5s_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_j5st_v1_foo_j5s_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_j5st_v1_foo_j5s_proto_goTypes = []any{ + (FooStatus)(0), // 0: j5st.v1.FooStatus + (*FooKeys)(nil), // 1: j5st.v1.FooKeys + (*FooData)(nil), // 2: j5st.v1.FooData + (*FooState)(nil), // 3: j5st.v1.FooState + (*FooEventType)(nil), // 4: j5st.v1.FooEventType + (*FooEvent)(nil), // 5: j5st.v1.FooEvent + (*FooEventType_Create)(nil), // 6: j5st.v1.FooEventType.Create + (*FooEventType_Archive)(nil), // 7: j5st.v1.FooEventType.Archive + (*psm_j5pb.StateMetadata)(nil), // 8: j5.state.v1.StateMetadata + (*psm_j5pb.EventMetadata)(nil), // 9: j5.state.v1.EventMetadata +} +var file_j5st_v1_foo_j5s_proto_depIdxs = []int32{ + 8, // 0: j5st.v1.FooState.metadata:type_name -> j5.state.v1.StateMetadata + 1, // 1: j5st.v1.FooState.keys:type_name -> j5st.v1.FooKeys + 2, // 2: j5st.v1.FooState.data:type_name -> j5st.v1.FooData + 0, // 3: j5st.v1.FooState.status:type_name -> j5st.v1.FooStatus + 6, // 4: j5st.v1.FooEventType.create:type_name -> j5st.v1.FooEventType.Create + 7, // 5: j5st.v1.FooEventType.archive:type_name -> j5st.v1.FooEventType.Archive + 9, // 6: j5st.v1.FooEvent.metadata:type_name -> j5.state.v1.EventMetadata + 1, // 7: j5st.v1.FooEvent.keys:type_name -> j5st.v1.FooKeys + 4, // 8: j5st.v1.FooEvent.event:type_name -> j5st.v1.FooEventType + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_j5st_v1_foo_j5s_proto_init() } +func file_j5st_v1_foo_j5s_proto_init() { + if File_j5st_v1_foo_j5s_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_j5st_v1_foo_j5s_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*FooKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FooData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*FooState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*FooEventType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*FooEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*FooEventType_Create); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*FooEventType_Archive); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_j5st_v1_foo_j5s_proto_msgTypes[3].OneofWrappers = []any{ + (*FooEventType_Create_)(nil), + (*FooEventType_Archive_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_j5st_v1_foo_j5s_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_j5st_v1_foo_j5s_proto_goTypes, + DependencyIndexes: file_j5st_v1_foo_j5s_proto_depIdxs, + EnumInfos: file_j5st_v1_foo_j5s_proto_enumTypes, + MessageInfos: file_j5st_v1_foo_j5s_proto_msgTypes, + }.Build() + File_j5st_v1_foo_j5s_proto = out.File + file_j5st_v1_foo_j5s_proto_rawDesc = nil + file_j5st_v1_foo_j5s_proto_goTypes = nil + file_j5st_v1_foo_j5s_proto_depIdxs = nil +} diff --git a/j5stest/gen/j5st/v1/j5st_pb/foo.j5s_sugar.pb.go b/j5stest/gen/j5st/v1/j5st_pb/foo.j5s_sugar.pb.go new file mode 100644 index 0000000..a0923e1 --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_pb/foo.j5s_sugar.pb.go @@ -0,0 +1,110 @@ +// Code generated by protoc-gen-go-sugar. DO NOT EDIT. + +package j5st_pb + +import ( + driver "database/sql/driver" + fmt "fmt" + proto "google.golang.org/protobuf/proto" +) + +// FooEventType is a oneof wrapper +type FooEventTypeKey string + +const ( + FooEvent_Create FooEventTypeKey = "create" + FooEvent_Archive FooEventTypeKey = "archive" +) + +func (x *FooEventType) TypeKey() (FooEventTypeKey, bool) { + switch x.Type.(type) { + case *FooEventType_Create_: + return FooEvent_Create, true + case *FooEventType_Archive_: + return FooEvent_Archive, true + default: + return "", false + } +} + +type IsFooEventTypeWrappedType interface { + TypeKey() FooEventTypeKey + proto.Message +} + +func (x *FooEventType) Set(val IsFooEventTypeWrappedType) { + switch v := val.(type) { + case *FooEventType_Create: + x.Type = &FooEventType_Create_{Create: v} + case *FooEventType_Archive: + x.Type = &FooEventType_Archive_{Archive: v} + } +} +func (x *FooEventType) Get() IsFooEventTypeWrappedType { + switch v := x.Type.(type) { + case *FooEventType_Create_: + return v.Create + case *FooEventType_Archive_: + return v.Archive + default: + return nil + } +} +func (x *FooEventType_Create) TypeKey() FooEventTypeKey { + return FooEvent_Create +} +func (x *FooEventType_Archive) TypeKey() FooEventTypeKey { + return FooEvent_Archive +} + +type IsFooEventType_Type = isFooEventType_Type + +// FooStatus +const ( + FooStatus_UNSPECIFIED FooStatus = 0 + FooStatus_ACTIVE FooStatus = 1 + FooStatus_INACTIVE FooStatus = 2 +) + +var ( + FooStatus_name_short = map[int32]string{ + 0: "UNSPECIFIED", + 1: "ACTIVE", + 2: "INACTIVE", + } + FooStatus_value_short = map[string]int32{ + "UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2, + } + FooStatus_value_either = map[string]int32{ + "UNSPECIFIED": 0, + "FOO_STATUS_UNSPECIFIED": 0, + "ACTIVE": 1, + "FOO_STATUS_ACTIVE": 1, + "INACTIVE": 2, + "FOO_STATUS_INACTIVE": 2, + } +) + +// ShortString returns the un-prefixed string representation of the enum value +func (x FooStatus) ShortString() string { + return FooStatus_name_short[int32(x)] +} +func (x FooStatus) Value() (driver.Value, error) { + return []uint8(x.ShortString()), nil +} +func (x *FooStatus) Scan(value interface{}) error { + var strVal string + switch vt := value.(type) { + case []uint8: + strVal = string(vt) + case string: + strVal = vt + default: + return fmt.Errorf("invalid type %T", value) + } + val := FooStatus_value_either[strVal] + *x = FooStatus(val) + return nil +} diff --git a/j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s.pb.go b/j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s.pb.go new file mode 100644 index 0000000..d57a11a --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s.pb.go @@ -0,0 +1,569 @@ +// Code generated by j5convert. DO NOT EDIT. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: j5st/v1/service/foo.p.j5s.proto + +package j5st_spb + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" + list_j5pb "github.com/pentops/j5/gen/j5/list/v1/list_j5pb" + j5st_pb "github.com/pentops/j5build/j5stest/gen/j5st/v1/j5st_pb" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FooGetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FooGetRequest) Reset() { + *x = FooGetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooGetRequest) ProtoMessage() {} + +func (x *FooGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooGetRequest.ProtoReflect.Descriptor instead. +func (*FooGetRequest) Descriptor() ([]byte, []int) { + return file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP(), []int{0} +} + +type FooGetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Foo *j5st_pb.FooState `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` +} + +func (x *FooGetResponse) Reset() { + *x = FooGetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooGetResponse) ProtoMessage() {} + +func (x *FooGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooGetResponse.ProtoReflect.Descriptor instead. +func (*FooGetResponse) Descriptor() ([]byte, []int) { + return file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP(), []int{1} +} + +func (x *FooGetResponse) GetFoo() *j5st_pb.FooState { + if x != nil { + return x.Foo + } + return nil +} + +type FooListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page *list_j5pb.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + Query *list_j5pb.QueryRequest `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *FooListRequest) Reset() { + *x = FooListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooListRequest) ProtoMessage() {} + +func (x *FooListRequest) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooListRequest.ProtoReflect.Descriptor instead. +func (*FooListRequest) Descriptor() ([]byte, []int) { + return file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP(), []int{2} +} + +func (x *FooListRequest) GetPage() *list_j5pb.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *FooListRequest) GetQuery() *list_j5pb.QueryRequest { + if x != nil { + return x.Query + } + return nil +} + +type FooListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Foo []*j5st_pb.FooState `protobuf:"bytes,1,rep,name=foo,proto3" json:"foo,omitempty"` + Page *list_j5pb.PageResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *FooListResponse) Reset() { + *x = FooListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooListResponse) ProtoMessage() {} + +func (x *FooListResponse) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooListResponse.ProtoReflect.Descriptor instead. +func (*FooListResponse) Descriptor() ([]byte, []int) { + return file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP(), []int{3} +} + +func (x *FooListResponse) GetFoo() []*j5st_pb.FooState { + if x != nil { + return x.Foo + } + return nil +} + +func (x *FooListResponse) GetPage() *list_j5pb.PageResponse { + if x != nil { + return x.Page + } + return nil +} + +type FooEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page *list_j5pb.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + Query *list_j5pb.QueryRequest `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *FooEventsRequest) Reset() { + *x = FooEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEventsRequest) ProtoMessage() {} + +func (x *FooEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEventsRequest.ProtoReflect.Descriptor instead. +func (*FooEventsRequest) Descriptor() ([]byte, []int) { + return file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP(), []int{4} +} + +func (x *FooEventsRequest) GetPage() *list_j5pb.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *FooEventsRequest) GetQuery() *list_j5pb.QueryRequest { + if x != nil { + return x.Query + } + return nil +} + +type FooEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Events []*j5st_pb.FooEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + Page *list_j5pb.PageResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *FooEventsResponse) Reset() { + *x = FooEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEventsResponse) ProtoMessage() {} + +func (x *FooEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_service_foo_p_j5s_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEventsResponse.ProtoReflect.Descriptor instead. +func (*FooEventsResponse) Descriptor() ([]byte, []int) { + return file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP(), []int{5} +} + +func (x *FooEventsResponse) GetEvents() []*j5st_pb.FooEvent { + if x != nil { + return x.Events + } + return nil +} + +func (x *FooEventsResponse) GetPage() *list_j5pb.PageResponse { + if x != nil { + return x.Page + } + return nil +} + +var File_j5st_v1_service_foo_p_j5s_proto protoreflect.FileDescriptor + +var file_j5st_v1_service_foo_p_j5s_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x66, 0x6f, 0x6f, 0x2e, 0x70, 0x2e, 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0f, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6a, + 0x35, 0x2f, 0x65, 0x78, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x6a, 0x35, 0x2f, 0x6c, + 0x69, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x16, 0x6a, 0x35, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x6a, 0x35, 0x73, 0x74, 0x2f, + 0x76, 0x31, 0x2f, 0x66, 0x6f, 0x6f, 0x2e, 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x18, 0x0a, 0x0d, 0x46, 0x6f, 0x6f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x4d, 0x0a, 0x0e, 0x46, 0x6f, + 0x6f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x03, + 0x66, 0x6f, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6a, 0x35, 0x73, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0d, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, + 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x88, 0x01, 0x0a, 0x0e, 0x46, 0x6f, + 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, + 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, + 0x02, 0x02, 0x52, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x07, 0xc2, 0xff, 0x8e, + 0x02, 0x02, 0x52, 0x00, 0x22, 0x86, 0x01, 0x0a, 0x0f, 0x46, 0x6f, 0x6f, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x6f, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x0e, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xaa, 0x01, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x35, 0x0a, + 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, + 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x8a, 0x01, + 0x0a, 0x10, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, + 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x42, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x88, 0x01, 0x0a, 0x11, 0x46, + 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xaa, 0x01, 0x00, 0x52, 0x06, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6a, 0x35, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x07, 0xc2, + 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x3a, 0x07, 0xc2, 0xff, + 0x8e, 0x02, 0x02, 0x52, 0x00, 0x32, 0xf6, 0x02, 0x0a, 0x0f, 0x46, 0x6f, 0x6f, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x06, 0x46, 0x6f, 0x6f, + 0x47, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x52, 0x02, 0x08, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x66, 0x6f, 0x6f, 0x2f, 0x71, 0x12, 0x6d, 0x0a, 0x07, 0x46, 0x6f, 0x6f, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x1f, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x52, 0x02, 0x10, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x66, + 0x6f, 0x6f, 0x2f, 0x71, 0x12, 0x7a, 0x0a, 0x09, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x21, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xc2, 0xff, 0x8e, 0x02, 0x04, 0x52, + 0x02, 0x18, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x6a, 0x35, 0x73, 0x74, + 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x6f, 0x6f, 0x2f, 0x71, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x1a, 0x0c, 0xea, 0x85, 0x8f, 0x02, 0x07, 0x0a, 0x05, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x42, 0x39, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x6e, + 0x74, 0x6f, 0x70, 0x73, 0x2f, 0x6a, 0x35, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x6a, 0x35, 0x73, + 0x74, 0x65, 0x73, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x5f, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_j5st_v1_service_foo_p_j5s_proto_rawDescOnce sync.Once + file_j5st_v1_service_foo_p_j5s_proto_rawDescData = file_j5st_v1_service_foo_p_j5s_proto_rawDesc +) + +func file_j5st_v1_service_foo_p_j5s_proto_rawDescGZIP() []byte { + file_j5st_v1_service_foo_p_j5s_proto_rawDescOnce.Do(func() { + file_j5st_v1_service_foo_p_j5s_proto_rawDescData = protoimpl.X.CompressGZIP(file_j5st_v1_service_foo_p_j5s_proto_rawDescData) + }) + return file_j5st_v1_service_foo_p_j5s_proto_rawDescData +} + +var file_j5st_v1_service_foo_p_j5s_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_j5st_v1_service_foo_p_j5s_proto_goTypes = []any{ + (*FooGetRequest)(nil), // 0: j5st.v1.service.FooGetRequest + (*FooGetResponse)(nil), // 1: j5st.v1.service.FooGetResponse + (*FooListRequest)(nil), // 2: j5st.v1.service.FooListRequest + (*FooListResponse)(nil), // 3: j5st.v1.service.FooListResponse + (*FooEventsRequest)(nil), // 4: j5st.v1.service.FooEventsRequest + (*FooEventsResponse)(nil), // 5: j5st.v1.service.FooEventsResponse + (*j5st_pb.FooState)(nil), // 6: j5st.v1.FooState + (*list_j5pb.PageRequest)(nil), // 7: j5.list.v1.PageRequest + (*list_j5pb.QueryRequest)(nil), // 8: j5.list.v1.QueryRequest + (*list_j5pb.PageResponse)(nil), // 9: j5.list.v1.PageResponse + (*j5st_pb.FooEvent)(nil), // 10: j5st.v1.FooEvent +} +var file_j5st_v1_service_foo_p_j5s_proto_depIdxs = []int32{ + 6, // 0: j5st.v1.service.FooGetResponse.foo:type_name -> j5st.v1.FooState + 7, // 1: j5st.v1.service.FooListRequest.page:type_name -> j5.list.v1.PageRequest + 8, // 2: j5st.v1.service.FooListRequest.query:type_name -> j5.list.v1.QueryRequest + 6, // 3: j5st.v1.service.FooListResponse.foo:type_name -> j5st.v1.FooState + 9, // 4: j5st.v1.service.FooListResponse.page:type_name -> j5.list.v1.PageResponse + 7, // 5: j5st.v1.service.FooEventsRequest.page:type_name -> j5.list.v1.PageRequest + 8, // 6: j5st.v1.service.FooEventsRequest.query:type_name -> j5.list.v1.QueryRequest + 10, // 7: j5st.v1.service.FooEventsResponse.events:type_name -> j5st.v1.FooEvent + 9, // 8: j5st.v1.service.FooEventsResponse.page:type_name -> j5.list.v1.PageResponse + 0, // 9: j5st.v1.service.FooQueryService.FooGet:input_type -> j5st.v1.service.FooGetRequest + 2, // 10: j5st.v1.service.FooQueryService.FooList:input_type -> j5st.v1.service.FooListRequest + 4, // 11: j5st.v1.service.FooQueryService.FooEvents:input_type -> j5st.v1.service.FooEventsRequest + 1, // 12: j5st.v1.service.FooQueryService.FooGet:output_type -> j5st.v1.service.FooGetResponse + 3, // 13: j5st.v1.service.FooQueryService.FooList:output_type -> j5st.v1.service.FooListResponse + 5, // 14: j5st.v1.service.FooQueryService.FooEvents:output_type -> j5st.v1.service.FooEventsResponse + 12, // [12:15] is the sub-list for method output_type + 9, // [9:12] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_j5st_v1_service_foo_p_j5s_proto_init() } +func file_j5st_v1_service_foo_p_j5s_proto_init() { + if File_j5st_v1_service_foo_p_j5s_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_j5st_v1_service_foo_p_j5s_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*FooGetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_service_foo_p_j5s_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FooGetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_service_foo_p_j5s_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*FooListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_service_foo_p_j5s_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*FooListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_service_foo_p_j5s_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*FooEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_service_foo_p_j5s_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*FooEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_j5st_v1_service_foo_p_j5s_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_j5st_v1_service_foo_p_j5s_proto_goTypes, + DependencyIndexes: file_j5st_v1_service_foo_p_j5s_proto_depIdxs, + MessageInfos: file_j5st_v1_service_foo_p_j5s_proto_msgTypes, + }.Build() + File_j5st_v1_service_foo_p_j5s_proto = out.File + file_j5st_v1_service_foo_p_j5s_proto_rawDesc = nil + file_j5st_v1_service_foo_p_j5s_proto_goTypes = nil + file_j5st_v1_service_foo_p_j5s_proto_depIdxs = nil +} diff --git a/j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s_sugar.pb.go b/j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s_sugar.pb.go new file mode 100644 index 0000000..a9dc8d4 --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_spb/foo.p.j5s_sugar.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-go-sugar. DO NOT EDIT. + +package j5st_spb diff --git a/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s.pb.go b/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s.pb.go new file mode 100644 index 0000000..8923bc7 --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s.pb.go @@ -0,0 +1,326 @@ +// Code generated by j5convert. DO NOT EDIT. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: j5st/v1/topic/foo.p.j5s.proto + +package j5st_tpb + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "github.com/pentops/j5/gen/j5/ext/v1/ext_j5pb" + messaging_j5pb "github.com/pentops/j5/gen/j5/messaging/v1/messaging_j5pb" + psm_j5pb "github.com/pentops/j5/gen/j5/state/v1/psm_j5pb" + j5st_pb "github.com/pentops/j5build/j5stest/gen/j5st/v1/j5st_pb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FooEventMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *psm_j5pb.EventPublishMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Keys *j5st_pb.FooKeys `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` + Event *j5st_pb.FooEventType `protobuf:"bytes,3,opt,name=event,proto3" json:"event,omitempty"` + Data *j5st_pb.FooData `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + Status j5st_pb.FooStatus `protobuf:"varint,5,opt,name=status,proto3,enum=j5st.v1.FooStatus" json:"status,omitempty"` +} + +func (x *FooEventMessage) Reset() { + *x = FooEventMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_topic_foo_p_j5s_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooEventMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooEventMessage) ProtoMessage() {} + +func (x *FooEventMessage) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_topic_foo_p_j5s_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooEventMessage.ProtoReflect.Descriptor instead. +func (*FooEventMessage) Descriptor() ([]byte, []int) { + return file_j5st_v1_topic_foo_p_j5s_proto_rawDescGZIP(), []int{0} +} + +func (x *FooEventMessage) GetMetadata() *psm_j5pb.EventPublishMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *FooEventMessage) GetKeys() *j5st_pb.FooKeys { + if x != nil { + return x.Keys + } + return nil +} + +func (x *FooEventMessage) GetEvent() *j5st_pb.FooEventType { + if x != nil { + return x.Event + } + return nil +} + +func (x *FooEventMessage) GetData() *j5st_pb.FooData { + if x != nil { + return x.Data + } + return nil +} + +func (x *FooEventMessage) GetStatus() j5st_pb.FooStatus { + if x != nil { + return x.Status + } + return j5st_pb.FooStatus(0) +} + +type FooSummaryMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Upsert *messaging_j5pb.UpsertMetadata `protobuf:"bytes,1,opt,name=upsert,proto3" json:"upsert,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *FooSummaryMessage) Reset() { + *x = FooSummaryMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_j5st_v1_topic_foo_p_j5s_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FooSummaryMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FooSummaryMessage) ProtoMessage() {} + +func (x *FooSummaryMessage) ProtoReflect() protoreflect.Message { + mi := &file_j5st_v1_topic_foo_p_j5s_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FooSummaryMessage.ProtoReflect.Descriptor instead. +func (*FooSummaryMessage) Descriptor() ([]byte, []int) { + return file_j5st_v1_topic_foo_p_j5s_proto_rawDescGZIP(), []int{1} +} + +func (x *FooSummaryMessage) GetUpsert() *messaging_j5pb.UpsertMetadata { + if x != nil { + return x.Upsert + } + return nil +} + +func (x *FooSummaryMessage) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_j5st_v1_topic_foo_p_j5s_proto protoreflect.FileDescriptor + +var file_j5st_v1_topic_foo_p_j5s_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x2f, + 0x66, 0x6f, 0x6f, 0x2e, 0x70, 0x2e, 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0d, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x1a, 0x1b, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6a, 0x35, 0x2f, 0x65, 0x78, 0x74, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6a, 0x35, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6a, 0x35, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6a, 0x35, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x15, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x6f, 0x6f, 0x2e, + 0x6a, 0x35, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x02, 0x0a, 0x0f, 0x46, 0x6f, + 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4c, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x6a, 0x35, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, + 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6a, 0x35, 0x73, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x4b, 0x65, 0x79, 0x73, 0x42, 0x0d, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, + 0x8e, 0x02, 0x02, 0x62, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6a, 0x35, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x42, 0x0d, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x12, 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x12, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, + 0x10, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x5a, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x46, + 0x6f, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x46, 0x0a, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x6a, 0x35, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x0d, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, + 0x52, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xc2, 0xff, 0x8e, 0x02, 0x03, 0xf2, 0x01, 0x00, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x07, 0xc2, 0xff, 0x8e, 0x02, 0x02, 0x52, 0x00, 0x32, + 0x7b, 0x0a, 0x0f, 0x46, 0x6f, 0x6f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x12, 0x44, 0x0a, 0x08, 0x46, 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1e, + 0x2e, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x2e, 0x46, + 0x6f, 0x6f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x1a, 0x22, 0xda, 0xa2, 0xf5, 0xe4, 0x02, 0x1c, + 0x0a, 0x0b, 0x66, 0x6f, 0x6f, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x6a, 0x0d, 0x0a, + 0x0b, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x7f, 0x0a, 0x0f, + 0x46, 0x6f, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, + 0x48, 0x0a, 0x0a, 0x46, 0x6f, 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x2e, + 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x2e, 0x46, 0x6f, + 0x6f, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x1a, 0x22, 0xda, 0xa2, 0xf5, 0xe4, 0x02, + 0x1c, 0x0a, 0x0b, 0x66, 0x6f, 0x6f, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x72, 0x0d, + 0x0a, 0x0b, 0x6a, 0x35, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6f, 0x42, 0x39, 0x5a, + 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x6e, 0x74, + 0x6f, 0x70, 0x73, 0x2f, 0x6a, 0x35, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x6a, 0x35, 0x73, 0x74, + 0x65, 0x73, 0x74, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6a, 0x35, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x6a, 0x35, 0x73, 0x74, 0x5f, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_j5st_v1_topic_foo_p_j5s_proto_rawDescOnce sync.Once + file_j5st_v1_topic_foo_p_j5s_proto_rawDescData = file_j5st_v1_topic_foo_p_j5s_proto_rawDesc +) + +func file_j5st_v1_topic_foo_p_j5s_proto_rawDescGZIP() []byte { + file_j5st_v1_topic_foo_p_j5s_proto_rawDescOnce.Do(func() { + file_j5st_v1_topic_foo_p_j5s_proto_rawDescData = protoimpl.X.CompressGZIP(file_j5st_v1_topic_foo_p_j5s_proto_rawDescData) + }) + return file_j5st_v1_topic_foo_p_j5s_proto_rawDescData +} + +var file_j5st_v1_topic_foo_p_j5s_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_j5st_v1_topic_foo_p_j5s_proto_goTypes = []any{ + (*FooEventMessage)(nil), // 0: j5st.v1.topic.FooEventMessage + (*FooSummaryMessage)(nil), // 1: j5st.v1.topic.FooSummaryMessage + (*psm_j5pb.EventPublishMetadata)(nil), // 2: j5.state.v1.EventPublishMetadata + (*j5st_pb.FooKeys)(nil), // 3: j5st.v1.FooKeys + (*j5st_pb.FooEventType)(nil), // 4: j5st.v1.FooEventType + (*j5st_pb.FooData)(nil), // 5: j5st.v1.FooData + (j5st_pb.FooStatus)(0), // 6: j5st.v1.FooStatus + (*messaging_j5pb.UpsertMetadata)(nil), // 7: j5.messaging.v1.UpsertMetadata + (*emptypb.Empty)(nil), // 8: google.protobuf.Empty +} +var file_j5st_v1_topic_foo_p_j5s_proto_depIdxs = []int32{ + 2, // 0: j5st.v1.topic.FooEventMessage.metadata:type_name -> j5.state.v1.EventPublishMetadata + 3, // 1: j5st.v1.topic.FooEventMessage.keys:type_name -> j5st.v1.FooKeys + 4, // 2: j5st.v1.topic.FooEventMessage.event:type_name -> j5st.v1.FooEventType + 5, // 3: j5st.v1.topic.FooEventMessage.data:type_name -> j5st.v1.FooData + 6, // 4: j5st.v1.topic.FooEventMessage.status:type_name -> j5st.v1.FooStatus + 7, // 5: j5st.v1.topic.FooSummaryMessage.upsert:type_name -> j5.messaging.v1.UpsertMetadata + 0, // 6: j5st.v1.topic.FooPublishTopic.FooEvent:input_type -> j5st.v1.topic.FooEventMessage + 1, // 7: j5st.v1.topic.FooSummaryTopic.FooSummary:input_type -> j5st.v1.topic.FooSummaryMessage + 8, // 8: j5st.v1.topic.FooPublishTopic.FooEvent:output_type -> google.protobuf.Empty + 8, // 9: j5st.v1.topic.FooSummaryTopic.FooSummary:output_type -> google.protobuf.Empty + 8, // [8:10] is the sub-list for method output_type + 6, // [6:8] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_j5st_v1_topic_foo_p_j5s_proto_init() } +func file_j5st_v1_topic_foo_p_j5s_proto_init() { + if File_j5st_v1_topic_foo_p_j5s_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_j5st_v1_topic_foo_p_j5s_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*FooEventMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_j5st_v1_topic_foo_p_j5s_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FooSummaryMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_j5st_v1_topic_foo_p_j5s_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_j5st_v1_topic_foo_p_j5s_proto_goTypes, + DependencyIndexes: file_j5st_v1_topic_foo_p_j5s_proto_depIdxs, + MessageInfos: file_j5st_v1_topic_foo_p_j5s_proto_msgTypes, + }.Build() + File_j5st_v1_topic_foo_p_j5s_proto = out.File + file_j5st_v1_topic_foo_p_j5s_proto_rawDesc = nil + file_j5st_v1_topic_foo_p_j5s_proto_goTypes = nil + file_j5st_v1_topic_foo_p_j5s_proto_depIdxs = nil +} diff --git a/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_o5_messaging.pb.go b/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_o5_messaging.pb.go new file mode 100644 index 0000000..d61744f --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_o5_messaging.pb.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-go-o5-messaging. DO NOT EDIT. +// versions: +// - protoc-gen-go-o5-messaging 0.0.0 +// source: j5st/v1/topic/foo.p.j5s.proto + +package j5st_tpb + +import ( + context "context" + messaging_pb "github.com/pentops/o5-messaging/gen/o5/messaging/v1/messaging_pb" + o5msg "github.com/pentops/o5-messaging/o5msg" +) + +// Service: FooPublishTopic +// Method: FooEvent + +func (msg *FooEventMessage) O5MessageHeader() o5msg.Header { + header := o5msg.Header{ + GrpcService: "j5st.v1.topic.FooPublishTopic", + GrpcMethod: "FooEvent", + Headers: map[string]string{}, + DestinationTopic: "foo_publish", + } + header.Extension = &messaging_pb.Message_Event_{ + Event: &messaging_pb.Message_Event{ + EntityName: "j5st.v1.Foo", + }, + } + return header +} + +type FooPublishTopicTxSender[C any] struct { + sender o5msg.TxSender[C] +} + +func NewFooPublishTopicTxSender[C any](sender o5msg.TxSender[C]) *FooPublishTopicTxSender[C] { + sender.Register(o5msg.TopicDescriptor{ + Service: "j5st.v1.topic.FooPublishTopic", + Methods: []o5msg.MethodDescriptor{ + { + Name: "FooEvent", + Message: (*FooEventMessage).ProtoReflect(nil).Descriptor(), + }, + }, + }) + return &FooPublishTopicTxSender[C]{sender: sender} +} + +type FooPublishTopicCollector[C any] struct { + collector o5msg.Collector[C] +} + +func NewFooPublishTopicCollector[C any](collector o5msg.Collector[C]) *FooPublishTopicCollector[C] { + collector.Register(o5msg.TopicDescriptor{ + Service: "j5st.v1.topic.FooPublishTopic", + Methods: []o5msg.MethodDescriptor{ + { + Name: "FooEvent", + Message: (*FooEventMessage).ProtoReflect(nil).Descriptor(), + }, + }, + }) + return &FooPublishTopicCollector[C]{collector: collector} +} + +type FooPublishTopicPublisher struct { + publisher o5msg.Publisher +} + +func NewFooPublishTopicPublisher(publisher o5msg.Publisher) *FooPublishTopicPublisher { + publisher.Register(o5msg.TopicDescriptor{ + Service: "j5st.v1.topic.FooPublishTopic", + Methods: []o5msg.MethodDescriptor{ + { + Name: "FooEvent", + Message: (*FooEventMessage).ProtoReflect(nil).Descriptor(), + }, + }, + }) + return &FooPublishTopicPublisher{publisher: publisher} +} + +// Method: FooEvent + +func (send FooPublishTopicTxSender[C]) FooEvent(ctx context.Context, sendContext C, msg *FooEventMessage) error { + return send.sender.Send(ctx, sendContext, msg) +} + +func (collect FooPublishTopicCollector[C]) FooEvent(sendContext C, msg *FooEventMessage) { + collect.collector.Collect(sendContext, msg) +} + +func (publish FooPublishTopicPublisher) FooEvent(ctx context.Context, msg *FooEventMessage) error { + return publish.publisher.Publish(ctx, msg) +} + +// Service: FooSummaryTopic +// Method: FooSummary + +func (msg *FooSummaryMessage) O5MessageHeader() o5msg.Header { + header := o5msg.Header{ + GrpcService: "j5st.v1.topic.FooSummaryTopic", + GrpcMethod: "FooSummary", + Headers: map[string]string{}, + DestinationTopic: "foo_summary", + } + header.Extension = &messaging_pb.Message_Upsert_{ + Upsert: &messaging_pb.Message_Upsert{ + EntityName: "j5st.v1.Foo", + }, + } + return header +} + +type FooSummaryTopicTxSender[C any] struct { + sender o5msg.TxSender[C] +} + +func NewFooSummaryTopicTxSender[C any](sender o5msg.TxSender[C]) *FooSummaryTopicTxSender[C] { + sender.Register(o5msg.TopicDescriptor{ + Service: "j5st.v1.topic.FooSummaryTopic", + Methods: []o5msg.MethodDescriptor{ + { + Name: "FooSummary", + Message: (*FooSummaryMessage).ProtoReflect(nil).Descriptor(), + }, + }, + }) + return &FooSummaryTopicTxSender[C]{sender: sender} +} + +type FooSummaryTopicCollector[C any] struct { + collector o5msg.Collector[C] +} + +func NewFooSummaryTopicCollector[C any](collector o5msg.Collector[C]) *FooSummaryTopicCollector[C] { + collector.Register(o5msg.TopicDescriptor{ + Service: "j5st.v1.topic.FooSummaryTopic", + Methods: []o5msg.MethodDescriptor{ + { + Name: "FooSummary", + Message: (*FooSummaryMessage).ProtoReflect(nil).Descriptor(), + }, + }, + }) + return &FooSummaryTopicCollector[C]{collector: collector} +} + +type FooSummaryTopicPublisher struct { + publisher o5msg.Publisher +} + +func NewFooSummaryTopicPublisher(publisher o5msg.Publisher) *FooSummaryTopicPublisher { + publisher.Register(o5msg.TopicDescriptor{ + Service: "j5st.v1.topic.FooSummaryTopic", + Methods: []o5msg.MethodDescriptor{ + { + Name: "FooSummary", + Message: (*FooSummaryMessage).ProtoReflect(nil).Descriptor(), + }, + }, + }) + return &FooSummaryTopicPublisher{publisher: publisher} +} + +// Method: FooSummary + +func (send FooSummaryTopicTxSender[C]) FooSummary(ctx context.Context, sendContext C, msg *FooSummaryMessage) error { + return send.sender.Send(ctx, sendContext, msg) +} + +func (collect FooSummaryTopicCollector[C]) FooSummary(sendContext C, msg *FooSummaryMessage) { + collect.collector.Collect(sendContext, msg) +} + +func (publish FooSummaryTopicPublisher) FooSummary(ctx context.Context, msg *FooSummaryMessage) error { + return publish.publisher.Publish(ctx, msg) +} diff --git a/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_sugar.pb.go b/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_sugar.pb.go new file mode 100644 index 0000000..b992239 --- /dev/null +++ b/j5stest/gen/j5st/v1/j5st_tpb/foo.p.j5s_sugar.pb.go @@ -0,0 +1,3 @@ +// Code generated by protoc-gen-go-sugar. DO NOT EDIT. + +package j5st_tpb diff --git a/j5stest/j5.yaml b/j5stest/j5.yaml index 45ffee9..c0cd93d 100644 --- a/j5stest/j5.yaml +++ b/j5stest/j5.yaml @@ -1,4 +1,50 @@ --- +bundles: + - name: j5stest + dir: proto -packages: - - name: foo.v1 +generate: + - name: test + mods: + - goPackageNames: + prefix: "github.com/pentops/j5build/j5stest/gen" + trimPrefixes: [] + inputs: + - local: j5stest + output: . + opts: + paths: import + module: github.com/pentops/j5build/j5stest + plugins: + - base: go + - base: go-sugar + - base: go-o5-messaging + +managedPaths: + - gen + +plugins: + - name: go + type: PLUGIN_PROTO + docker: + image: ghcr.io/pentops/protoc-gen-go:v1.34.2 + + - name: go-sugar + type: PLUGIN_PROTO + docker: + image: ghcr.io/pentops/protoc-gen-go-sugar:b1e769eeea97192209ab5a4e8fc560bf72ce5ba7 + + - name: go-o5-messaging + base: go + docker: + image: ghcr.io/pentops/protoc-gen-go-o5-messaging:de51c0e702a323018fbce11df5cef4075b729e50 + + - name: go-psm + base: go + docker: + image: ghcr.io/pentops/protoc-gen-go-protostate:5d0574ed788c9c203c8f6935db30856aa35ac9bf + +pluginOverrides: + - name: go-o5-messaging + local: + cmd: protoc-gen-go-o5-messaging diff --git a/j5stest/proto/j5.bundle.yaml b/j5stest/proto/j5.bundle.yaml new file mode 100644 index 0000000..e3c5979 --- /dev/null +++ b/j5stest/proto/j5.bundle.yaml @@ -0,0 +1,9 @@ +--- + +packages: + - name: j5st.v1 + +options: + subPackages: + - name: "service" + - name: "topic" diff --git a/j5stest/foo/v1/foo.j5s b/j5stest/proto/j5st/v1/foo.j5s similarity index 77% rename from j5stest/foo/v1/foo.j5s rename to j5stest/proto/j5st/v1/foo.j5s index 3f303cd..01b4e3e 100644 --- a/j5stest/foo/v1/foo.j5s +++ b/j5stest/proto/j5st/v1/foo.j5s @@ -1,4 +1,4 @@ -package foo.v1 +package j5st.v1 entity Foo { | Foo is lorem ipsum @@ -16,4 +16,8 @@ entity Foo { event Archive { } + + summary { + field name string + } } diff --git a/j5stest/foo/v1/foo.j5s.proto b/j5stest/proto/j5st/v1/foo.j5s.proto similarity index 99% rename from j5stest/foo/v1/foo.j5s.proto rename to j5stest/proto/j5st/v1/foo.j5s.proto index 9dab646..0ecfdae 100644 --- a/j5stest/foo/v1/foo.j5s.proto +++ b/j5stest/proto/j5st/v1/foo.j5s.proto @@ -2,7 +2,7 @@ syntax = "proto3"; -package foo.v1; +package j5st.v1; import "buf/validate/validate.proto"; import "j5/ext/v1/annotations.proto"; diff --git a/j5stest/foo/v1/service/foo.p.j5s.proto b/j5stest/proto/j5st/v1/service/foo.p.j5s.proto similarity index 82% rename from j5stest/foo/v1/service/foo.p.j5s.proto rename to j5stest/proto/j5st/v1/service/foo.p.j5s.proto index 96749f9..6f45f56 100644 --- a/j5stest/foo/v1/service/foo.p.j5s.proto +++ b/j5stest/proto/j5st/v1/service/foo.p.j5s.proto @@ -2,30 +2,30 @@ syntax = "proto3"; -package foo.v1.service; +package j5st.v1.service; import "buf/validate/validate.proto"; -import "foo/v1/foo.j5s.proto"; import "google/api/annotations.proto"; import "j5/ext/v1/annotations.proto"; import "j5/list/v1/page.proto"; import "j5/list/v1/query.proto"; +import "j5st/v1/foo.j5s.proto"; service FooQueryService { option (j5.ext.v1.service).state_query.entity = "foo"; rpc FooGet(FooGetRequest) returns (FooGetResponse) { - option (google.api.http) = {get: "/foo/v1/foo/q"}; + option (google.api.http) = {get: "/j5st/v1/foo/q"}; option (j5.ext.v1.method).state_query.get = true; } rpc FooList(FooListRequest) returns (FooListResponse) { - option (google.api.http) = {get: "/foo/v1/foo/q"}; + option (google.api.http) = {get: "/j5st/v1/foo/q"}; option (j5.ext.v1.method).state_query.list = true; } rpc FooEvents(FooEventsRequest) returns (FooEventsResponse) { - option (google.api.http) = {get: "/foo/v1/foo/q/events"}; + option (google.api.http) = {get: "/j5st/v1/foo/q/events"}; option (j5.ext.v1.method).state_query.list_events = true; } } @@ -37,7 +37,7 @@ message FooGetRequest { message FooGetResponse { option (j5.ext.v1.message).object = {}; - foo.v1.FooState foo = 1 [ + j5st.v1.FooState foo = 1 [ (buf.validate.field).required = true, (j5.ext.v1.field).object = {} ]; @@ -54,7 +54,7 @@ message FooListRequest { message FooListResponse { option (j5.ext.v1.message).object = {}; - repeated foo.v1.FooState foo = 1 [ + repeated j5st.v1.FooState foo = 1 [ (buf.validate.field).required = true, (j5.ext.v1.field).array = {} ]; @@ -73,7 +73,7 @@ message FooEventsRequest { message FooEventsResponse { option (j5.ext.v1.message).object = {}; - repeated foo.v1.FooEvent events = 1 [(j5.ext.v1.field).array = {}]; + repeated j5st.v1.FooEvent events = 1 [(j5.ext.v1.field).array = {}]; j5.list.v1.PageResponse page = 2 [(j5.ext.v1.field).object = {}]; } diff --git a/j5stest/foo/v1/topic/foo.p.j5s.proto b/j5stest/proto/j5st/v1/topic/foo.p.j5s.proto similarity index 57% rename from j5stest/foo/v1/topic/foo.p.j5s.proto rename to j5stest/proto/j5st/v1/topic/foo.p.j5s.proto index f41781e..63bc282 100644 --- a/j5stest/foo/v1/topic/foo.p.j5s.proto +++ b/j5stest/proto/j5st/v1/topic/foo.p.j5s.proto @@ -2,25 +2,38 @@ syntax = "proto3"; -package foo.v1.topic; +package j5st.v1.topic; import "buf/validate/validate.proto"; -import "foo/v1/foo.j5s.proto"; import "google/protobuf/empty.proto"; import "j5/ext/v1/annotations.proto"; import "j5/messaging/v1/annotations.proto"; +import "j5/messaging/v1/upsert.proto"; import "j5/state/v1/metadata.proto"; +import "j5st/v1/foo.j5s.proto"; service FooPublishTopic { option (j5.messaging.v1.service) = { topic_name: "foo_publish" - publish: { + event: { + entity_name: "j5st.v1.Foo" } }; rpc FooEvent(FooEventMessage) returns (google.protobuf.Empty) {} } +service FooSummaryTopic { + option (j5.messaging.v1.service) = { + topic_name: "foo_summary" + upsert: { + entity_name: "j5st.v1.Foo" + } + }; + + rpc FooSummary(FooSummaryMessage) returns (google.protobuf.Empty) {} +} + message FooEventMessage { option (j5.ext.v1.message).object = {}; @@ -29,22 +42,22 @@ message FooEventMessage { (j5.ext.v1.field).object = {} ]; - foo.v1.FooKeys keys = 2 [ + j5st.v1.FooKeys keys = 2 [ (buf.validate.field).required = true, (j5.ext.v1.field).object = {} ]; - foo.v1.FooEventType event = 3 [ + j5st.v1.FooEventType event = 3 [ (buf.validate.field).required = true, (j5.ext.v1.field).oneof = {} ]; - foo.v1.FooData data = 4 [ + j5st.v1.FooData data = 4 [ (buf.validate.field).required = true, (j5.ext.v1.field).object = {} ]; - foo.v1.FooStatus status = 5 [ + j5st.v1.FooStatus status = 5 [ (buf.validate.field) = { required: true enum: { @@ -54,3 +67,14 @@ message FooEventMessage { (j5.ext.v1.field).enum = {} ]; } + +message FooSummaryMessage { + option (j5.ext.v1.message).object = {}; + + j5.messaging.v1.UpsertMetadata upsert = 1 [ + (buf.validate.field).required = true, + (j5.ext.v1.field).object = {} + ]; + + string name = 2 [(j5.ext.v1.field).string = {}]; +} diff --git a/proto/j5build/j5/sourcedef/v1/file.proto b/proto/j5build/j5/sourcedef/v1/file.proto index f0604d0..08db189 100644 --- a/proto/j5build/j5/sourcedef/v1/file.proto +++ b/proto/j5build/j5/sourcedef/v1/file.proto @@ -59,6 +59,8 @@ message Entity { repeated NestedSchema schemas = 7; repeated Service commands = 8 [(j5.ext.v1.field).array.single_form = "command"]; + + repeated EntitySummary summaries = 10 [(j5.ext.v1.field).array.single_form = "summary"]; } message APIMethod { @@ -94,6 +96,15 @@ message Service { j5.ext.v1.ServiceOptions options = 5; } +// A Topic to publish the entity state as an 'upsert', allowing other services +// to track the state without the full event history. +message EntitySummary { + string name = 1; + string description = 2; + + repeated j5.schema.v1.ObjectProperty fields = 3 [(j5.ext.v1.field).array.single_form = "field"]; +} + message NestedSchema { oneof type { Oneof oneof = 1; @@ -108,15 +119,26 @@ message EntityKey { (j5.ext.v1.field).message.flatten = true ]; - // When true, this field will be added included in all endpoints to identify + // When true, this field will be added included in all endpoint> // the DB shard. // The field must be required - // If it is a primary key, the Get and GetEvents endpoints are not modified, + // If it is a primary key, the Get and GetEvents endpoints are > // but it is added to the ListEvents endpoint. // If it is not a primary key, it is added to all endpoints. - // The order in the path, like primary keys, is defined by the lexical order + // The order in the path, like primary keys, is defined by the > // of the fields in the source file. + bool shard_key = 2; + + // Marks the key as participating in the primary key of this entity + bool primary_key = 3; + + // Marks the field as a foreign key to the given entity. + j5.schema.v1.EntityRef foreign_key = 4; + + // Marks the field as containing a tenant_id for the given tenant. Copies to + // j5.state.v1.PublishAuth.tenant_keys on publish + optional string tenant_type = 5; } message Oneof { @@ -147,6 +169,7 @@ message TopicType { Publish publish = 1; ReqRes reqres = 2; Upsert upsert = 3; + Event event = 4; } message Publish { @@ -159,6 +182,12 @@ message TopicType { } message Upsert { + string entity_name = 1; + TopicMethod message = 2 [(buf.validate.field).required = true]; + } + + message Event { + string entity_name = 1; TopicMethod message = 2 [(buf.validate.field).required = true]; } }