From b60696bbedde0edabbb0690589bc5e47036ad1e5 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 29 Jul 2023 20:21:19 -0700 Subject: [PATCH] Removed resources A graph is now only comprised of nodes. The workflow code is broke and the studio doesn't work, but the representation of things is much more condensed. --- gen/block.pb.go | 1137 ---------- gen/code/code.pb.go | 386 ++++ gen/data/data.pb.go | 316 +++ gen/genconnect/project.connect.go | 143 +- gen/graph.pb.go | 531 ++--- gen/grpc/grpc.pb.go | 335 +++ gen/http.pb.go | 322 --- gen/http/http.pb.go | 643 ++++++ gen/project.pb.go | 1841 ++++++----------- gen/project_grpc.pb.go | 136 +- gen/reason/reason.pb.go | 307 +++ gen/resource.pb.go | 1136 ---------- gen/storage/storage.pb.go | 568 +++++ pkg/api/http.go | 14 +- pkg/generate/generate.go | 33 +- pkg/generate/golang.go | 4 +- pkg/generate/nodejs.go | 19 +- pkg/grpc/blocks.go | 30 +- pkg/node/base/node.go | 77 + pkg/node/code/function.go | 168 ++ .../node => node/code}/function_test.go | 2 +- pkg/node/code/node.go | 18 + pkg/node/data/config.go | 56 + pkg/node/data/data.go | 18 + pkg/{workflow/node => node/data}/input.go | 15 +- pkg/{workflow/node => node/grpc}/grpc.go | 89 +- pkg/node/grpc/node.go | 18 + pkg/node/http/http.go | 100 + pkg/node/http/node.go | 20 + pkg/node/http/route.go | 69 + pkg/node/http/template.go | 57 + pkg/node/node.go | 38 + pkg/node/reason/node.go | 18 + .../reasonengine.go => node/reason/reason.go} | 78 +- .../node => node/storage}/blobstore.go | 39 +- .../node => node/storage}/docstore.go | 69 +- pkg/node/storage/node.go | 11 + pkg/project/default.go | 60 +- pkg/project/project.go | 4 - pkg/project/provider.go | 24 + pkg/project/resource.go | 88 - pkg/project/service.go | 67 +- pkg/project/workflow.go | 14 +- pkg/workflow/graph/project.go | 14 +- pkg/workflow/graph/types.go | 25 +- pkg/workflow/info.go | 20 +- pkg/workflow/node/base.go | 56 - pkg/workflow/node/config.go | 23 - pkg/workflow/node/function.go | 119 -- pkg/workflow/node/httpservice.go | 152 -- pkg/workflow/node/node.go | 41 - pkg/workflow/resource/blobstore.go | 30 - pkg/workflow/resource/configprovider.go | 49 - pkg/workflow/resource/docstore.go | 60 - pkg/workflow/resource/grpc.go | 24 - pkg/workflow/resource/httpservice.go | 48 - pkg/workflow/resource/language.go | 46 - pkg/workflow/resource/reasonengine.go | 44 - pkg/workflow/resource/resource.go | 126 -- pkg/workflow/resource/resource_test.go | 120 -- pkg/workflow/resource/templateservice.go | 14 - pkg/workflow/workflow.go | 90 +- pkg/workflow/workflow_test.go | 19 +- proto/block.proto | 78 - proto/code/code.proto | 29 + proto/data/data.proto | 22 + proto/graph.proto | 45 +- proto/grpc/grpc.proto | 21 + proto/http.proto | 21 - proto/http/http.proto | 42 + proto/project.proto | 66 +- proto/reason/reason.proto | 19 + proto/resource.proto | 76 - proto/storage/storage.proto | 37 + studio/src/rpc/code/code_pb.ts | 167 ++ studio/src/rpc/data/data_pb.ts | 137 ++ studio/src/rpc/graph_pb.ts | 180 +- studio/src/rpc/grpc/grpc_pb.ts | 144 ++ studio/src/rpc/http/http_pb.ts | 323 +++ studio/src/rpc/project_connect.ts | 39 +- studio/src/rpc/project_pb.ts | 460 +--- studio/src/rpc/reason/reason_pb.ts | 126 ++ studio/src/rpc/storage/storage_pb.ts | 263 +++ 83 files changed, 6040 insertions(+), 6493 deletions(-) delete mode 100644 gen/block.pb.go create mode 100644 gen/code/code.pb.go create mode 100644 gen/data/data.pb.go create mode 100644 gen/grpc/grpc.pb.go delete mode 100644 gen/http.pb.go create mode 100644 gen/http/http.pb.go create mode 100644 gen/reason/reason.pb.go delete mode 100644 gen/resource.pb.go create mode 100644 gen/storage/storage.pb.go create mode 100644 pkg/node/base/node.go create mode 100644 pkg/node/code/function.go rename pkg/{workflow/node => node/code}/function_test.go (98%) create mode 100644 pkg/node/code/node.go create mode 100644 pkg/node/data/config.go create mode 100644 pkg/node/data/data.go rename pkg/{workflow/node => node/data}/input.go (57%) rename pkg/{workflow/node => node/grpc}/grpc.go (68%) create mode 100644 pkg/node/grpc/node.go create mode 100644 pkg/node/http/http.go create mode 100644 pkg/node/http/node.go create mode 100644 pkg/node/http/route.go create mode 100644 pkg/node/http/template.go create mode 100644 pkg/node/node.go create mode 100644 pkg/node/reason/node.go rename pkg/{workflow/node/reasonengine.go => node/reason/reason.go} (51%) rename pkg/{workflow/node => node/storage}/blobstore.go (72%) rename pkg/{workflow/node => node/storage}/docstore.go (64%) create mode 100644 pkg/node/storage/node.go create mode 100644 pkg/project/provider.go delete mode 100644 pkg/project/resource.go delete mode 100644 pkg/workflow/node/base.go delete mode 100644 pkg/workflow/node/config.go delete mode 100644 pkg/workflow/node/function.go delete mode 100644 pkg/workflow/node/httpservice.go delete mode 100644 pkg/workflow/node/node.go delete mode 100644 pkg/workflow/resource/blobstore.go delete mode 100644 pkg/workflow/resource/configprovider.go delete mode 100644 pkg/workflow/resource/docstore.go delete mode 100644 pkg/workflow/resource/grpc.go delete mode 100644 pkg/workflow/resource/httpservice.go delete mode 100644 pkg/workflow/resource/language.go delete mode 100644 pkg/workflow/resource/reasonengine.go delete mode 100644 pkg/workflow/resource/resource.go delete mode 100644 pkg/workflow/resource/resource_test.go delete mode 100644 pkg/workflow/resource/templateservice.go delete mode 100644 proto/block.proto create mode 100644 proto/code/code.proto create mode 100644 proto/data/data.proto create mode 100644 proto/grpc/grpc.proto delete mode 100644 proto/http.proto create mode 100644 proto/http/http.proto create mode 100644 proto/reason/reason.proto delete mode 100644 proto/resource.proto create mode 100644 proto/storage/storage.proto create mode 100644 studio/src/rpc/code/code_pb.ts create mode 100644 studio/src/rpc/data/data_pb.ts create mode 100644 studio/src/rpc/grpc/grpc_pb.ts create mode 100644 studio/src/rpc/http/http_pb.ts create mode 100644 studio/src/rpc/reason/reason_pb.ts create mode 100644 studio/src/rpc/storage/storage_pb.ts diff --git a/gen/block.pb.go b/gen/block.pb.go deleted file mode 100644 index 52b113a..0000000 --- a/gen/block.pb.go +++ /dev/null @@ -1,1137 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: block.proto - -package gen - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/descriptorpb" - _ "google.golang.org/protobuf/types/known/anypb" - 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 FieldDefinition_FieldType int32 - -const ( - FieldDefinition_STRING FieldDefinition_FieldType = 0 - FieldDefinition_INTEGER FieldDefinition_FieldType = 1 - FieldDefinition_BOOLEAN FieldDefinition_FieldType = 2 -) - -// Enum value maps for FieldDefinition_FieldType. -var ( - FieldDefinition_FieldType_name = map[int32]string{ - 0: "STRING", - 1: "INTEGER", - 2: "BOOLEAN", - } - FieldDefinition_FieldType_value = map[string]int32{ - "STRING": 0, - "INTEGER": 1, - "BOOLEAN": 2, - } -) - -func (x FieldDefinition_FieldType) Enum() *FieldDefinition_FieldType { - p := new(FieldDefinition_FieldType) - *p = x - return p -} - -func (x FieldDefinition_FieldType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldDefinition_FieldType) Descriptor() protoreflect.EnumDescriptor { - return file_block_proto_enumTypes[0].Descriptor() -} - -func (FieldDefinition_FieldType) Type() protoreflect.EnumType { - return &file_block_proto_enumTypes[0] -} - -func (x FieldDefinition_FieldType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FieldDefinition_FieldType.Descriptor instead. -func (FieldDefinition_FieldType) EnumDescriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{12, 0} -} - -type Input struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Fields []*FieldDefinition `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` -} - -func (x *Input) Reset() { - *x = Input{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Input) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Input) ProtoMessage() {} - -func (x *Input) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Input.ProtoReflect.Descriptor instead. -func (*Input) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{0} -} - -func (x *Input) GetFields() []*FieldDefinition { - if x != nil { - return x.Fields - } - return nil -} - -type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Config) Reset() { - *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config) ProtoMessage() {} - -func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Config.ProtoReflect.Descriptor instead. -func (*Config) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{1} -} - -func (x *Config) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type Template struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` -} - -func (x *Template) Reset() { - *x = Template{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Template) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Template) ProtoMessage() {} - -func (x *Template) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Template.ProtoReflect.Descriptor instead. -func (*Template) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{2} -} - -func (x *Template) GetTemplate() string { - if x != nil { - return x.Template - } - return "" -} - -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{3} -} - -func (x *Route) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *Route) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{4} -} - -func (x *Secret) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type File struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *File) Reset() { - *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *File) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*File) ProtoMessage() {} - -func (x *File) ProtoReflect() protoreflect.Message { - mi := &file_block_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 File.ProtoReflect.Descriptor instead. -func (*File) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{5} -} - -func (x *File) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type Collection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Collection) Reset() { - *x = Collection{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Collection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Collection) ProtoMessage() {} - -func (x *Collection) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Collection.ProtoReflect.Descriptor instead. -func (*Collection) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{6} -} - -func (x *Collection) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type Bucket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *Bucket) Reset() { - *x = Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bucket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bucket) ProtoMessage() {} - -func (x *Bucket) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[7] - 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 Bucket.ProtoReflect.Descriptor instead. -func (*Bucket) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{7} -} - -func (x *Bucket) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type Function struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Function) Reset() { - *x = Function{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Function) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Function) ProtoMessage() {} - -func (x *Function) ProtoReflect() protoreflect.Message { - mi := &file_block_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 Function.ProtoReflect.Descriptor instead. -func (*Function) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{8} -} - -type Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"` -} - -func (x *Query) Reset() { - *x = Query{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Query) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Query) ProtoMessage() {} - -func (x *Query) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[9] - 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 Query.ProtoReflect.Descriptor instead. -func (*Query) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{9} -} - -func (x *Query) GetCollection() string { - if x != nil { - return x.Collection - } - return "" -} - -type Prompt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Prompt string `protobuf:"bytes,3,opt,name=prompt,proto3" json:"prompt,omitempty"` -} - -func (x *Prompt) Reset() { - *x = Prompt{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Prompt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Prompt) ProtoMessage() {} - -func (x *Prompt) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[10] - 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 Prompt.ProtoReflect.Descriptor instead. -func (*Prompt) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{10} -} - -func (x *Prompt) GetPrompt() string { - if x != nil { - return x.Prompt - } - return "" -} - -type Result struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *Result) Reset() { - *x = Result{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Result) ProtoMessage() {} - -func (x *Result) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[11] - 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 Result.ProtoReflect.Descriptor instead. -func (*Result) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{11} -} - -func (x *Result) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type FieldDefinition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type FieldDefinition_FieldType `protobuf:"varint,2,opt,name=type,proto3,enum=block.FieldDefinition_FieldType" json:"type,omitempty"` -} - -func (x *FieldDefinition) Reset() { - *x = FieldDefinition{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FieldDefinition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldDefinition) ProtoMessage() {} - -func (x *FieldDefinition) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[12] - 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 FieldDefinition.ProtoReflect.Descriptor instead. -func (*FieldDefinition) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{12} -} - -func (x *FieldDefinition) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *FieldDefinition) GetType() FieldDefinition_FieldType { - if x != nil { - return x.Type - } - return FieldDefinition_STRING -} - -type REST struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` - Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *REST) Reset() { - *x = REST{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *REST) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*REST) ProtoMessage() {} - -func (x *REST) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[13] - 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 REST.ProtoReflect.Descriptor instead. -func (*REST) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{13} -} - -func (x *REST) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *REST) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *REST) GetHeaders() map[string]string { - if x != nil { - return x.Headers - } - return nil -} - -type GRPC struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` - Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` -} - -func (x *GRPC) Reset() { - *x = GRPC{} - if protoimpl.UnsafeEnabled { - mi := &file_block_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPC) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPC) ProtoMessage() {} - -func (x *GRPC) ProtoReflect() protoreflect.Message { - mi := &file_block_proto_msgTypes[14] - 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 GRPC.ProtoReflect.Descriptor instead. -func (*GRPC) Descriptor() ([]byte, []int) { - return file_block_proto_rawDescGZIP(), []int{14} -} - -func (x *GRPC) GetPackage() string { - if x != nil { - return x.Package - } - return "" -} - -func (x *GRPC) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *GRPC) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -var File_block_proto protoreflect.FileDescriptor - -var file_block_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x37, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x1e, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x08, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x22, 0x33, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1a, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x22, 0x20, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1c, 0x0a, 0x06, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x22, 0x0a, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x27, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x06, 0x50, 0x72, 0x6f, 0x6d, - 0x70, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x22, 0x1c, 0x0a, 0x06, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x8e, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x31, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, - 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x22, 0xa2, 0x01, 0x0a, 0x04, 0x52, 0x45, - 0x53, 0x54, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x32, - 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x52, - 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x42, 0x74, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x42, - 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, - 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, - 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0xa2, 0x02, 0x03, 0x42, 0x58, 0x58, 0xaa, 0x02, 0x05, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0xca, 0x02, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0xe2, 0x02, 0x11, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_block_proto_rawDescOnce sync.Once - file_block_proto_rawDescData = file_block_proto_rawDesc -) - -func file_block_proto_rawDescGZIP() []byte { - file_block_proto_rawDescOnce.Do(func() { - file_block_proto_rawDescData = protoimpl.X.CompressGZIP(file_block_proto_rawDescData) - }) - return file_block_proto_rawDescData -} - -var file_block_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_block_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_block_proto_goTypes = []interface{}{ - (FieldDefinition_FieldType)(0), // 0: block.FieldDefinition.FieldType - (*Input)(nil), // 1: block.Input - (*Config)(nil), // 2: block.Config - (*Template)(nil), // 3: block.Template - (*Route)(nil), // 4: block.Route - (*Secret)(nil), // 5: block.Secret - (*File)(nil), // 6: block.File - (*Collection)(nil), // 7: block.Collection - (*Bucket)(nil), // 8: block.Bucket - (*Function)(nil), // 9: block.Function - (*Query)(nil), // 10: block.Query - (*Prompt)(nil), // 11: block.Prompt - (*Result)(nil), // 12: block.Result - (*FieldDefinition)(nil), // 13: block.FieldDefinition - (*REST)(nil), // 14: block.REST - (*GRPC)(nil), // 15: block.GRPC - nil, // 16: block.REST.HeadersEntry -} -var file_block_proto_depIdxs = []int32{ - 13, // 0: block.Input.fields:type_name -> block.FieldDefinition - 0, // 1: block.FieldDefinition.type:type_name -> block.FieldDefinition.FieldType - 16, // 2: block.REST.headers:type_name -> block.REST.HeadersEntry - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_block_proto_init() } -func file_block_proto_init() { - if File_block_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_block_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Input); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Template); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*File); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Collection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Function); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Prompt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Result); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldDefinition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*REST); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_block_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPC); 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_block_proto_rawDesc, - NumEnums: 1, - NumMessages: 16, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_block_proto_goTypes, - DependencyIndexes: file_block_proto_depIdxs, - EnumInfos: file_block_proto_enumTypes, - MessageInfos: file_block_proto_msgTypes, - }.Build() - File_block_proto = out.File - file_block_proto_rawDesc = nil - file_block_proto_goTypes = nil - file_block_proto_depIdxs = nil -} diff --git a/gen/code/code.pb.go b/gen/code/code.pb.go new file mode 100644 index 0000000..62f36da --- /dev/null +++ b/gen/code/code.pb.go @@ -0,0 +1,386 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: code/code.proto + +package code + +import ( + grpc "github.com/protoflow-labs/protoflow/gen/grpc" + 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 Runtime int32 + +const ( + Runtime_NODEJS Runtime = 0 + Runtime_PYTHON Runtime = 1 + Runtime_GO Runtime = 2 +) + +// Enum value maps for Runtime. +var ( + Runtime_name = map[int32]string{ + 0: "NODEJS", + 1: "PYTHON", + 2: "GO", + } + Runtime_value = map[string]int32{ + "NODEJS": 0, + "PYTHON": 1, + "GO": 2, + } +) + +func (x Runtime) Enum() *Runtime { + p := new(Runtime) + *p = x + return p +} + +func (x Runtime) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Runtime) Descriptor() protoreflect.EnumDescriptor { + return file_code_code_proto_enumTypes[0].Descriptor() +} + +func (Runtime) Type() protoreflect.EnumType { + return &file_code_code_proto_enumTypes[0] +} + +func (x Runtime) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Runtime.Descriptor instead. +func (Runtime) EnumDescriptor() ([]byte, []int) { + return file_code_code_proto_rawDescGZIP(), []int{0} +} + +type Function struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Function) Reset() { + *x = Function{} + if protoimpl.UnsafeEnabled { + mi := &file_code_code_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Function) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Function) ProtoMessage() {} + +func (x *Function) ProtoReflect() protoreflect.Message { + mi := &file_code_code_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 Function.ProtoReflect.Descriptor instead. +func (*Function) Descriptor() ([]byte, []int) { + return file_code_code_proto_rawDescGZIP(), []int{0} +} + +type Server struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Runtime Runtime `protobuf:"varint,1,opt,name=runtime,proto3,enum=code.Runtime" json:"runtime,omitempty"` + Grpc *grpc.Server `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // string containerURI = 4; +} + +func (x *Server) Reset() { + *x = Server{} + if protoimpl.UnsafeEnabled { + mi := &file_code_code_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Server) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Server) ProtoMessage() {} + +func (x *Server) ProtoReflect() protoreflect.Message { + mi := &file_code_code_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 Server.ProtoReflect.Descriptor instead. +func (*Server) Descriptor() ([]byte, []int) { + return file_code_code_proto_rawDescGZIP(), []int{1} +} + +func (x *Server) GetRuntime() Runtime { + if x != nil { + return x.Runtime + } + return Runtime_NODEJS +} + +func (x *Server) GetGrpc() *grpc.Server { + if x != nil { + return x.Grpc + } + return nil +} + +func (x *Server) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type Code struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Code_Function + // *Code_Server + Type isCode_Type `protobuf_oneof:"type"` +} + +func (x *Code) Reset() { + *x = Code{} + if protoimpl.UnsafeEnabled { + mi := &file_code_code_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Code) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Code) ProtoMessage() {} + +func (x *Code) ProtoReflect() protoreflect.Message { + mi := &file_code_code_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 Code.ProtoReflect.Descriptor instead. +func (*Code) Descriptor() ([]byte, []int) { + return file_code_code_proto_rawDescGZIP(), []int{2} +} + +func (m *Code) GetType() isCode_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Code) GetFunction() *Function { + if x, ok := x.GetType().(*Code_Function); ok { + return x.Function + } + return nil +} + +func (x *Code) GetServer() *Server { + if x, ok := x.GetType().(*Code_Server); ok { + return x.Server + } + return nil +} + +type isCode_Type interface { + isCode_Type() +} + +type Code_Function struct { + Function *Function `protobuf:"bytes,1,opt,name=function,proto3,oneof"` +} + +type Code_Server struct { + Server *Server `protobuf:"bytes,2,opt,name=server,proto3,oneof"` +} + +func (*Code_Function) isCode_Type() {} + +func (*Code_Server) isCode_Type() {} + +var File_code_code_proto protoreflect.FileDescriptor + +var file_code_code_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x1a, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x27, + 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x07, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, + 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x46, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x2a, 0x29, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x4e, 0x4f, 0x44, 0x45, 0x4a, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x59, + 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x4f, 0x10, 0x02, 0x42, 0x73, + 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x09, 0x43, 0x6f, 0x64, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x63, 0x6f, 0x64, 0x65, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x43, 0x6f, + 0x64, 0x65, 0xca, 0x02, 0x04, 0x43, 0x6f, 0x64, 0x65, 0xe2, 0x02, 0x10, 0x43, 0x6f, 0x64, 0x65, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x43, + 0x6f, 0x64, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_code_code_proto_rawDescOnce sync.Once + file_code_code_proto_rawDescData = file_code_code_proto_rawDesc +) + +func file_code_code_proto_rawDescGZIP() []byte { + file_code_code_proto_rawDescOnce.Do(func() { + file_code_code_proto_rawDescData = protoimpl.X.CompressGZIP(file_code_code_proto_rawDescData) + }) + return file_code_code_proto_rawDescData +} + +var file_code_code_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_code_code_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_code_code_proto_goTypes = []interface{}{ + (Runtime)(0), // 0: code.Runtime + (*Function)(nil), // 1: code.Function + (*Server)(nil), // 2: code.Server + (*Code)(nil), // 3: code.Code + (*grpc.Server)(nil), // 4: grpc.Server +} +var file_code_code_proto_depIdxs = []int32{ + 0, // 0: code.Server.runtime:type_name -> code.Runtime + 4, // 1: code.Server.grpc:type_name -> grpc.Server + 1, // 2: code.Code.function:type_name -> code.Function + 2, // 3: code.Code.server:type_name -> code.Server + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_code_code_proto_init() } +func file_code_code_proto_init() { + if File_code_code_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_code_code_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Function); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_code_code_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Server); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_code_code_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Code); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_code_code_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Code_Function)(nil), + (*Code_Server)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_code_code_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_code_code_proto_goTypes, + DependencyIndexes: file_code_code_proto_depIdxs, + EnumInfos: file_code_code_proto_enumTypes, + MessageInfos: file_code_code_proto_msgTypes, + }.Build() + File_code_code_proto = out.File + file_code_code_proto_rawDesc = nil + file_code_code_proto_goTypes = nil + file_code_code_proto_depIdxs = nil +} diff --git a/gen/data/data.pb.go b/gen/data/data.pb.go new file mode 100644 index 0000000..7477cee --- /dev/null +++ b/gen/data/data.pb.go @@ -0,0 +1,316 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: data/data.proto + +package data + +import ( + 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 Input struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Input) Reset() { + *x = Input{} + if protoimpl.UnsafeEnabled { + mi := &file_data_data_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Input) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input) ProtoMessage() {} + +func (x *Input) ProtoReflect() protoreflect.Message { + mi := &file_data_data_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 Input.ProtoReflect.Descriptor instead. +func (*Input) Descriptor() ([]byte, []int) { + return file_data_data_proto_rawDescGZIP(), []int{0} +} + +func (x *Input) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// TODO breadchris do we need an explicit provider for config? probably +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_data_data_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_data_data_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 Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_data_data_proto_rawDescGZIP(), []int{1} +} + +func (x *Config) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Data struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Data_Input + // *Data_Config + Type isData_Type `protobuf_oneof:"type"` +} + +func (x *Data) Reset() { + *x = Data{} + if protoimpl.UnsafeEnabled { + mi := &file_data_data_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_data_data_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 Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_data_data_proto_rawDescGZIP(), []int{2} +} + +func (m *Data) GetType() isData_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Data) GetInput() *Input { + if x, ok := x.GetType().(*Data_Input); ok { + return x.Input + } + return nil +} + +func (x *Data) GetConfig() *Config { + if x, ok := x.GetType().(*Data_Config); ok { + return x.Config + } + return nil +} + +type isData_Type interface { + isData_Type() +} + +type Data_Input struct { + Input *Input `protobuf:"bytes,1,opt,name=input,proto3,oneof"` +} + +type Data_Config struct { + Config *Config `protobuf:"bytes,2,opt,name=config,proto3,oneof"` +} + +func (*Data_Input) isData_Type() {} + +func (*Data_Config) isData_Type() {} + +var File_data_data_proto protoreflect.FileDescriptor + +var file_data_data_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1d, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1e, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5b, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x23, + 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x42, 0x73, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x09, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, + 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, + 0xaa, 0x02, 0x04, 0x44, 0x61, 0x74, 0x61, 0xca, 0x02, 0x04, 0x44, 0x61, 0x74, 0x61, 0xe2, 0x02, + 0x10, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x04, 0x44, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_data_data_proto_rawDescOnce sync.Once + file_data_data_proto_rawDescData = file_data_data_proto_rawDesc +) + +func file_data_data_proto_rawDescGZIP() []byte { + file_data_data_proto_rawDescOnce.Do(func() { + file_data_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_data_data_proto_rawDescData) + }) + return file_data_data_proto_rawDescData +} + +var file_data_data_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_data_data_proto_goTypes = []interface{}{ + (*Input)(nil), // 0: data.Input + (*Config)(nil), // 1: data.Config + (*Data)(nil), // 2: data.Data +} +var file_data_data_proto_depIdxs = []int32{ + 0, // 0: data.Data.input:type_name -> data.Input + 1, // 1: data.Data.config:type_name -> data.Config + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_data_data_proto_init() } +func file_data_data_proto_init() { + if File_data_data_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_data_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Input); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_data_data_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Data); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_data_data_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Data_Input)(nil), + (*Data_Config)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_data_data_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_data_data_proto_goTypes, + DependencyIndexes: file_data_data_proto_depIdxs, + MessageInfos: file_data_data_proto_msgTypes, + }.Build() + File_data_data_proto = out.File + file_data_data_proto_rawDesc = nil + file_data_data_proto_goTypes = nil + file_data_data_proto_depIdxs = nil +} diff --git a/gen/genconnect/project.connect.go b/gen/genconnect/project.connect.go index 91946f2..df9c6fe 100644 --- a/gen/genconnect/project.connect.go +++ b/gen/genconnect/project.connect.go @@ -56,18 +56,9 @@ const ( // ProjectServiceDeleteProjectProcedure is the fully-qualified name of the ProjectService's // DeleteProject RPC. ProjectServiceDeleteProjectProcedure = "/project.ProjectService/DeleteProject" - // ProjectServiceUpdateResourceProcedure is the fully-qualified name of the ProjectService's - // UpdateResource RPC. - ProjectServiceUpdateResourceProcedure = "/project.ProjectService/UpdateResource" - // ProjectServiceCreateResourceProcedure is the fully-qualified name of the ProjectService's - // CreateResource RPC. - ProjectServiceCreateResourceProcedure = "/project.ProjectService/CreateResource" - // ProjectServiceGetResourcesProcedure is the fully-qualified name of the ProjectService's - // GetResources RPC. - ProjectServiceGetResourcesProcedure = "/project.ProjectService/GetResources" - // ProjectServiceDeleteResourceProcedure is the fully-qualified name of the ProjectService's - // DeleteResource RPC. - ProjectServiceDeleteResourceProcedure = "/project.ProjectService/DeleteResource" + // ProjectServiceEnumerateProvidersProcedure is the fully-qualified name of the ProjectService's + // EnumerateProviders RPC. + ProjectServiceEnumerateProvidersProcedure = "/project.ProjectService/EnumerateProviders" // ProjectServiceGetNodeInfoProcedure is the fully-qualified name of the ProjectService's // GetNodeInfo RPC. ProjectServiceGetNodeInfoProcedure = "/project.ProjectService/GetNodeInfo" @@ -97,10 +88,7 @@ type ProjectServiceClient interface { GetProjects(context.Context, *connect_go.Request[gen.GetProjectsRequest]) (*connect_go.Response[gen.GetProjectsResponse], error) CreateProject(context.Context, *connect_go.Request[gen.CreateProjectRequest]) (*connect_go.Response[gen.CreateProjectResponse], error) DeleteProject(context.Context, *connect_go.Request[gen.DeleteProjectRequest]) (*connect_go.Response[gen.DeleteProjectResponse], error) - UpdateResource(context.Context, *connect_go.Request[gen.UpdateResourceRequest]) (*connect_go.Response[gen.UpdateResourceResponse], error) - CreateResource(context.Context, *connect_go.Request[gen.CreateResourceRequest]) (*connect_go.Response[gen.CreateResourceResponse], error) - GetResources(context.Context, *connect_go.Request[gen.GetResourcesRequest]) (*connect_go.Response[gen.GetResourcesResponse], error) - DeleteResource(context.Context, *connect_go.Request[gen.DeleteResourceRequest]) (*connect_go.Response[gen.DeleteResourceResponse], error) + EnumerateProviders(context.Context, *connect_go.Request[gen.GetProvidersRequest]) (*connect_go.Response[gen.GetProvidersResponse], error) GetNodeInfo(context.Context, *connect_go.Request[gen.GetNodeInfoRequest]) (*connect_go.Response[gen.GetNodeInfoResponse], error) SaveProject(context.Context, *connect_go.Request[gen.SaveProjectRequest]) (*connect_go.Response[gen.SaveProjectResponse], error) RunWorkflow(context.Context, *connect_go.Request[gen.RunWorkflowRequest]) (*connect_go.ServerStreamForClient[gen.NodeExecution], error) @@ -158,24 +146,9 @@ func NewProjectServiceClient(httpClient connect_go.HTTPClient, baseURL string, o baseURL+ProjectServiceDeleteProjectProcedure, opts..., ), - updateResource: connect_go.NewClient[gen.UpdateResourceRequest, gen.UpdateResourceResponse]( + enumerateProviders: connect_go.NewClient[gen.GetProvidersRequest, gen.GetProvidersResponse]( httpClient, - baseURL+ProjectServiceUpdateResourceProcedure, - opts..., - ), - createResource: connect_go.NewClient[gen.CreateResourceRequest, gen.CreateResourceResponse]( - httpClient, - baseURL+ProjectServiceCreateResourceProcedure, - opts..., - ), - getResources: connect_go.NewClient[gen.GetResourcesRequest, gen.GetResourcesResponse]( - httpClient, - baseURL+ProjectServiceGetResourcesProcedure, - opts..., - ), - deleteResource: connect_go.NewClient[gen.DeleteResourceRequest, gen.DeleteResourceResponse]( - httpClient, - baseURL+ProjectServiceDeleteResourceProcedure, + baseURL+ProjectServiceEnumerateProvidersProcedure, opts..., ), getNodeInfo: connect_go.NewClient[gen.GetNodeInfoRequest, gen.GetNodeInfoResponse]( @@ -208,23 +181,20 @@ func NewProjectServiceClient(httpClient connect_go.HTTPClient, baseURL string, o // projectServiceClient implements ProjectServiceClient. type projectServiceClient struct { - getProjectTypes *connect_go.Client[gen.GetProjectTypesRequest, gen.ProjectTypes] - sendChat *connect_go.Client[gen.SendChatRequest, gen.SendChatResponse] - exportProject *connect_go.Client[gen.ExportProjectRequest, gen.ExportProjectResponse] - loadProject *connect_go.Client[gen.LoadProjectRequest, gen.LoadProjectResponse] - getProject *connect_go.Client[gen.GetProjectRequest, gen.GetProjectResponse] - getProjects *connect_go.Client[gen.GetProjectsRequest, gen.GetProjectsResponse] - createProject *connect_go.Client[gen.CreateProjectRequest, gen.CreateProjectResponse] - deleteProject *connect_go.Client[gen.DeleteProjectRequest, gen.DeleteProjectResponse] - updateResource *connect_go.Client[gen.UpdateResourceRequest, gen.UpdateResourceResponse] - createResource *connect_go.Client[gen.CreateResourceRequest, gen.CreateResourceResponse] - getResources *connect_go.Client[gen.GetResourcesRequest, gen.GetResourcesResponse] - deleteResource *connect_go.Client[gen.DeleteResourceRequest, gen.DeleteResourceResponse] - getNodeInfo *connect_go.Client[gen.GetNodeInfoRequest, gen.GetNodeInfoResponse] - saveProject *connect_go.Client[gen.SaveProjectRequest, gen.SaveProjectResponse] - runWorkflow *connect_go.Client[gen.RunWorkflowRequest, gen.NodeExecution] - stopWorkflow *connect_go.Client[gen.StopWorkflowRequest, gen.StopWorkflowResponse] - getWorkflowRuns *connect_go.Client[gen.GetWorkflowRunsRequest, gen.GetWorkflowRunsResponse] + getProjectTypes *connect_go.Client[gen.GetProjectTypesRequest, gen.ProjectTypes] + sendChat *connect_go.Client[gen.SendChatRequest, gen.SendChatResponse] + exportProject *connect_go.Client[gen.ExportProjectRequest, gen.ExportProjectResponse] + loadProject *connect_go.Client[gen.LoadProjectRequest, gen.LoadProjectResponse] + getProject *connect_go.Client[gen.GetProjectRequest, gen.GetProjectResponse] + getProjects *connect_go.Client[gen.GetProjectsRequest, gen.GetProjectsResponse] + createProject *connect_go.Client[gen.CreateProjectRequest, gen.CreateProjectResponse] + deleteProject *connect_go.Client[gen.DeleteProjectRequest, gen.DeleteProjectResponse] + enumerateProviders *connect_go.Client[gen.GetProvidersRequest, gen.GetProvidersResponse] + getNodeInfo *connect_go.Client[gen.GetNodeInfoRequest, gen.GetNodeInfoResponse] + saveProject *connect_go.Client[gen.SaveProjectRequest, gen.SaveProjectResponse] + runWorkflow *connect_go.Client[gen.RunWorkflowRequest, gen.NodeExecution] + stopWorkflow *connect_go.Client[gen.StopWorkflowRequest, gen.StopWorkflowResponse] + getWorkflowRuns *connect_go.Client[gen.GetWorkflowRunsRequest, gen.GetWorkflowRunsResponse] } // GetProjectTypes calls project.ProjectService.GetProjectTypes. @@ -267,24 +237,9 @@ func (c *projectServiceClient) DeleteProject(ctx context.Context, req *connect_g return c.deleteProject.CallUnary(ctx, req) } -// UpdateResource calls project.ProjectService.UpdateResource. -func (c *projectServiceClient) UpdateResource(ctx context.Context, req *connect_go.Request[gen.UpdateResourceRequest]) (*connect_go.Response[gen.UpdateResourceResponse], error) { - return c.updateResource.CallUnary(ctx, req) -} - -// CreateResource calls project.ProjectService.CreateResource. -func (c *projectServiceClient) CreateResource(ctx context.Context, req *connect_go.Request[gen.CreateResourceRequest]) (*connect_go.Response[gen.CreateResourceResponse], error) { - return c.createResource.CallUnary(ctx, req) -} - -// GetResources calls project.ProjectService.GetResources. -func (c *projectServiceClient) GetResources(ctx context.Context, req *connect_go.Request[gen.GetResourcesRequest]) (*connect_go.Response[gen.GetResourcesResponse], error) { - return c.getResources.CallUnary(ctx, req) -} - -// DeleteResource calls project.ProjectService.DeleteResource. -func (c *projectServiceClient) DeleteResource(ctx context.Context, req *connect_go.Request[gen.DeleteResourceRequest]) (*connect_go.Response[gen.DeleteResourceResponse], error) { - return c.deleteResource.CallUnary(ctx, req) +// EnumerateProviders calls project.ProjectService.EnumerateProviders. +func (c *projectServiceClient) EnumerateProviders(ctx context.Context, req *connect_go.Request[gen.GetProvidersRequest]) (*connect_go.Response[gen.GetProvidersResponse], error) { + return c.enumerateProviders.CallUnary(ctx, req) } // GetNodeInfo calls project.ProjectService.GetNodeInfo. @@ -324,10 +279,7 @@ type ProjectServiceHandler interface { GetProjects(context.Context, *connect_go.Request[gen.GetProjectsRequest]) (*connect_go.Response[gen.GetProjectsResponse], error) CreateProject(context.Context, *connect_go.Request[gen.CreateProjectRequest]) (*connect_go.Response[gen.CreateProjectResponse], error) DeleteProject(context.Context, *connect_go.Request[gen.DeleteProjectRequest]) (*connect_go.Response[gen.DeleteProjectResponse], error) - UpdateResource(context.Context, *connect_go.Request[gen.UpdateResourceRequest]) (*connect_go.Response[gen.UpdateResourceResponse], error) - CreateResource(context.Context, *connect_go.Request[gen.CreateResourceRequest]) (*connect_go.Response[gen.CreateResourceResponse], error) - GetResources(context.Context, *connect_go.Request[gen.GetResourcesRequest]) (*connect_go.Response[gen.GetResourcesResponse], error) - DeleteResource(context.Context, *connect_go.Request[gen.DeleteResourceRequest]) (*connect_go.Response[gen.DeleteResourceResponse], error) + EnumerateProviders(context.Context, *connect_go.Request[gen.GetProvidersRequest]) (*connect_go.Response[gen.GetProvidersResponse], error) GetNodeInfo(context.Context, *connect_go.Request[gen.GetNodeInfoRequest]) (*connect_go.Response[gen.GetNodeInfoResponse], error) SaveProject(context.Context, *connect_go.Request[gen.SaveProjectRequest]) (*connect_go.Response[gen.SaveProjectResponse], error) RunWorkflow(context.Context, *connect_go.Request[gen.RunWorkflowRequest], *connect_go.ServerStream[gen.NodeExecution]) error @@ -381,24 +333,9 @@ func NewProjectServiceHandler(svc ProjectServiceHandler, opts ...connect_go.Hand svc.DeleteProject, opts..., ) - projectServiceUpdateResourceHandler := connect_go.NewUnaryHandler( - ProjectServiceUpdateResourceProcedure, - svc.UpdateResource, - opts..., - ) - projectServiceCreateResourceHandler := connect_go.NewUnaryHandler( - ProjectServiceCreateResourceProcedure, - svc.CreateResource, - opts..., - ) - projectServiceGetResourcesHandler := connect_go.NewUnaryHandler( - ProjectServiceGetResourcesProcedure, - svc.GetResources, - opts..., - ) - projectServiceDeleteResourceHandler := connect_go.NewUnaryHandler( - ProjectServiceDeleteResourceProcedure, - svc.DeleteResource, + projectServiceEnumerateProvidersHandler := connect_go.NewUnaryHandler( + ProjectServiceEnumerateProvidersProcedure, + svc.EnumerateProviders, opts..., ) projectServiceGetNodeInfoHandler := connect_go.NewUnaryHandler( @@ -444,14 +381,8 @@ func NewProjectServiceHandler(svc ProjectServiceHandler, opts ...connect_go.Hand projectServiceCreateProjectHandler.ServeHTTP(w, r) case ProjectServiceDeleteProjectProcedure: projectServiceDeleteProjectHandler.ServeHTTP(w, r) - case ProjectServiceUpdateResourceProcedure: - projectServiceUpdateResourceHandler.ServeHTTP(w, r) - case ProjectServiceCreateResourceProcedure: - projectServiceCreateResourceHandler.ServeHTTP(w, r) - case ProjectServiceGetResourcesProcedure: - projectServiceGetResourcesHandler.ServeHTTP(w, r) - case ProjectServiceDeleteResourceProcedure: - projectServiceDeleteResourceHandler.ServeHTTP(w, r) + case ProjectServiceEnumerateProvidersProcedure: + projectServiceEnumerateProvidersHandler.ServeHTTP(w, r) case ProjectServiceGetNodeInfoProcedure: projectServiceGetNodeInfoHandler.ServeHTTP(w, r) case ProjectServiceSaveProjectProcedure: @@ -503,20 +434,8 @@ func (UnimplementedProjectServiceHandler) DeleteProject(context.Context, *connec return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("project.ProjectService.DeleteProject is not implemented")) } -func (UnimplementedProjectServiceHandler) UpdateResource(context.Context, *connect_go.Request[gen.UpdateResourceRequest]) (*connect_go.Response[gen.UpdateResourceResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("project.ProjectService.UpdateResource is not implemented")) -} - -func (UnimplementedProjectServiceHandler) CreateResource(context.Context, *connect_go.Request[gen.CreateResourceRequest]) (*connect_go.Response[gen.CreateResourceResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("project.ProjectService.CreateResource is not implemented")) -} - -func (UnimplementedProjectServiceHandler) GetResources(context.Context, *connect_go.Request[gen.GetResourcesRequest]) (*connect_go.Response[gen.GetResourcesResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("project.ProjectService.GetResources is not implemented")) -} - -func (UnimplementedProjectServiceHandler) DeleteResource(context.Context, *connect_go.Request[gen.DeleteResourceRequest]) (*connect_go.Response[gen.DeleteResourceResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("project.ProjectService.DeleteResource is not implemented")) +func (UnimplementedProjectServiceHandler) EnumerateProviders(context.Context, *connect_go.Request[gen.GetProvidersRequest]) (*connect_go.Response[gen.GetProvidersResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("project.ProjectService.EnumerateProviders is not implemented")) } func (UnimplementedProjectServiceHandler) GetNodeInfo(context.Context, *connect_go.Request[gen.GetNodeInfoRequest]) (*connect_go.Response[gen.GetNodeInfoResponse], error) { diff --git a/gen/graph.pb.go b/gen/graph.pb.go index 9d57bfe..b185a6c 100644 --- a/gen/graph.pb.go +++ b/gen/graph.pb.go @@ -7,6 +7,12 @@ package gen import ( + code "github.com/protoflow-labs/protoflow/gen/code" + data "github.com/protoflow-labs/protoflow/gen/data" + grpc "github.com/protoflow-labs/protoflow/gen/grpc" + http "github.com/protoflow-labs/protoflow/gen/http" + reason "github.com/protoflow-labs/protoflow/gen/reason" + storage "github.com/protoflow-labs/protoflow/gen/storage" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -25,11 +31,8 @@ type Graph struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // TODO breadchris get rid of id and name, they are not needed - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Nodes []*Node `protobuf:"bytes,3,rep,name=nodes,proto3" json:"nodes,omitempty"` - Edges []*Edge `protobuf:"bytes,4,rep,name=edges,proto3" json:"edges,omitempty"` + Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` + Edges []*Edge `protobuf:"bytes,2,rep,name=edges,proto3" json:"edges,omitempty"` } func (x *Graph) Reset() { @@ -64,20 +67,6 @@ func (*Graph) Descriptor() ([]byte, []int) { return file_graph_proto_rawDescGZIP(), []int{0} } -func (x *Graph) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Graph) GetName() string { - if x != nil { - return x.Name - } - return "" -} - func (x *Graph) GetNodes() []*Node { if x != nil { return x.Nodes @@ -97,27 +86,19 @@ type Node struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - X float32 `protobuf:"fixed32,4,opt,name=x,proto3" json:"x,omitempty"` - Y float32 `protobuf:"fixed32,5,opt,name=y,proto3" json:"y,omitempty"` - ResourceId string `protobuf:"bytes,6,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - // Types that are assignable to Config: + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + X float32 `protobuf:"fixed32,4,opt,name=x,proto3" json:"x,omitempty"` + Y float32 `protobuf:"fixed32,5,opt,name=y,proto3" json:"y,omitempty"` + // Types that are assignable to Type: // - // *Node_Rest + // *Node_Data + // *Node_Reason // *Node_Grpc - // *Node_Collection - // *Node_Bucket - // *Node_Input - // *Node_Function - // *Node_Query - // *Node_Prompt - // *Node_Configuration - // *Node_Route - // *Node_Template - // *Node_Secret - // *Node_File - Config isNode_Config `protobuf_oneof:"config"` + // *Node_Http + // *Node_Storage + // *Node_Code + Type isNode_Type `protobuf_oneof:"type"` } func (x *Node) Reset() { @@ -180,192 +161,94 @@ func (x *Node) GetY() float32 { return 0 } -func (x *Node) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -func (m *Node) GetConfig() isNode_Config { +func (m *Node) GetType() isNode_Type { if m != nil { - return m.Config - } - return nil -} - -func (x *Node) GetRest() *REST { - if x, ok := x.GetConfig().(*Node_Rest); ok { - return x.Rest - } - return nil -} - -func (x *Node) GetGrpc() *GRPC { - if x, ok := x.GetConfig().(*Node_Grpc); ok { - return x.Grpc - } - return nil -} - -func (x *Node) GetCollection() *Collection { - if x, ok := x.GetConfig().(*Node_Collection); ok { - return x.Collection + return m.Type } return nil } -func (x *Node) GetBucket() *Bucket { - if x, ok := x.GetConfig().(*Node_Bucket); ok { - return x.Bucket +func (x *Node) GetData() *data.Data { + if x, ok := x.GetType().(*Node_Data); ok { + return x.Data } return nil } -func (x *Node) GetInput() *Input { - if x, ok := x.GetConfig().(*Node_Input); ok { - return x.Input +func (x *Node) GetReason() *reason.Reason { + if x, ok := x.GetType().(*Node_Reason); ok { + return x.Reason } return nil } -func (x *Node) GetFunction() *Function { - if x, ok := x.GetConfig().(*Node_Function); ok { - return x.Function - } - return nil -} - -func (x *Node) GetQuery() *Query { - if x, ok := x.GetConfig().(*Node_Query); ok { - return x.Query - } - return nil -} - -func (x *Node) GetPrompt() *Prompt { - if x, ok := x.GetConfig().(*Node_Prompt); ok { - return x.Prompt - } - return nil -} - -func (x *Node) GetConfiguration() *Config { - if x, ok := x.GetConfig().(*Node_Configuration); ok { - return x.Configuration +func (x *Node) GetGrpc() *grpc.GRPC { + if x, ok := x.GetType().(*Node_Grpc); ok { + return x.Grpc } return nil } -func (x *Node) GetRoute() *Route { - if x, ok := x.GetConfig().(*Node_Route); ok { - return x.Route +func (x *Node) GetHttp() *http.HTTP { + if x, ok := x.GetType().(*Node_Http); ok { + return x.Http } return nil } -func (x *Node) GetTemplate() *Template { - if x, ok := x.GetConfig().(*Node_Template); ok { - return x.Template +func (x *Node) GetStorage() *storage.Storage { + if x, ok := x.GetType().(*Node_Storage); ok { + return x.Storage } return nil } -func (x *Node) GetSecret() *Secret { - if x, ok := x.GetConfig().(*Node_Secret); ok { - return x.Secret +func (x *Node) GetCode() *code.Code { + if x, ok := x.GetType().(*Node_Code); ok { + return x.Code } return nil } -func (x *Node) GetFile() *File { - if x, ok := x.GetConfig().(*Node_File); ok { - return x.File - } - return nil +type isNode_Type interface { + isNode_Type() } -type isNode_Config interface { - isNode_Config() +type Node_Data struct { + Data *data.Data `protobuf:"bytes,7,opt,name=data,proto3,oneof"` } -type Node_Rest struct { - Rest *REST `protobuf:"bytes,7,opt,name=rest,proto3,oneof"` +type Node_Reason struct { + Reason *reason.Reason `protobuf:"bytes,8,opt,name=reason,proto3,oneof"` } type Node_Grpc struct { - Grpc *GRPC `protobuf:"bytes,8,opt,name=grpc,proto3,oneof"` -} - -type Node_Collection struct { - Collection *Collection `protobuf:"bytes,9,opt,name=collection,proto3,oneof"` -} - -type Node_Bucket struct { - Bucket *Bucket `protobuf:"bytes,10,opt,name=bucket,proto3,oneof"` -} - -type Node_Input struct { - Input *Input `protobuf:"bytes,11,opt,name=input,proto3,oneof"` -} - -type Node_Function struct { - Function *Function `protobuf:"bytes,12,opt,name=function,proto3,oneof"` -} - -type Node_Query struct { - Query *Query `protobuf:"bytes,13,opt,name=query,proto3,oneof"` -} - -type Node_Prompt struct { - Prompt *Prompt `protobuf:"bytes,14,opt,name=prompt,proto3,oneof"` -} - -type Node_Configuration struct { - Configuration *Config `protobuf:"bytes,15,opt,name=configuration,proto3,oneof"` + Grpc *grpc.GRPC `protobuf:"bytes,9,opt,name=grpc,proto3,oneof"` } -type Node_Route struct { - Route *Route `protobuf:"bytes,16,opt,name=route,proto3,oneof"` +type Node_Http struct { + Http *http.HTTP `protobuf:"bytes,10,opt,name=http,proto3,oneof"` } -type Node_Template struct { - Template *Template `protobuf:"bytes,17,opt,name=template,proto3,oneof"` +type Node_Storage struct { + Storage *storage.Storage `protobuf:"bytes,11,opt,name=storage,proto3,oneof"` } -type Node_Secret struct { - Secret *Secret `protobuf:"bytes,18,opt,name=secret,proto3,oneof"` +type Node_Code struct { + Code *code.Code `protobuf:"bytes,12,opt,name=code,proto3,oneof"` } -type Node_File struct { - File *File `protobuf:"bytes,19,opt,name=file,proto3,oneof"` -} - -func (*Node_Rest) isNode_Config() {} - -func (*Node_Grpc) isNode_Config() {} - -func (*Node_Collection) isNode_Config() {} - -func (*Node_Bucket) isNode_Config() {} - -func (*Node_Input) isNode_Config() {} - -func (*Node_Function) isNode_Config() {} - -func (*Node_Query) isNode_Config() {} +func (*Node_Data) isNode_Type() {} -func (*Node_Prompt) isNode_Config() {} +func (*Node_Reason) isNode_Type() {} -func (*Node_Configuration) isNode_Config() {} +func (*Node_Grpc) isNode_Type() {} -func (*Node_Route) isNode_Config() {} +func (*Node_Http) isNode_Type() {} -func (*Node_Template) isNode_Config() {} +func (*Node_Storage) isNode_Type() {} -func (*Node_Secret) isNode_Config() {} - -func (*Node_File) isNode_Config() {} +func (*Node_Code) isNode_Type() {} type CodeAdapter struct { state protoimpl.MessageState @@ -414,6 +297,44 @@ func (x *CodeAdapter) GetCode() string { return "" } +type Provides struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Provides) Reset() { + *x = Provides{} + if protoimpl.UnsafeEnabled { + mi := &file_graph_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Provides) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Provides) ProtoMessage() {} + +func (x *Provides) ProtoReflect() protoreflect.Message { + mi := &file_graph_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 Provides.ProtoReflect.Descriptor instead. +func (*Provides) Descriptor() ([]byte, []int) { + return file_graph_proto_rawDescGZIP(), []int{3} +} + type Edge struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -422,16 +343,17 @@ type Edge struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - // Types that are assignable to Config: + // Types that are assignable to Type: // // *Edge_CodeAdapter - Config isEdge_Config `protobuf_oneof:"config"` + // *Edge_Provides + Type isEdge_Type `protobuf_oneof:"type"` } func (x *Edge) Reset() { *x = Edge{} if protoimpl.UnsafeEnabled { - mi := &file_graph_proto_msgTypes[3] + mi := &file_graph_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -444,7 +366,7 @@ func (x *Edge) String() string { func (*Edge) ProtoMessage() {} func (x *Edge) ProtoReflect() protoreflect.Message { - mi := &file_graph_proto_msgTypes[3] + mi := &file_graph_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -457,7 +379,7 @@ func (x *Edge) ProtoReflect() protoreflect.Message { // Deprecated: Use Edge.ProtoReflect.Descriptor instead. func (*Edge) Descriptor() ([]byte, []int) { - return file_graph_proto_rawDescGZIP(), []int{3} + return file_graph_proto_rawDescGZIP(), []int{4} } func (x *Edge) GetId() string { @@ -481,103 +403,100 @@ func (x *Edge) GetTo() string { return "" } -func (m *Edge) GetConfig() isEdge_Config { +func (m *Edge) GetType() isEdge_Type { if m != nil { - return m.Config + return m.Type } return nil } func (x *Edge) GetCodeAdapter() *CodeAdapter { - if x, ok := x.GetConfig().(*Edge_CodeAdapter); ok { + if x, ok := x.GetType().(*Edge_CodeAdapter); ok { return x.CodeAdapter } return nil } -type isEdge_Config interface { - isEdge_Config() +func (x *Edge) GetProvides() *Provides { + if x, ok := x.GetType().(*Edge_Provides); ok { + return x.Provides + } + return nil +} + +type isEdge_Type interface { + isEdge_Type() } type Edge_CodeAdapter struct { CodeAdapter *CodeAdapter `protobuf:"bytes,4,opt,name=code_adapter,json=codeAdapter,proto3,oneof"` } -func (*Edge_CodeAdapter) isEdge_Config() {} +type Edge_Provides struct { + Provides *Provides `protobuf:"bytes,5,opt,name=provides,proto3,oneof"` +} + +func (*Edge_CodeAdapter) isEdge_Type() {} + +func (*Edge_Provides) isEdge_Type() {} var File_graph_proto protoreflect.FileDescriptor var file_graph_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x1a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x71, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, - 0x64, 0x67, 0x65, 0x73, 0x22, 0x91, 0x05, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, - 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x21, - 0x0a, 0x04, 0x72, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, - 0x74, 0x12, 0x21, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x48, 0x00, 0x52, 0x04, - 0x67, 0x72, 0x70, 0x63, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x06, 0x62, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x24, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x48, - 0x00, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, 0x0a, - 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x48, 0x00, 0x52, 0x06, - 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x35, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, - 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x48, 0x00, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x08, - 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x21, 0x0a, 0x0b, 0x43, 0x6f, 0x64, 0x65, - 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x7d, 0x0a, 0x04, 0x45, - 0x64, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6f, 0x64, 0x65, 0x5f, - 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, - 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x74, 0x0a, 0x09, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x42, 0x0a, 0x47, 0x72, 0x61, 0x70, 0x68, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0xa2, 0x02, - 0x03, 0x47, 0x58, 0x58, 0xaa, 0x02, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0xca, 0x02, 0x05, 0x47, - 0x72, 0x61, 0x70, 0x68, 0xe2, 0x02, 0x11, 0x47, 0x72, 0x61, 0x70, 0x68, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x70, 0x68, 0x1a, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2f, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x21, 0x0a, + 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x12, 0x21, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, + 0x67, 0x65, 0x73, 0x22, 0xae, 0x02, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x78, 0x12, 0x0c, + 0x0a, 0x01, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x01, 0x79, 0x12, 0x20, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x28, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x52, + 0x50, 0x43, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x74, + 0x74, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x48, 0x54, 0x54, 0x50, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x2c, 0x0a, 0x07, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x48, + 0x00, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x2e, + 0x43, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x43, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x61, 0x70, + 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x0a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x04, 0x45, 0x64, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, + 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x43, + 0x6f, 0x64, 0x65, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, + 0x64, 0x65, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x42, 0x74, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x42, 0x0a, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, + 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, + 0x2f, 0x67, 0x65, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x58, 0x58, 0xaa, 0x02, 0x05, 0x47, 0x72, 0x61, + 0x70, 0x68, 0xca, 0x02, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0xe2, 0x02, 0x11, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -592,48 +511,36 @@ func file_graph_proto_rawDescGZIP() []byte { return file_graph_proto_rawDescData } -var file_graph_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_graph_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_graph_proto_goTypes = []interface{}{ - (*Graph)(nil), // 0: graph.Graph - (*Node)(nil), // 1: graph.Node - (*CodeAdapter)(nil), // 2: graph.CodeAdapter - (*Edge)(nil), // 3: graph.Edge - (*REST)(nil), // 4: block.REST - (*GRPC)(nil), // 5: block.GRPC - (*Collection)(nil), // 6: block.Collection - (*Bucket)(nil), // 7: block.Bucket - (*Input)(nil), // 8: block.Input - (*Function)(nil), // 9: block.Function - (*Query)(nil), // 10: block.Query - (*Prompt)(nil), // 11: block.Prompt - (*Config)(nil), // 12: block.Config - (*Route)(nil), // 13: block.Route - (*Template)(nil), // 14: block.Template - (*Secret)(nil), // 15: block.Secret - (*File)(nil), // 16: block.File + (*Graph)(nil), // 0: graph.Graph + (*Node)(nil), // 1: graph.Node + (*CodeAdapter)(nil), // 2: graph.CodeAdapter + (*Provides)(nil), // 3: graph.Provides + (*Edge)(nil), // 4: graph.Edge + (*data.Data)(nil), // 5: data.Data + (*reason.Reason)(nil), // 6: reason.Reason + (*grpc.GRPC)(nil), // 7: grpc.GRPC + (*http.HTTP)(nil), // 8: http.HTTP + (*storage.Storage)(nil), // 9: storage.Storage + (*code.Code)(nil), // 10: code.Code } var file_graph_proto_depIdxs = []int32{ 1, // 0: graph.Graph.nodes:type_name -> graph.Node - 3, // 1: graph.Graph.edges:type_name -> graph.Edge - 4, // 2: graph.Node.rest:type_name -> block.REST - 5, // 3: graph.Node.grpc:type_name -> block.GRPC - 6, // 4: graph.Node.collection:type_name -> block.Collection - 7, // 5: graph.Node.bucket:type_name -> block.Bucket - 8, // 6: graph.Node.input:type_name -> block.Input - 9, // 7: graph.Node.function:type_name -> block.Function - 10, // 8: graph.Node.query:type_name -> block.Query - 11, // 9: graph.Node.prompt:type_name -> block.Prompt - 12, // 10: graph.Node.configuration:type_name -> block.Config - 13, // 11: graph.Node.route:type_name -> block.Route - 14, // 12: graph.Node.template:type_name -> block.Template - 15, // 13: graph.Node.secret:type_name -> block.Secret - 16, // 14: graph.Node.file:type_name -> block.File - 2, // 15: graph.Edge.code_adapter:type_name -> graph.CodeAdapter - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 4, // 1: graph.Graph.edges:type_name -> graph.Edge + 5, // 2: graph.Node.data:type_name -> data.Data + 6, // 3: graph.Node.reason:type_name -> reason.Reason + 7, // 4: graph.Node.grpc:type_name -> grpc.GRPC + 8, // 5: graph.Node.http:type_name -> http.HTTP + 9, // 6: graph.Node.storage:type_name -> storage.Storage + 10, // 7: graph.Node.code:type_name -> code.Code + 2, // 8: graph.Edge.code_adapter:type_name -> graph.CodeAdapter + 3, // 9: graph.Edge.provides:type_name -> graph.Provides + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_graph_proto_init() } @@ -641,8 +548,6 @@ func file_graph_proto_init() { if File_graph_proto != nil { return } - file_block_proto_init() - file_resource_proto_init() if !protoimpl.UnsafeEnabled { file_graph_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Graph); i { @@ -681,6 +586,18 @@ func file_graph_proto_init() { } } file_graph_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Provides); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_graph_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Edge); i { case 0: return &v.state @@ -694,22 +611,16 @@ func file_graph_proto_init() { } } file_graph_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*Node_Rest)(nil), + (*Node_Data)(nil), + (*Node_Reason)(nil), (*Node_Grpc)(nil), - (*Node_Collection)(nil), - (*Node_Bucket)(nil), - (*Node_Input)(nil), - (*Node_Function)(nil), - (*Node_Query)(nil), - (*Node_Prompt)(nil), - (*Node_Configuration)(nil), - (*Node_Route)(nil), - (*Node_Template)(nil), - (*Node_Secret)(nil), - (*Node_File)(nil), - } - file_graph_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Node_Http)(nil), + (*Node_Storage)(nil), + (*Node_Code)(nil), + } + file_graph_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Edge_CodeAdapter)(nil), + (*Edge_Provides)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -717,7 +628,7 @@ func file_graph_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_graph_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/gen/grpc/grpc.pb.go b/gen/grpc/grpc.pb.go new file mode 100644 index 0000000..766d372 --- /dev/null +++ b/gen/grpc/grpc.pb.go @@ -0,0 +1,335 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: grpc/grpc.proto + +package grpc + +import ( + 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 Method struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` +} + +func (x *Method) Reset() { + *x = Method{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Method) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Method) ProtoMessage() {} + +func (x *Method) ProtoReflect() protoreflect.Message { + mi := &file_grpc_grpc_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 Method.ProtoReflect.Descriptor instead. +func (*Method) Descriptor() ([]byte, []int) { + return file_grpc_grpc_proto_rawDescGZIP(), []int{0} +} + +func (x *Method) GetPackage() string { + if x != nil { + return x.Package + } + return "" +} + +func (x *Method) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *Method) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +type Server struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` +} + +func (x *Server) Reset() { + *x = Server{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Server) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Server) ProtoMessage() {} + +func (x *Server) ProtoReflect() protoreflect.Message { + mi := &file_grpc_grpc_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 Server.ProtoReflect.Descriptor instead. +func (*Server) Descriptor() ([]byte, []int) { + return file_grpc_grpc_proto_rawDescGZIP(), []int{1} +} + +func (x *Server) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +type GRPC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *GRPC_Method + // *GRPC_Server + Type isGRPC_Type `protobuf_oneof:"type"` +} + +func (x *GRPC) Reset() { + *x = GRPC{} + if protoimpl.UnsafeEnabled { + mi := &file_grpc_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPC) ProtoMessage() {} + +func (x *GRPC) ProtoReflect() protoreflect.Message { + mi := &file_grpc_grpc_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 GRPC.ProtoReflect.Descriptor instead. +func (*GRPC) Descriptor() ([]byte, []int) { + return file_grpc_grpc_proto_rawDescGZIP(), []int{2} +} + +func (m *GRPC) GetType() isGRPC_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *GRPC) GetMethod() *Method { + if x, ok := x.GetType().(*GRPC_Method); ok { + return x.Method + } + return nil +} + +func (x *GRPC) GetServer() *Server { + if x, ok := x.GetType().(*GRPC_Server); ok { + return x.Server + } + return nil +} + +type isGRPC_Type interface { + isGRPC_Type() +} + +type GRPC_Method struct { + Method *Method `protobuf:"bytes,1,opt,name=method,proto3,oneof"` +} + +type GRPC_Server struct { + Server *Server `protobuf:"bytes,2,opt,name=server,proto3,oneof"` +} + +func (*GRPC_Method) isGRPC_Type() {} + +func (*GRPC_Server) isGRPC_Type() {} + +var File_grpc_grpc_proto protoreflect.FileDescriptor + +var file_grpc_grpc_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x04, 0x67, 0x72, 0x70, 0x63, 0x22, 0x54, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x1c, 0x0a, + 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x04, 0x47, + 0x52, 0x50, 0x43, 0x12, 0x26, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x73, 0x0a, 0x08, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x42, 0x09, 0x47, 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0xa2, 0x02, 0x03, 0x47, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x47, 0x72, 0x70, 0x63, 0xca, + 0x02, 0x04, 0x47, 0x72, 0x70, 0x63, 0xe2, 0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x47, 0x72, 0x70, 0x63, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_grpc_grpc_proto_rawDescOnce sync.Once + file_grpc_grpc_proto_rawDescData = file_grpc_grpc_proto_rawDesc +) + +func file_grpc_grpc_proto_rawDescGZIP() []byte { + file_grpc_grpc_proto_rawDescOnce.Do(func() { + file_grpc_grpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_grpc_proto_rawDescData) + }) + return file_grpc_grpc_proto_rawDescData +} + +var file_grpc_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_grpc_grpc_proto_goTypes = []interface{}{ + (*Method)(nil), // 0: grpc.Method + (*Server)(nil), // 1: grpc.Server + (*GRPC)(nil), // 2: grpc.GRPC +} +var file_grpc_grpc_proto_depIdxs = []int32{ + 0, // 0: grpc.GRPC.method:type_name -> grpc.Method + 1, // 1: grpc.GRPC.server:type_name -> grpc.Server + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_grpc_grpc_proto_init() } +func file_grpc_grpc_proto_init() { + if File_grpc_grpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_grpc_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Method); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Server); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grpc_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_grpc_grpc_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*GRPC_Method)(nil), + (*GRPC_Server)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_grpc_grpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_grpc_grpc_proto_goTypes, + DependencyIndexes: file_grpc_grpc_proto_depIdxs, + MessageInfos: file_grpc_grpc_proto_msgTypes, + }.Build() + File_grpc_grpc_proto = out.File + file_grpc_grpc_proto_rawDesc = nil + file_grpc_grpc_proto_goTypes = nil + file_grpc_grpc_proto_depIdxs = nil +} diff --git a/gen/http.pb.go b/gen/http.pb.go deleted file mode 100644 index d7e2b85..0000000 --- a/gen/http.pb.go +++ /dev/null @@ -1,322 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: http.proto - -package gen - -import ( - 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 Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Header) Reset() { - *x = Header{} - if protoimpl.UnsafeEnabled { - mi := &file_http_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Header) ProtoMessage() {} - -func (x *Header) ProtoReflect() protoreflect.Message { - mi := &file_http_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 Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { - return file_http_proto_rawDescGZIP(), []int{0} -} - -func (x *Header) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Header) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type HttpRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - Headers []*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` - Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *HttpRequest) Reset() { - *x = HttpRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_http_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpRequest) ProtoMessage() {} - -func (x *HttpRequest) ProtoReflect() protoreflect.Message { - mi := &file_http_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 HttpRequest.ProtoReflect.Descriptor instead. -func (*HttpRequest) Descriptor() ([]byte, []int) { - return file_http_proto_rawDescGZIP(), []int{1} -} - -func (x *HttpRequest) GetMethod() string { - if x != nil { - return x.Method - } - return "" -} - -func (x *HttpRequest) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *HttpRequest) GetHeaders() []*Header { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HttpRequest) GetBody() []byte { - if x != nil { - return x.Body - } - return nil -} - -type HttpResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Headers []*Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` - Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *HttpResponse) Reset() { - *x = HttpResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_http_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpResponse) ProtoMessage() {} - -func (x *HttpResponse) ProtoReflect() protoreflect.Message { - mi := &file_http_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 HttpResponse.ProtoReflect.Descriptor instead. -func (*HttpResponse) Descriptor() ([]byte, []int) { - return file_http_proto_rawDescGZIP(), []int{2} -} - -func (x *HttpResponse) GetHeaders() []*Header { - if x != nil { - return x.Headers - } - return nil -} - -func (x *HttpResponse) GetBody() []byte { - if x != nil { - return x.Body - } - return nil -} - -var File_http_proto protoreflect.FileDescriptor - -var file_http_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x68, 0x74, - 0x74, 0x70, 0x22, 0x32, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x73, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, - 0x26, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x4a, 0x0a, 0x0c, 0x48, - 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x6e, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0xa2, 0x02, 0x03, 0x48, 0x58, 0x58, 0xaa, - 0x02, 0x04, 0x48, 0x74, 0x74, 0x70, 0xca, 0x02, 0x04, 0x48, 0x74, 0x74, 0x70, 0xe2, 0x02, 0x10, - 0x48, 0x74, 0x74, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x04, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_http_proto_rawDescOnce sync.Once - file_http_proto_rawDescData = file_http_proto_rawDesc -) - -func file_http_proto_rawDescGZIP() []byte { - file_http_proto_rawDescOnce.Do(func() { - file_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_http_proto_rawDescData) - }) - return file_http_proto_rawDescData -} - -var file_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_http_proto_goTypes = []interface{}{ - (*Header)(nil), // 0: http.Header - (*HttpRequest)(nil), // 1: http.HttpRequest - (*HttpResponse)(nil), // 2: http.HttpResponse -} -var file_http_proto_depIdxs = []int32{ - 0, // 0: http.HttpRequest.headers:type_name -> http.Header - 0, // 1: http.HttpResponse.headers:type_name -> http.Header - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_http_proto_init() } -func file_http_proto_init() { - if File_http_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpResponse); 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_http_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_http_proto_goTypes, - DependencyIndexes: file_http_proto_depIdxs, - MessageInfos: file_http_proto_msgTypes, - }.Build() - File_http_proto = out.File - file_http_proto_rawDesc = nil - file_http_proto_goTypes = nil - file_http_proto_depIdxs = nil -} diff --git a/gen/http/http.pb.go b/gen/http/http.pb.go new file mode 100644 index 0000000..e648d77 --- /dev/null +++ b/gen/http/http.pb.go @@ -0,0 +1,643 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: http/http.proto + +package http + +import ( + 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 Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{0} +} + +func (x *Header) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Header) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + Headers []*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` + Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{1} +} + +func (x *Request) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *Request) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Request) GetHeaders() []*Header { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Request) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Headers []*Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{2} +} + +func (x *Response) GetHeaders() []*Header { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Response) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +type Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` +} + +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{3} +} + +func (x *Route) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *Route) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +type Template struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` +} + +func (x *Template) Reset() { + *x = Template{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Template) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Template) ProtoMessage() {} + +func (x *Template) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 Template.ProtoReflect.Descriptor instead. +func (*Template) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{4} +} + +func (x *Template) GetTemplate() string { + if x != nil { + return x.Template + } + return "" +} + +type Router struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` +} + +func (x *Router) Reset() { + *x = Router{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Router) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Router) ProtoMessage() {} + +func (x *Router) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 Router.ProtoReflect.Descriptor instead. +func (*Router) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{5} +} + +func (x *Router) GetRoot() string { + if x != nil { + return x.Root + } + return "" +} + +type HTTP struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *HTTP_Route + // *HTTP_Template + // *HTTP_Router + Type isHTTP_Type `protobuf_oneof:"type"` +} + +func (x *HTTP) Reset() { + *x = HTTP{} + if protoimpl.UnsafeEnabled { + mi := &file_http_http_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTP) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTP) ProtoMessage() {} + +func (x *HTTP) ProtoReflect() protoreflect.Message { + mi := &file_http_http_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 HTTP.ProtoReflect.Descriptor instead. +func (*HTTP) Descriptor() ([]byte, []int) { + return file_http_http_proto_rawDescGZIP(), []int{6} +} + +func (m *HTTP) GetType() isHTTP_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *HTTP) GetRoute() *Route { + if x, ok := x.GetType().(*HTTP_Route); ok { + return x.Route + } + return nil +} + +func (x *HTTP) GetTemplate() *Template { + if x, ok := x.GetType().(*HTTP_Template); ok { + return x.Template + } + return nil +} + +func (x *HTTP) GetRouter() *Router { + if x, ok := x.GetType().(*HTTP_Router); ok { + return x.Router + } + return nil +} + +type isHTTP_Type interface { + isHTTP_Type() +} + +type HTTP_Route struct { + Route *Route `protobuf:"bytes,9,opt,name=route,proto3,oneof"` +} + +type HTTP_Template struct { + Template *Template `protobuf:"bytes,10,opt,name=template,proto3,oneof"` +} + +type HTTP_Router struct { + Router *Router `protobuf:"bytes,11,opt,name=router,proto3,oneof"` +} + +func (*HTTP_Route) isHTTP_Type() {} + +func (*HTTP_Template) isHTTP_Type() {} + +func (*HTTP_Router) isHTTP_Type() {} + +var File_http_http_proto protoreflect.FileDescriptor + +var file_http_http_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x04, 0x68, 0x74, 0x74, 0x70, 0x22, 0x32, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6f, 0x0a, 0x07, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x12, 0x26, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x46, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x22, 0x33, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x26, 0x0a, 0x08, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x22, 0x1c, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, + 0x89, 0x01, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x23, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2c, 0x0a, + 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, + 0x00, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x73, 0x0a, 0x08, 0x63, + 0x6f, 0x6d, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0xa2, 0x02, 0x03, 0x48, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x48, 0x74, 0x74, 0x70, 0xca, + 0x02, 0x04, 0x48, 0x74, 0x74, 0x70, 0xe2, 0x02, 0x10, 0x48, 0x74, 0x74, 0x70, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x48, 0x74, 0x74, 0x70, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_http_http_proto_rawDescOnce sync.Once + file_http_http_proto_rawDescData = file_http_http_proto_rawDesc +) + +func file_http_http_proto_rawDescGZIP() []byte { + file_http_http_proto_rawDescOnce.Do(func() { + file_http_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_http_http_proto_rawDescData) + }) + return file_http_http_proto_rawDescData +} + +var file_http_http_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_http_http_proto_goTypes = []interface{}{ + (*Header)(nil), // 0: http.Header + (*Request)(nil), // 1: http.Request + (*Response)(nil), // 2: http.Response + (*Route)(nil), // 3: http.Route + (*Template)(nil), // 4: http.Template + (*Router)(nil), // 5: http.Router + (*HTTP)(nil), // 6: http.HTTP +} +var file_http_http_proto_depIdxs = []int32{ + 0, // 0: http.Request.headers:type_name -> http.Header + 0, // 1: http.Response.headers:type_name -> http.Header + 3, // 2: http.HTTP.route:type_name -> http.Route + 4, // 3: http.HTTP.template:type_name -> http.Template + 5, // 4: http.HTTP.router:type_name -> http.Router + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_http_http_proto_init() } +func file_http_http_proto_init() { + if File_http_http_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_http_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_http_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_http_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Template); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_http_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Router); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_http_http_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTP); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_http_http_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*HTTP_Route)(nil), + (*HTTP_Template)(nil), + (*HTTP_Router)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_http_http_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_http_http_proto_goTypes, + DependencyIndexes: file_http_http_proto_depIdxs, + MessageInfos: file_http_http_proto_msgTypes, + }.Build() + File_http_http_proto = out.File + file_http_http_proto_rawDesc = nil + file_http_http_proto_goTypes = nil + file_http_http_proto_depIdxs = nil +} diff --git a/gen/project.pb.go b/gen/project.pb.go index 1cde021..868dbf0 100644 --- a/gen/project.pb.go +++ b/gen/project.pb.go @@ -21,175 +21,69 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type LayerType int32 +type ProviderState int32 const ( - LayerType_Execution LayerType = 0 - LayerType_Resource LayerType = 1 + ProviderState_UNKNOWN ProviderState = 0 + ProviderState_READY ProviderState = 1 + ProviderState_ERROR ProviderState = 2 ) -// Enum value maps for LayerType. +// Enum value maps for ProviderState. var ( - LayerType_name = map[int32]string{ - 0: "Execution", - 1: "Resource", - } - LayerType_value = map[string]int32{ - "Execution": 0, - "Resource": 1, - } -) - -func (x LayerType) Enum() *LayerType { - p := new(LayerType) - *p = x - return p -} - -func (x LayerType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LayerType) Descriptor() protoreflect.EnumDescriptor { - return file_project_proto_enumTypes[0].Descriptor() -} - -func (LayerType) Type() protoreflect.EnumType { - return &file_project_proto_enumTypes[0] -} - -func (x LayerType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LayerType.Descriptor instead. -func (LayerType) EnumDescriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{0} -} - -type ResourceState int32 - -const ( - ResourceState_UNKNOWN ResourceState = 0 - ResourceState_READY ResourceState = 1 - ResourceState_ERROR ResourceState = 2 -) - -// Enum value maps for ResourceState. -var ( - ResourceState_name = map[int32]string{ + ProviderState_name = map[int32]string{ 0: "UNKNOWN", 1: "READY", 2: "ERROR", } - ResourceState_value = map[string]int32{ + ProviderState_value = map[string]int32{ "UNKNOWN": 0, "READY": 1, "ERROR": 2, } ) -func (x ResourceState) Enum() *ResourceState { - p := new(ResourceState) +func (x ProviderState) Enum() *ProviderState { + p := new(ProviderState) *p = x return p } -func (x ResourceState) String() string { +func (x ProviderState) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (ResourceState) Descriptor() protoreflect.EnumDescriptor { - return file_project_proto_enumTypes[1].Descriptor() +func (ProviderState) Descriptor() protoreflect.EnumDescriptor { + return file_project_proto_enumTypes[0].Descriptor() } -func (ResourceState) Type() protoreflect.EnumType { - return &file_project_proto_enumTypes[1] +func (ProviderState) Type() protoreflect.EnumType { + return &file_project_proto_enumTypes[0] } -func (x ResourceState) Number() protoreflect.EnumNumber { +func (x ProviderState) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use ResourceState.Descriptor instead. -func (ResourceState) EnumDescriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{1} -} - -type Layer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type LayerType `protobuf:"varint,1,opt,name=type,proto3,enum=project.LayerType" json:"type,omitempty"` - Graph *Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` -} - -func (x *Layer) Reset() { - *x = Layer{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Layer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Layer) ProtoMessage() {} - -func (x *Layer) ProtoReflect() protoreflect.Message { - mi := &file_project_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 Layer.ProtoReflect.Descriptor instead. -func (*Layer) Descriptor() ([]byte, []int) { +// Deprecated: Use ProviderState.Descriptor instead. +func (ProviderState) EnumDescriptor() ([]byte, []int) { return file_project_proto_rawDescGZIP(), []int{0} } -func (x *Layer) GetType() LayerType { - if x != nil { - return x.Type - } - return LayerType_Execution -} - -func (x *Layer) GetGraph() *Graph { - if x != nil { - return x.Graph - } - return nil -} - type Project struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` - CreatedAt string `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt string `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` - Graph *Graph `protobuf:"bytes,7,opt,name=graph,proto3" json:"graph,omitempty"` - Resources []*Resource `protobuf:"bytes,8,rep,name=resources,proto3" json:"resources,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Graph *Graph `protobuf:"bytes,3,opt,name=graph,proto3" json:"graph,omitempty"` } func (x *Project) Reset() { *x = Project{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[1] + mi := &file_project_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -202,7 +96,7 @@ func (x *Project) String() string { func (*Project) ProtoMessage() {} func (x *Project) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[1] + mi := &file_project_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -215,7 +109,7 @@ func (x *Project) ProtoReflect() protoreflect.Message { // Deprecated: Use Project.ProtoReflect.Descriptor instead. func (*Project) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{1} + return file_project_proto_rawDescGZIP(), []int{0} } func (x *Project) GetId() string { @@ -232,34 +126,6 @@ func (x *Project) GetName() string { return "" } -func (x *Project) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Project) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *Project) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *Project) GetUpdatedAt() string { - if x != nil { - return x.UpdatedAt - } - return "" -} - func (x *Project) GetGraph() *Graph { if x != nil { return x.Graph @@ -267,13 +133,6 @@ func (x *Project) GetGraph() *Graph { return nil } -func (x *Project) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - type ExportProjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -286,7 +145,7 @@ type ExportProjectRequest struct { func (x *ExportProjectRequest) Reset() { *x = ExportProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[2] + mi := &file_project_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +158,7 @@ func (x *ExportProjectRequest) String() string { func (*ExportProjectRequest) ProtoMessage() {} func (x *ExportProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[2] + mi := &file_project_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +171,7 @@ func (x *ExportProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportProjectRequest.ProtoReflect.Descriptor instead. func (*ExportProjectRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{2} + return file_project_proto_rawDescGZIP(), []int{1} } func (x *ExportProjectRequest) GetProjectId() string { @@ -338,7 +197,7 @@ type ExportProjectResponse struct { func (x *ExportProjectResponse) Reset() { *x = ExportProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[3] + mi := &file_project_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -351,7 +210,7 @@ func (x *ExportProjectResponse) String() string { func (*ExportProjectResponse) ProtoMessage() {} func (x *ExportProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[3] + mi := &file_project_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -364,7 +223,7 @@ func (x *ExportProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportProjectResponse.ProtoReflect.Descriptor instead. func (*ExportProjectResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{3} + return file_project_proto_rawDescGZIP(), []int{2} } type LoadProjectRequest struct { @@ -378,7 +237,7 @@ type LoadProjectRequest struct { func (x *LoadProjectRequest) Reset() { *x = LoadProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[4] + mi := &file_project_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -391,7 +250,7 @@ func (x *LoadProjectRequest) String() string { func (*LoadProjectRequest) ProtoMessage() {} func (x *LoadProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[4] + mi := &file_project_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,7 +263,7 @@ func (x *LoadProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LoadProjectRequest.ProtoReflect.Descriptor instead. func (*LoadProjectRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{4} + return file_project_proto_rawDescGZIP(), []int{3} } func (x *LoadProjectRequest) GetPath() string { @@ -425,7 +284,7 @@ type LoadProjectResponse struct { func (x *LoadProjectResponse) Reset() { *x = LoadProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[5] + mi := &file_project_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -438,7 +297,7 @@ func (x *LoadProjectResponse) String() string { func (*LoadProjectResponse) ProtoMessage() {} func (x *LoadProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[5] + mi := &file_project_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -451,7 +310,7 @@ func (x *LoadProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use LoadProjectResponse.ProtoReflect.Descriptor instead. func (*LoadProjectResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{5} + return file_project_proto_rawDescGZIP(), []int{4} } func (x *LoadProjectResponse) GetProject() *Project { @@ -470,7 +329,7 @@ type GetProjectTypesRequest struct { func (x *GetProjectTypesRequest) Reset() { *x = GetProjectTypesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[6] + mi := &file_project_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -483,7 +342,7 @@ func (x *GetProjectTypesRequest) String() string { func (*GetProjectTypesRequest) ProtoMessage() {} func (x *GetProjectTypesRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[6] + mi := &file_project_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -496,7 +355,7 @@ func (x *GetProjectTypesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProjectTypesRequest.ProtoReflect.Descriptor instead. func (*GetProjectTypesRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{6} + return file_project_proto_rawDescGZIP(), []int{5} } type ProjectTypes struct { @@ -513,7 +372,7 @@ type ProjectTypes struct { func (x *ProjectTypes) Reset() { *x = ProjectTypes{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[7] + mi := &file_project_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -526,7 +385,7 @@ func (x *ProjectTypes) String() string { func (*ProjectTypes) ProtoMessage() {} func (x *ProjectTypes) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[7] + mi := &file_project_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -539,7 +398,7 @@ func (x *ProjectTypes) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectTypes.ProtoReflect.Descriptor instead. func (*ProjectTypes) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{7} + return file_project_proto_rawDescGZIP(), []int{6} } func (x *ProjectTypes) GetNodeType() *descriptorpb.DescriptorProto { @@ -582,7 +441,7 @@ type StopWorkflowRequest struct { func (x *StopWorkflowRequest) Reset() { *x = StopWorkflowRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[8] + mi := &file_project_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -595,7 +454,7 @@ func (x *StopWorkflowRequest) String() string { func (*StopWorkflowRequest) ProtoMessage() {} func (x *StopWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[8] + mi := &file_project_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -608,7 +467,7 @@ func (x *StopWorkflowRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StopWorkflowRequest.ProtoReflect.Descriptor instead. func (*StopWorkflowRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{8} + return file_project_proto_rawDescGZIP(), []int{7} } func (x *StopWorkflowRequest) GetProjectId() string { @@ -634,7 +493,7 @@ type StopWorkflowResponse struct { func (x *StopWorkflowResponse) Reset() { *x = StopWorkflowResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[9] + mi := &file_project_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -647,7 +506,7 @@ func (x *StopWorkflowResponse) String() string { func (*StopWorkflowResponse) ProtoMessage() {} func (x *StopWorkflowResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[9] + mi := &file_project_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -660,100 +519,7 @@ func (x *StopWorkflowResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StopWorkflowResponse.ProtoReflect.Descriptor instead. func (*StopWorkflowResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{9} -} - -type UpdateResourceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *UpdateResourceRequest) Reset() { - *x = UpdateResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceRequest) ProtoMessage() {} - -func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[10] - 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 UpdateResourceRequest.ProtoReflect.Descriptor instead. -func (*UpdateResourceRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{10} -} - -func (x *UpdateResourceRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -func (x *UpdateResourceRequest) GetResource() *Resource { - if x != nil { - return x.Resource - } - return nil -} - -type UpdateResourceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateResourceResponse) Reset() { - *x = UpdateResourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceResponse) ProtoMessage() {} - -func (x *UpdateResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[11] - 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 UpdateResourceResponse.ProtoReflect.Descriptor instead. -func (*UpdateResourceResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{11} + return file_project_proto_rawDescGZIP(), []int{8} } type Chat struct { @@ -767,7 +533,7 @@ type Chat struct { func (x *Chat) Reset() { *x = Chat{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[12] + mi := &file_project_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -780,7 +546,7 @@ func (x *Chat) String() string { func (*Chat) ProtoMessage() {} func (x *Chat) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[12] + mi := &file_project_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -793,7 +559,7 @@ func (x *Chat) ProtoReflect() protoreflect.Message { // Deprecated: Use Chat.ProtoReflect.Descriptor instead. func (*Chat) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{12} + return file_project_proto_rawDescGZIP(), []int{9} } func (x *Chat) GetId() string { @@ -815,7 +581,7 @@ type ChatMessage struct { func (x *ChatMessage) Reset() { *x = ChatMessage{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[13] + mi := &file_project_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -828,7 +594,7 @@ func (x *ChatMessage) String() string { func (*ChatMessage) ProtoMessage() {} func (x *ChatMessage) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[13] + mi := &file_project_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -841,7 +607,7 @@ func (x *ChatMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead. func (*ChatMessage) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{13} + return file_project_proto_rawDescGZIP(), []int{10} } func (x *ChatMessage) GetRole() string { @@ -870,7 +636,7 @@ type SendChatRequest struct { func (x *SendChatRequest) Reset() { *x = SendChatRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[14] + mi := &file_project_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -883,7 +649,7 @@ func (x *SendChatRequest) String() string { func (*SendChatRequest) ProtoMessage() {} func (x *SendChatRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[14] + mi := &file_project_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -896,7 +662,7 @@ func (x *SendChatRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendChatRequest.ProtoReflect.Descriptor instead. func (*SendChatRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{14} + return file_project_proto_rawDescGZIP(), []int{11} } func (x *SendChatRequest) GetChat() *Chat { @@ -924,7 +690,7 @@ type SendChatResponse struct { func (x *SendChatResponse) Reset() { *x = SendChatResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[15] + mi := &file_project_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -937,7 +703,7 @@ func (x *SendChatResponse) String() string { func (*SendChatResponse) ProtoMessage() {} func (x *SendChatResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[15] + mi := &file_project_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -950,7 +716,7 @@ func (x *SendChatResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SendChatResponse.ProtoReflect.Descriptor instead. func (*SendChatResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{15} + return file_project_proto_rawDescGZIP(), []int{12} } func (x *SendChatResponse) GetMessage() string { @@ -971,7 +737,7 @@ type GetWorkflowRunsRequest struct { func (x *GetWorkflowRunsRequest) Reset() { *x = GetWorkflowRunsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[16] + mi := &file_project_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -984,7 +750,7 @@ func (x *GetWorkflowRunsRequest) String() string { func (*GetWorkflowRunsRequest) ProtoMessage() {} func (x *GetWorkflowRunsRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[16] + mi := &file_project_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -997,7 +763,7 @@ func (x *GetWorkflowRunsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWorkflowRunsRequest.ProtoReflect.Descriptor instead. func (*GetWorkflowRunsRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{16} + return file_project_proto_rawDescGZIP(), []int{13} } func (x *GetWorkflowRunsRequest) GetProjectId() string { @@ -1018,7 +784,7 @@ type GetWorkflowRunsResponse struct { func (x *GetWorkflowRunsResponse) Reset() { *x = GetWorkflowRunsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[17] + mi := &file_project_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1031,7 +797,7 @@ func (x *GetWorkflowRunsResponse) String() string { func (*GetWorkflowRunsResponse) ProtoMessage() {} func (x *GetWorkflowRunsResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[17] + mi := &file_project_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1044,7 +810,7 @@ func (x *GetWorkflowRunsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWorkflowRunsResponse.ProtoReflect.Descriptor instead. func (*GetWorkflowRunsResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{17} + return file_project_proto_rawDescGZIP(), []int{14} } func (x *GetWorkflowRunsResponse) GetRuns() []*WorkflowRun { @@ -1067,7 +833,7 @@ type WorkflowRun struct { func (x *WorkflowRun) Reset() { *x = WorkflowRun{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[18] + mi := &file_project_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1080,7 +846,7 @@ func (x *WorkflowRun) String() string { func (*WorkflowRun) ProtoMessage() {} func (x *WorkflowRun) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[18] + mi := &file_project_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1093,7 +859,7 @@ func (x *WorkflowRun) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowRun.ProtoReflect.Descriptor instead. func (*WorkflowRun) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{18} + return file_project_proto_rawDescGZIP(), []int{15} } func (x *WorkflowRun) GetId() string { @@ -1130,7 +896,7 @@ type NodeExecution struct { func (x *NodeExecution) Reset() { *x = NodeExecution{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[19] + mi := &file_project_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1143,7 +909,7 @@ func (x *NodeExecution) String() string { func (*NodeExecution) ProtoMessage() {} func (x *NodeExecution) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[19] + mi := &file_project_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1156,7 +922,7 @@ func (x *NodeExecution) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeExecution.ProtoReflect.Descriptor instead. func (*NodeExecution) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{19} + return file_project_proto_rawDescGZIP(), []int{16} } func (x *NodeExecution) GetNodeId() string { @@ -1192,7 +958,7 @@ type GetNodeInfoRequest struct { func (x *GetNodeInfoRequest) Reset() { *x = GetNodeInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[20] + mi := &file_project_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1205,7 +971,7 @@ func (x *GetNodeInfoRequest) String() string { func (*GetNodeInfoRequest) ProtoMessage() {} func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[20] + mi := &file_project_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1218,7 +984,7 @@ func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead. func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{20} + return file_project_proto_rawDescGZIP(), []int{17} } func (x *GetNodeInfoRequest) GetProjectId() string { @@ -1252,7 +1018,7 @@ type GRPCTypeInfo struct { func (x *GRPCTypeInfo) Reset() { *x = GRPCTypeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[21] + mi := &file_project_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1265,7 +1031,7 @@ func (x *GRPCTypeInfo) String() string { func (*GRPCTypeInfo) ProtoMessage() {} func (x *GRPCTypeInfo) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[21] + mi := &file_project_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1278,7 +1044,7 @@ func (x *GRPCTypeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GRPCTypeInfo.ProtoReflect.Descriptor instead. func (*GRPCTypeInfo) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{21} + return file_project_proto_rawDescGZIP(), []int{18} } func (x *GRPCTypeInfo) GetInput() *descriptorpb.DescriptorProto { @@ -1337,7 +1103,7 @@ type GetNodeInfoResponse struct { func (x *GetNodeInfoResponse) Reset() { *x = GetNodeInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[22] + mi := &file_project_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1350,7 +1116,7 @@ func (x *GetNodeInfoResponse) String() string { func (*GetNodeInfoResponse) ProtoMessage() {} func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[22] + mi := &file_project_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1363,7 +1129,7 @@ func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetNodeInfoResponse.ProtoReflect.Descriptor instead. func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{22} + return file_project_proto_rawDescGZIP(), []int{19} } func (x *GetNodeInfoResponse) GetMethodProto() string { @@ -1380,99 +1146,6 @@ func (x *GetNodeInfoResponse) GetTypeInfo() *GRPCTypeInfo { return nil } -type DeleteResourceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - ResourceId string `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` -} - -func (x *DeleteResourceRequest) Reset() { - *x = DeleteResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceRequest) ProtoMessage() {} - -func (x *DeleteResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[23] - 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 DeleteResourceRequest.ProtoReflect.Descriptor instead. -func (*DeleteResourceRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{23} -} - -func (x *DeleteResourceRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -func (x *DeleteResourceRequest) GetResourceId() string { - if x != nil { - return x.ResourceId - } - return "" -} - -type DeleteResourceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteResourceResponse) Reset() { - *x = DeleteResourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceResponse) ProtoMessage() {} - -func (x *DeleteResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[24] - 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 DeleteResourceResponse.ProtoReflect.Descriptor instead. -func (*DeleteResourceResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{24} -} - type RuntimeData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1486,7 +1159,7 @@ type RuntimeData struct { func (x *RuntimeData) Reset() { *x = RuntimeData{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[25] + mi := &file_project_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1499,7 +1172,7 @@ func (x *RuntimeData) String() string { func (*RuntimeData) ProtoMessage() {} func (x *RuntimeData) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[25] + mi := &file_project_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1512,7 +1185,7 @@ func (x *RuntimeData) ProtoReflect() protoreflect.Message { // Deprecated: Use RuntimeData.ProtoReflect.Descriptor instead. func (*RuntimeData) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{25} + return file_project_proto_rawDescGZIP(), []int{20} } func (x *RuntimeData) GetName() string { @@ -1548,7 +1221,7 @@ type GraphData struct { func (x *GraphData) Reset() { *x = GraphData{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[26] + mi := &file_project_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1561,7 +1234,7 @@ func (x *GraphData) String() string { func (*GraphData) ProtoMessage() {} func (x *GraphData) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[26] + mi := &file_project_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1574,7 +1247,7 @@ func (x *GraphData) ProtoReflect() protoreflect.Message { // Deprecated: Use GraphData.ProtoReflect.Descriptor instead. func (*GraphData) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{26} + return file_project_proto_rawDescGZIP(), []int{21} } func (x *GraphData) GetX() float32 { @@ -1605,7 +1278,7 @@ type RunWorkflowRequest struct { func (x *RunWorkflowRequest) Reset() { *x = RunWorkflowRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[27] + mi := &file_project_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1618,123 +1291,7 @@ func (x *RunWorkflowRequest) String() string { func (*RunWorkflowRequest) ProtoMessage() {} func (x *RunWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[27] - 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 RunWorkflowRequest.ProtoReflect.Descriptor instead. -func (*RunWorkflowRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{27} -} - -func (x *RunWorkflowRequest) GetProjectId() string { - if x != nil { - return x.ProjectId - } - return "" -} - -func (x *RunWorkflowRequest) GetNodeId() string { - if x != nil { - return x.NodeId - } - return "" -} - -func (x *RunWorkflowRequest) GetInput() string { - if x != nil { - return x.Input - } - return "" -} - -func (x *RunWorkflowRequest) GetStartServer() bool { - if x != nil { - return x.StartServer - } - return false -} - -type Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Data) Reset() { - *x = Data{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Data) ProtoMessage() {} - -func (x *Data) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[28] - 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 Data.ProtoReflect.Descriptor instead. -func (*Data) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{28} -} - -func (x *Data) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type CreateResourceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *CreateResourceRequest) Reset() { - *x = CreateResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceRequest) ProtoMessage() {} - -func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[29] + mi := &file_project_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1745,50 +1302,64 @@ func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateResourceRequest.ProtoReflect.Descriptor instead. -func (*CreateResourceRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{29} +// Deprecated: Use RunWorkflowRequest.ProtoReflect.Descriptor instead. +func (*RunWorkflowRequest) Descriptor() ([]byte, []int) { + return file_project_proto_rawDescGZIP(), []int{22} } -func (x *CreateResourceRequest) GetProjectId() string { +func (x *RunWorkflowRequest) GetProjectId() string { if x != nil { return x.ProjectId } return "" } -func (x *CreateResourceRequest) GetResource() *Resource { +func (x *RunWorkflowRequest) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *RunWorkflowRequest) GetInput() string { if x != nil { - return x.Resource + return x.Input } - return nil + return "" +} + +func (x *RunWorkflowRequest) GetStartServer() bool { + if x != nil { + return x.StartServer + } + return false } -type CreateResourceResponse struct { +type Data struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *CreateResourceResponse) Reset() { - *x = CreateResourceResponse{} +func (x *Data) Reset() { + *x = Data{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[30] + mi := &file_project_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CreateResourceResponse) String() string { +func (x *Data) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateResourceResponse) ProtoMessage() {} +func (*Data) ProtoMessage() {} -func (x *CreateResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[30] +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_project_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1799,14 +1370,14 @@ func (x *CreateResourceResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateResourceResponse.ProtoReflect.Descriptor instead. -func (*CreateResourceResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{30} +// Deprecated: Use Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_project_proto_rawDescGZIP(), []int{23} } -func (x *CreateResourceResponse) GetResourceId() string { +func (x *Data) GetValue() string { if x != nil { - return x.ResourceId + return x.Value } return "" } @@ -1822,7 +1393,7 @@ type GetProjectRequest struct { func (x *GetProjectRequest) Reset() { *x = GetProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[31] + mi := &file_project_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1835,7 +1406,7 @@ func (x *GetProjectRequest) String() string { func (*GetProjectRequest) ProtoMessage() {} func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[31] + mi := &file_project_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1848,7 +1419,7 @@ func (x *GetProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProjectRequest.ProtoReflect.Descriptor instead. func (*GetProjectRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{31} + return file_project_proto_rawDescGZIP(), []int{24} } func (x *GetProjectRequest) GetId() string { @@ -1870,7 +1441,7 @@ type GetProjectResponse struct { func (x *GetProjectResponse) Reset() { *x = GetProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[32] + mi := &file_project_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1883,7 +1454,7 @@ func (x *GetProjectResponse) String() string { func (*GetProjectResponse) ProtoMessage() {} func (x *GetProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[32] + mi := &file_project_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1896,7 +1467,7 @@ func (x *GetProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProjectResponse.ProtoReflect.Descriptor instead. func (*GetProjectResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{32} + return file_project_proto_rawDescGZIP(), []int{25} } func (x *GetProjectResponse) GetProject() *Project { @@ -1924,7 +1495,7 @@ type GetProjectsRequest struct { func (x *GetProjectsRequest) Reset() { *x = GetProjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[33] + mi := &file_project_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1937,7 +1508,7 @@ func (x *GetProjectsRequest) String() string { func (*GetProjectsRequest) ProtoMessage() {} func (x *GetProjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[33] + mi := &file_project_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1950,7 +1521,7 @@ func (x *GetProjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProjectsRequest.ProtoReflect.Descriptor instead. func (*GetProjectsRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{33} + return file_project_proto_rawDescGZIP(), []int{26} } func (x *GetProjectsRequest) GetName() string { @@ -1971,7 +1542,7 @@ type GetProjectsResponse struct { func (x *GetProjectsResponse) Reset() { *x = GetProjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[34] + mi := &file_project_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1984,7 +1555,7 @@ func (x *GetProjectsResponse) String() string { func (*GetProjectsResponse) ProtoMessage() {} func (x *GetProjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[34] + mi := &file_project_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1997,7 +1568,7 @@ func (x *GetProjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProjectsResponse.ProtoReflect.Descriptor instead. func (*GetProjectsResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{34} + return file_project_proto_rawDescGZIP(), []int{27} } func (x *GetProjectsResponse) GetProjects() []*GetProjectResponse { @@ -2018,7 +1589,7 @@ type CreateProjectRequest struct { func (x *CreateProjectRequest) Reset() { *x = CreateProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[35] + mi := &file_project_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2031,7 +1602,7 @@ func (x *CreateProjectRequest) String() string { func (*CreateProjectRequest) ProtoMessage() {} func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[35] + mi := &file_project_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2044,7 +1615,7 @@ func (x *CreateProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateProjectRequest.ProtoReflect.Descriptor instead. func (*CreateProjectRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{35} + return file_project_proto_rawDescGZIP(), []int{28} } func (x *CreateProjectRequest) GetName() string { @@ -2065,7 +1636,7 @@ type CreateProjectResponse struct { func (x *CreateProjectResponse) Reset() { *x = CreateProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[36] + mi := &file_project_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2078,7 +1649,7 @@ func (x *CreateProjectResponse) String() string { func (*CreateProjectResponse) ProtoMessage() {} func (x *CreateProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[36] + mi := &file_project_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2091,7 +1662,7 @@ func (x *CreateProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateProjectResponse.ProtoReflect.Descriptor instead. func (*CreateProjectResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{36} + return file_project_proto_rawDescGZIP(), []int{29} } func (x *CreateProjectResponse) GetProject() *Project { @@ -2112,7 +1683,7 @@ type DeleteProjectRequest struct { func (x *DeleteProjectRequest) Reset() { *x = DeleteProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[37] + mi := &file_project_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2125,7 +1696,7 @@ func (x *DeleteProjectRequest) String() string { func (*DeleteProjectRequest) ProtoMessage() {} func (x *DeleteProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[37] + mi := &file_project_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2138,7 +1709,7 @@ func (x *DeleteProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteProjectRequest.ProtoReflect.Descriptor instead. func (*DeleteProjectRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{37} + return file_project_proto_rawDescGZIP(), []int{30} } func (x *DeleteProjectRequest) GetId() string { @@ -2159,7 +1730,7 @@ type DeleteProjectResponse struct { func (x *DeleteProjectResponse) Reset() { *x = DeleteProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[38] + mi := &file_project_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2172,7 +1743,7 @@ func (x *DeleteProjectResponse) String() string { func (*DeleteProjectResponse) ProtoMessage() {} func (x *DeleteProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[38] + mi := &file_project_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2185,7 +1756,7 @@ func (x *DeleteProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteProjectResponse.ProtoReflect.Descriptor instead. func (*DeleteProjectResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{38} + return file_project_proto_rawDescGZIP(), []int{31} } func (x *DeleteProjectResponse) GetProject() *Project { @@ -2195,7 +1766,7 @@ func (x *DeleteProjectResponse) GetProject() *Project { return nil } -type GetResourcesRequest struct { +type GetProvidersRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2203,23 +1774,23 @@ type GetResourcesRequest struct { ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` } -func (x *GetResourcesRequest) Reset() { - *x = GetResourcesRequest{} +func (x *GetProvidersRequest) Reset() { + *x = GetProvidersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[39] + mi := &file_project_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetResourcesRequest) String() string { +func (x *GetProvidersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetResourcesRequest) ProtoMessage() {} +func (*GetProvidersRequest) ProtoMessage() {} -func (x *GetResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[39] +func (x *GetProvidersRequest) ProtoReflect() protoreflect.Message { + mi := &file_project_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2230,45 +1801,45 @@ func (x *GetResourcesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetResourcesRequest.ProtoReflect.Descriptor instead. -func (*GetResourcesRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{39} +// Deprecated: Use GetProvidersRequest.ProtoReflect.Descriptor instead. +func (*GetProvidersRequest) Descriptor() ([]byte, []int) { + return file_project_proto_rawDescGZIP(), []int{32} } -func (x *GetResourcesRequest) GetProjectId() string { +func (x *GetProvidersRequest) GetProjectId() string { if x != nil { return x.ProjectId } return "" } -type EnumeratedResource struct { +type EnumeratedProvider struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Provider *Node `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"` - Info *ResourceInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + Info *ProviderInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` } -func (x *EnumeratedResource) Reset() { - *x = EnumeratedResource{} +func (x *EnumeratedProvider) Reset() { + *x = EnumeratedProvider{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[40] + mi := &file_project_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EnumeratedResource) String() string { +func (x *EnumeratedProvider) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EnumeratedResource) ProtoMessage() {} +func (*EnumeratedProvider) ProtoMessage() {} -func (x *EnumeratedResource) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[40] +func (x *EnumeratedProvider) ProtoReflect() protoreflect.Message { + mi := &file_project_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2279,58 +1850,58 @@ func (x *EnumeratedResource) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EnumeratedResource.ProtoReflect.Descriptor instead. -func (*EnumeratedResource) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{40} +// Deprecated: Use EnumeratedProvider.ProtoReflect.Descriptor instead. +func (*EnumeratedProvider) Descriptor() ([]byte, []int) { + return file_project_proto_rawDescGZIP(), []int{33} } -func (x *EnumeratedResource) GetResource() *Resource { +func (x *EnumeratedProvider) GetProvider() *Node { if x != nil { - return x.Resource + return x.Provider } return nil } -func (x *EnumeratedResource) GetNodes() []*Node { +func (x *EnumeratedProvider) GetNodes() []*Node { if x != nil { return x.Nodes } return nil } -func (x *EnumeratedResource) GetInfo() *ResourceInfo { +func (x *EnumeratedProvider) GetInfo() *ProviderInfo { if x != nil { return x.Info } return nil } -type ResourceInfo struct { +type ProviderInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - State ResourceState `protobuf:"varint,1,opt,name=state,proto3,enum=project.ResourceState" json:"state,omitempty"` + State ProviderState `protobuf:"varint,1,opt,name=state,proto3,enum=project.ProviderState" json:"state,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func (x *ResourceInfo) Reset() { - *x = ResourceInfo{} +func (x *ProviderInfo) Reset() { + *x = ProviderInfo{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[41] + mi := &file_project_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ResourceInfo) String() string { +func (x *ProviderInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResourceInfo) ProtoMessage() {} +func (*ProviderInfo) ProtoMessage() {} -func (x *ResourceInfo) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[41] +func (x *ProviderInfo) ProtoReflect() protoreflect.Message { + mi := &file_project_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2341,50 +1912,50 @@ func (x *ResourceInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead. -func (*ResourceInfo) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{41} +// Deprecated: Use ProviderInfo.ProtoReflect.Descriptor instead. +func (*ProviderInfo) Descriptor() ([]byte, []int) { + return file_project_proto_rawDescGZIP(), []int{34} } -func (x *ResourceInfo) GetState() ResourceState { +func (x *ProviderInfo) GetState() ProviderState { if x != nil { return x.State } - return ResourceState_UNKNOWN + return ProviderState_UNKNOWN } -func (x *ResourceInfo) GetError() string { +func (x *ProviderInfo) GetError() string { if x != nil { return x.Error } return "" } -type GetResourcesResponse struct { +type GetProvidersResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Resources []*EnumeratedResource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` + Providers []*EnumeratedProvider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers,omitempty"` } -func (x *GetResourcesResponse) Reset() { - *x = GetResourcesResponse{} +func (x *GetProvidersResponse) Reset() { + *x = GetProvidersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[42] + mi := &file_project_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetResourcesResponse) String() string { +func (x *GetProvidersResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetResourcesResponse) ProtoMessage() {} +func (*GetProvidersResponse) ProtoMessage() {} -func (x *GetResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[42] +func (x *GetProvidersResponse) ProtoReflect() protoreflect.Message { + mi := &file_project_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2395,14 +1966,14 @@ func (x *GetResourcesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetResourcesResponse.ProtoReflect.Descriptor instead. -func (*GetResourcesResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{42} +// Deprecated: Use GetProvidersResponse.ProtoReflect.Descriptor instead. +func (*GetProvidersResponse) Descriptor() ([]byte, []int) { + return file_project_proto_rawDescGZIP(), []int{35} } -func (x *GetResourcesResponse) GetResources() []*EnumeratedResource { +func (x *GetProvidersResponse) GetProviders() []*EnumeratedProvider { if x != nil { - return x.Resources + return x.Providers } return nil } @@ -2412,15 +1983,14 @@ type SaveProjectRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` - Graph *Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` - Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` + ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Graph *Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` } func (x *SaveProjectRequest) Reset() { *x = SaveProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[43] + mi := &file_project_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2433,7 +2003,7 @@ func (x *SaveProjectRequest) String() string { func (*SaveProjectRequest) ProtoMessage() {} func (x *SaveProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[43] + mi := &file_project_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2446,7 +2016,7 @@ func (x *SaveProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveProjectRequest.ProtoReflect.Descriptor instead. func (*SaveProjectRequest) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{43} + return file_project_proto_rawDescGZIP(), []int{36} } func (x *SaveProjectRequest) GetProjectId() string { @@ -2463,13 +2033,6 @@ func (x *SaveProjectRequest) GetGraph() *Graph { return nil } -func (x *SaveProjectRequest) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - type SaveProjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2481,7 +2044,7 @@ type SaveProjectResponse struct { func (x *SaveProjectResponse) Reset() { *x = SaveProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_project_proto_msgTypes[44] + mi := &file_project_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2494,7 +2057,7 @@ func (x *SaveProjectResponse) String() string { func (*SaveProjectResponse) ProtoMessage() {} func (x *SaveProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_project_proto_msgTypes[44] + mi := &file_project_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2507,7 +2070,7 @@ func (x *SaveProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveProjectResponse.ProtoReflect.Descriptor instead. func (*SaveProjectResponse) Descriptor() ([]byte, []int) { - return file_project_proto_rawDescGZIP(), []int{44} + return file_project_proto_rawDescGZIP(), []int{37} } func (x *SaveProjectResponse) GetProject() *Project { @@ -2524,181 +2087,148 @@ var file_project_proto_rawDesc = []byte{ 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x05, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x26, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22, 0xf9, 0x01, 0x0a, 0x07, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x22, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x12, 0x30, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x49, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x22, 0x17, 0x0a, 0x15, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x4c, 0x6f, 0x61, - 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x22, 0x41, 0x0a, 0x13, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x64, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x46, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x64, 0x65, 0x73, - 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x5f, - 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x1a, - 0x5f, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x63, 0x0a, 0x0f, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x47, 0x72, + 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x22, 0x49, 0x0a, 0x14, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, + 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x41, 0x0a, 0x13, 0x4c, 0x6f, 0x61, 0x64, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x64, 0x67, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x6c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0b, + 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x1a, 0x5f, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, - 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x18, 0x0a, 0x16, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, - 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4e, 0x0a, 0x0f, 0x53, - 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x04, 0x63, 0x68, 0x61, - 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x53, - 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x37, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x49, 0x64, 0x22, 0x43, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, - 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, - 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x0b, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x52, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, - 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, - 0x45, 0x78, 0x65, 0x63, 0x73, 0x22, 0x56, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x4c, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0xc2, 0x04, 0x0a, 0x0c, - 0x47, 0x52, 0x50, 0x43, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x05, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x46, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x52, - 0x50, 0x43, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x6c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x47, - 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x5f, 0x0a, 0x0f, 0x44, 0x65, - 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x63, 0x0a, 0x0f, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x13, 0x53, 0x74, + 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, + 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, + 0x64, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x0a, 0x04, 0x43, 0x68, 0x61, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x3b, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4e, + 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x04, + 0x63, 0x68, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2c, + 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x37, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x28, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x0b, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x75, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x35, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, + 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x73, 0x22, 0x56, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x22, 0x4c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0xc2, + 0x04, 0x0a, 0x0c, 0x47, 0x52, 0x50, 0x43, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x36, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x63, 0x0a, 0x0f, 0x45, - 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x6c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x0a, 0x09, 0x74, 0x79, - 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x54, 0x79, 0x70, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x57, - 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x61, 0x0a, 0x0b, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x47, 0x52, 0x50, 0x43, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x64, + 0x65, 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x46, 0x0a, 0x0b, 0x65, 0x6e, 0x75, + 0x6d, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x54, 0x79, 0x70, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x12, 0x47, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x5f, 0x0a, + 0x0f, 0x44, 0x65, 0x73, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x63, + 0x0a, 0x0f, 0x45, 0x6e, 0x75, 0x6d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x0a, + 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x61, 0x0a, 0x0b, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x67, 0x72, @@ -2717,150 +2247,118 @@ var file_project_proto_rawDesc = []byte{ 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x66, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x39, 0x0a, 0x16, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6d, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2b, 0x0a, - 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x43, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, - 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, + 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x43, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0x34, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x12, 0x45, 0x6e, 0x75, - 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x2e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x21, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x52, 0x0a, - 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x22, 0x51, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x05, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x30, - 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x22, 0x41, 0x0a, 0x13, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2a, 0x28, 0x0a, 0x09, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0x01, 0x2a, 0x32, 0x0a, - 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, - 0x45, 0x41, 0x44, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x02, 0x32, 0xce, 0x0a, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, - 0x00, 0x12, 0x43, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x12, 0x18, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x50, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x4c, 0x6f, 0x61, 0x64, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4c, - 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, - 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x47, + 0x63, 0x74, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, 0x0a, 0x15, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, + 0x34, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, + 0x6e, 0x66, 0x6f, 0x22, 0x52, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x51, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x22, 0x57, 0x0a, 0x12, 0x53, 0x61, + 0x76, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x22, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x22, 0x41, 0x0a, 0x13, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x32, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xd5, 0x08, 0x0a, 0x0e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x08, 0x53, 0x65, + 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, + 0x68, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, + 0x50, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, + 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x12, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, @@ -2908,146 +2406,125 @@ func file_project_proto_rawDescGZIP() []byte { return file_project_proto_rawDescData } -var file_project_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_project_proto_msgTypes = make([]protoimpl.MessageInfo, 49) +var file_project_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_project_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_project_proto_goTypes = []interface{}{ - (LayerType)(0), // 0: project.LayerType - (ResourceState)(0), // 1: project.ResourceState - (*Layer)(nil), // 2: project.Layer - (*Project)(nil), // 3: project.Project - (*ExportProjectRequest)(nil), // 4: project.ExportProjectRequest - (*ExportProjectResponse)(nil), // 5: project.ExportProjectResponse - (*LoadProjectRequest)(nil), // 6: project.LoadProjectRequest - (*LoadProjectResponse)(nil), // 7: project.LoadProjectResponse - (*GetProjectTypesRequest)(nil), // 8: project.GetProjectTypesRequest - (*ProjectTypes)(nil), // 9: project.ProjectTypes - (*StopWorkflowRequest)(nil), // 10: project.StopWorkflowRequest - (*StopWorkflowResponse)(nil), // 11: project.StopWorkflowResponse - (*UpdateResourceRequest)(nil), // 12: project.UpdateResourceRequest - (*UpdateResourceResponse)(nil), // 13: project.UpdateResourceResponse - (*Chat)(nil), // 14: project.Chat - (*ChatMessage)(nil), // 15: project.ChatMessage - (*SendChatRequest)(nil), // 16: project.SendChatRequest - (*SendChatResponse)(nil), // 17: project.SendChatResponse - (*GetWorkflowRunsRequest)(nil), // 18: project.GetWorkflowRunsRequest - (*GetWorkflowRunsResponse)(nil), // 19: project.GetWorkflowRunsResponse - (*WorkflowRun)(nil), // 20: project.WorkflowRun - (*NodeExecution)(nil), // 21: project.NodeExecution - (*GetNodeInfoRequest)(nil), // 22: project.GetNodeInfoRequest - (*GRPCTypeInfo)(nil), // 23: project.GRPCTypeInfo - (*GetNodeInfoResponse)(nil), // 24: project.GetNodeInfoResponse - (*DeleteResourceRequest)(nil), // 25: project.DeleteResourceRequest - (*DeleteResourceResponse)(nil), // 26: project.DeleteResourceResponse - (*RuntimeData)(nil), // 27: project.RuntimeData - (*GraphData)(nil), // 28: project.GraphData - (*RunWorkflowRequest)(nil), // 29: project.RunWorkflowRequest - (*Data)(nil), // 30: project.Data - (*CreateResourceRequest)(nil), // 31: project.CreateResourceRequest - (*CreateResourceResponse)(nil), // 32: project.CreateResourceResponse - (*GetProjectRequest)(nil), // 33: project.GetProjectRequest - (*GetProjectResponse)(nil), // 34: project.GetProjectResponse - (*GetProjectsRequest)(nil), // 35: project.GetProjectsRequest - (*GetProjectsResponse)(nil), // 36: project.GetProjectsResponse - (*CreateProjectRequest)(nil), // 37: project.CreateProjectRequest - (*CreateProjectResponse)(nil), // 38: project.CreateProjectResponse - (*DeleteProjectRequest)(nil), // 39: project.DeleteProjectRequest - (*DeleteProjectResponse)(nil), // 40: project.DeleteProjectResponse - (*GetResourcesRequest)(nil), // 41: project.GetResourcesRequest - (*EnumeratedResource)(nil), // 42: project.EnumeratedResource - (*ResourceInfo)(nil), // 43: project.ResourceInfo - (*GetResourcesResponse)(nil), // 44: project.GetResourcesResponse - (*SaveProjectRequest)(nil), // 45: project.SaveProjectRequest - (*SaveProjectResponse)(nil), // 46: project.SaveProjectResponse - nil, // 47: project.ProjectTypes.DescLookupEntry - nil, // 48: project.ProjectTypes.EnumLookupEntry - nil, // 49: project.GRPCTypeInfo.DescLookupEntry - nil, // 50: project.GRPCTypeInfo.EnumLookupEntry - (*Graph)(nil), // 51: graph.Graph - (*Resource)(nil), // 52: resource.Resource - (*descriptorpb.DescriptorProto)(nil), // 53: google.protobuf.DescriptorProto - (*descriptorpb.MethodDescriptorProto)(nil), // 54: google.protobuf.MethodDescriptorProto - (*Node)(nil), // 55: graph.Node - (*descriptorpb.EnumDescriptorProto)(nil), // 56: google.protobuf.EnumDescriptorProto + (ProviderState)(0), // 0: project.ProviderState + (*Project)(nil), // 1: project.Project + (*ExportProjectRequest)(nil), // 2: project.ExportProjectRequest + (*ExportProjectResponse)(nil), // 3: project.ExportProjectResponse + (*LoadProjectRequest)(nil), // 4: project.LoadProjectRequest + (*LoadProjectResponse)(nil), // 5: project.LoadProjectResponse + (*GetProjectTypesRequest)(nil), // 6: project.GetProjectTypesRequest + (*ProjectTypes)(nil), // 7: project.ProjectTypes + (*StopWorkflowRequest)(nil), // 8: project.StopWorkflowRequest + (*StopWorkflowResponse)(nil), // 9: project.StopWorkflowResponse + (*Chat)(nil), // 10: project.Chat + (*ChatMessage)(nil), // 11: project.ChatMessage + (*SendChatRequest)(nil), // 12: project.SendChatRequest + (*SendChatResponse)(nil), // 13: project.SendChatResponse + (*GetWorkflowRunsRequest)(nil), // 14: project.GetWorkflowRunsRequest + (*GetWorkflowRunsResponse)(nil), // 15: project.GetWorkflowRunsResponse + (*WorkflowRun)(nil), // 16: project.WorkflowRun + (*NodeExecution)(nil), // 17: project.NodeExecution + (*GetNodeInfoRequest)(nil), // 18: project.GetNodeInfoRequest + (*GRPCTypeInfo)(nil), // 19: project.GRPCTypeInfo + (*GetNodeInfoResponse)(nil), // 20: project.GetNodeInfoResponse + (*RuntimeData)(nil), // 21: project.RuntimeData + (*GraphData)(nil), // 22: project.GraphData + (*RunWorkflowRequest)(nil), // 23: project.RunWorkflowRequest + (*Data)(nil), // 24: project.Data + (*GetProjectRequest)(nil), // 25: project.GetProjectRequest + (*GetProjectResponse)(nil), // 26: project.GetProjectResponse + (*GetProjectsRequest)(nil), // 27: project.GetProjectsRequest + (*GetProjectsResponse)(nil), // 28: project.GetProjectsResponse + (*CreateProjectRequest)(nil), // 29: project.CreateProjectRequest + (*CreateProjectResponse)(nil), // 30: project.CreateProjectResponse + (*DeleteProjectRequest)(nil), // 31: project.DeleteProjectRequest + (*DeleteProjectResponse)(nil), // 32: project.DeleteProjectResponse + (*GetProvidersRequest)(nil), // 33: project.GetProvidersRequest + (*EnumeratedProvider)(nil), // 34: project.EnumeratedProvider + (*ProviderInfo)(nil), // 35: project.ProviderInfo + (*GetProvidersResponse)(nil), // 36: project.GetProvidersResponse + (*SaveProjectRequest)(nil), // 37: project.SaveProjectRequest + (*SaveProjectResponse)(nil), // 38: project.SaveProjectResponse + nil, // 39: project.ProjectTypes.DescLookupEntry + nil, // 40: project.ProjectTypes.EnumLookupEntry + nil, // 41: project.GRPCTypeInfo.DescLookupEntry + nil, // 42: project.GRPCTypeInfo.EnumLookupEntry + (*Graph)(nil), // 43: graph.Graph + (*descriptorpb.DescriptorProto)(nil), // 44: google.protobuf.DescriptorProto + (*descriptorpb.MethodDescriptorProto)(nil), // 45: google.protobuf.MethodDescriptorProto + (*Node)(nil), // 46: graph.Node + (*descriptorpb.EnumDescriptorProto)(nil), // 47: google.protobuf.EnumDescriptorProto } var file_project_proto_depIdxs = []int32{ - 0, // 0: project.Layer.type:type_name -> project.LayerType - 51, // 1: project.Layer.graph:type_name -> graph.Graph - 51, // 2: project.Project.graph:type_name -> graph.Graph - 52, // 3: project.Project.resources:type_name -> resource.Resource - 3, // 4: project.LoadProjectResponse.project:type_name -> project.Project - 53, // 5: project.ProjectTypes.node_type:type_name -> google.protobuf.DescriptorProto - 53, // 6: project.ProjectTypes.edge_type:type_name -> google.protobuf.DescriptorProto - 47, // 7: project.ProjectTypes.desc_lookup:type_name -> project.ProjectTypes.DescLookupEntry - 48, // 8: project.ProjectTypes.enum_lookup:type_name -> project.ProjectTypes.EnumLookupEntry - 52, // 9: project.UpdateResourceRequest.resource:type_name -> resource.Resource - 14, // 10: project.SendChatRequest.chat:type_name -> project.Chat - 20, // 11: project.GetWorkflowRunsResponse.runs:type_name -> project.WorkflowRun - 29, // 12: project.WorkflowRun.request:type_name -> project.RunWorkflowRequest - 21, // 13: project.WorkflowRun.node_execs:type_name -> project.NodeExecution - 53, // 14: project.GRPCTypeInfo.input:type_name -> google.protobuf.DescriptorProto - 53, // 15: project.GRPCTypeInfo.output:type_name -> google.protobuf.DescriptorProto - 49, // 16: project.GRPCTypeInfo.desc_lookup:type_name -> project.GRPCTypeInfo.DescLookupEntry - 50, // 17: project.GRPCTypeInfo.enum_lookup:type_name -> project.GRPCTypeInfo.EnumLookupEntry - 54, // 18: project.GRPCTypeInfo.method_desc:type_name -> google.protobuf.MethodDescriptorProto - 23, // 19: project.GetNodeInfoResponse.type_info:type_name -> project.GRPCTypeInfo - 28, // 20: project.RuntimeData.graph:type_name -> project.GraphData - 52, // 21: project.CreateResourceRequest.resource:type_name -> resource.Resource - 3, // 22: project.GetProjectResponse.project:type_name -> project.Project - 9, // 23: project.GetProjectResponse.types:type_name -> project.ProjectTypes - 34, // 24: project.GetProjectsResponse.projects:type_name -> project.GetProjectResponse - 3, // 25: project.CreateProjectResponse.project:type_name -> project.Project - 3, // 26: project.DeleteProjectResponse.project:type_name -> project.Project - 52, // 27: project.EnumeratedResource.resource:type_name -> resource.Resource - 55, // 28: project.EnumeratedResource.nodes:type_name -> graph.Node - 43, // 29: project.EnumeratedResource.info:type_name -> project.ResourceInfo - 1, // 30: project.ResourceInfo.state:type_name -> project.ResourceState - 42, // 31: project.GetResourcesResponse.resources:type_name -> project.EnumeratedResource - 51, // 32: project.SaveProjectRequest.graph:type_name -> graph.Graph - 52, // 33: project.SaveProjectRequest.resources:type_name -> resource.Resource - 3, // 34: project.SaveProjectResponse.project:type_name -> project.Project - 53, // 35: project.ProjectTypes.DescLookupEntry.value:type_name -> google.protobuf.DescriptorProto - 56, // 36: project.ProjectTypes.EnumLookupEntry.value:type_name -> google.protobuf.EnumDescriptorProto - 53, // 37: project.GRPCTypeInfo.DescLookupEntry.value:type_name -> google.protobuf.DescriptorProto - 56, // 38: project.GRPCTypeInfo.EnumLookupEntry.value:type_name -> google.protobuf.EnumDescriptorProto - 8, // 39: project.ProjectService.GetProjectTypes:input_type -> project.GetProjectTypesRequest - 16, // 40: project.ProjectService.SendChat:input_type -> project.SendChatRequest - 4, // 41: project.ProjectService.ExportProject:input_type -> project.ExportProjectRequest - 6, // 42: project.ProjectService.LoadProject:input_type -> project.LoadProjectRequest - 33, // 43: project.ProjectService.GetProject:input_type -> project.GetProjectRequest - 35, // 44: project.ProjectService.GetProjects:input_type -> project.GetProjectsRequest - 37, // 45: project.ProjectService.CreateProject:input_type -> project.CreateProjectRequest - 39, // 46: project.ProjectService.DeleteProject:input_type -> project.DeleteProjectRequest - 12, // 47: project.ProjectService.UpdateResource:input_type -> project.UpdateResourceRequest - 31, // 48: project.ProjectService.CreateResource:input_type -> project.CreateResourceRequest - 41, // 49: project.ProjectService.GetResources:input_type -> project.GetResourcesRequest - 25, // 50: project.ProjectService.DeleteResource:input_type -> project.DeleteResourceRequest - 22, // 51: project.ProjectService.GetNodeInfo:input_type -> project.GetNodeInfoRequest - 45, // 52: project.ProjectService.SaveProject:input_type -> project.SaveProjectRequest - 29, // 53: project.ProjectService.RunWorkflow:input_type -> project.RunWorkflowRequest - 10, // 54: project.ProjectService.StopWorkflow:input_type -> project.StopWorkflowRequest - 18, // 55: project.ProjectService.GetWorkflowRuns:input_type -> project.GetWorkflowRunsRequest - 9, // 56: project.ProjectService.GetProjectTypes:output_type -> project.ProjectTypes - 17, // 57: project.ProjectService.SendChat:output_type -> project.SendChatResponse - 5, // 58: project.ProjectService.ExportProject:output_type -> project.ExportProjectResponse - 7, // 59: project.ProjectService.LoadProject:output_type -> project.LoadProjectResponse - 34, // 60: project.ProjectService.GetProject:output_type -> project.GetProjectResponse - 36, // 61: project.ProjectService.GetProjects:output_type -> project.GetProjectsResponse - 38, // 62: project.ProjectService.CreateProject:output_type -> project.CreateProjectResponse - 40, // 63: project.ProjectService.DeleteProject:output_type -> project.DeleteProjectResponse - 13, // 64: project.ProjectService.UpdateResource:output_type -> project.UpdateResourceResponse - 32, // 65: project.ProjectService.CreateResource:output_type -> project.CreateResourceResponse - 44, // 66: project.ProjectService.GetResources:output_type -> project.GetResourcesResponse - 26, // 67: project.ProjectService.DeleteResource:output_type -> project.DeleteResourceResponse - 24, // 68: project.ProjectService.GetNodeInfo:output_type -> project.GetNodeInfoResponse - 46, // 69: project.ProjectService.SaveProject:output_type -> project.SaveProjectResponse - 21, // 70: project.ProjectService.RunWorkflow:output_type -> project.NodeExecution - 11, // 71: project.ProjectService.StopWorkflow:output_type -> project.StopWorkflowResponse - 19, // 72: project.ProjectService.GetWorkflowRuns:output_type -> project.GetWorkflowRunsResponse - 56, // [56:73] is the sub-list for method output_type - 39, // [39:56] is the sub-list for method input_type - 39, // [39:39] is the sub-list for extension type_name - 39, // [39:39] is the sub-list for extension extendee - 0, // [0:39] is the sub-list for field type_name + 43, // 0: project.Project.graph:type_name -> graph.Graph + 1, // 1: project.LoadProjectResponse.project:type_name -> project.Project + 44, // 2: project.ProjectTypes.node_type:type_name -> google.protobuf.DescriptorProto + 44, // 3: project.ProjectTypes.edge_type:type_name -> google.protobuf.DescriptorProto + 39, // 4: project.ProjectTypes.desc_lookup:type_name -> project.ProjectTypes.DescLookupEntry + 40, // 5: project.ProjectTypes.enum_lookup:type_name -> project.ProjectTypes.EnumLookupEntry + 10, // 6: project.SendChatRequest.chat:type_name -> project.Chat + 16, // 7: project.GetWorkflowRunsResponse.runs:type_name -> project.WorkflowRun + 23, // 8: project.WorkflowRun.request:type_name -> project.RunWorkflowRequest + 17, // 9: project.WorkflowRun.node_execs:type_name -> project.NodeExecution + 44, // 10: project.GRPCTypeInfo.input:type_name -> google.protobuf.DescriptorProto + 44, // 11: project.GRPCTypeInfo.output:type_name -> google.protobuf.DescriptorProto + 41, // 12: project.GRPCTypeInfo.desc_lookup:type_name -> project.GRPCTypeInfo.DescLookupEntry + 42, // 13: project.GRPCTypeInfo.enum_lookup:type_name -> project.GRPCTypeInfo.EnumLookupEntry + 45, // 14: project.GRPCTypeInfo.method_desc:type_name -> google.protobuf.MethodDescriptorProto + 19, // 15: project.GetNodeInfoResponse.type_info:type_name -> project.GRPCTypeInfo + 22, // 16: project.RuntimeData.graph:type_name -> project.GraphData + 1, // 17: project.GetProjectResponse.project:type_name -> project.Project + 7, // 18: project.GetProjectResponse.types:type_name -> project.ProjectTypes + 26, // 19: project.GetProjectsResponse.projects:type_name -> project.GetProjectResponse + 1, // 20: project.CreateProjectResponse.project:type_name -> project.Project + 1, // 21: project.DeleteProjectResponse.project:type_name -> project.Project + 46, // 22: project.EnumeratedProvider.provider:type_name -> graph.Node + 46, // 23: project.EnumeratedProvider.nodes:type_name -> graph.Node + 35, // 24: project.EnumeratedProvider.info:type_name -> project.ProviderInfo + 0, // 25: project.ProviderInfo.state:type_name -> project.ProviderState + 34, // 26: project.GetProvidersResponse.providers:type_name -> project.EnumeratedProvider + 43, // 27: project.SaveProjectRequest.graph:type_name -> graph.Graph + 1, // 28: project.SaveProjectResponse.project:type_name -> project.Project + 44, // 29: project.ProjectTypes.DescLookupEntry.value:type_name -> google.protobuf.DescriptorProto + 47, // 30: project.ProjectTypes.EnumLookupEntry.value:type_name -> google.protobuf.EnumDescriptorProto + 44, // 31: project.GRPCTypeInfo.DescLookupEntry.value:type_name -> google.protobuf.DescriptorProto + 47, // 32: project.GRPCTypeInfo.EnumLookupEntry.value:type_name -> google.protobuf.EnumDescriptorProto + 6, // 33: project.ProjectService.GetProjectTypes:input_type -> project.GetProjectTypesRequest + 12, // 34: project.ProjectService.SendChat:input_type -> project.SendChatRequest + 2, // 35: project.ProjectService.ExportProject:input_type -> project.ExportProjectRequest + 4, // 36: project.ProjectService.LoadProject:input_type -> project.LoadProjectRequest + 25, // 37: project.ProjectService.GetProject:input_type -> project.GetProjectRequest + 27, // 38: project.ProjectService.GetProjects:input_type -> project.GetProjectsRequest + 29, // 39: project.ProjectService.CreateProject:input_type -> project.CreateProjectRequest + 31, // 40: project.ProjectService.DeleteProject:input_type -> project.DeleteProjectRequest + 33, // 41: project.ProjectService.EnumerateProviders:input_type -> project.GetProvidersRequest + 18, // 42: project.ProjectService.GetNodeInfo:input_type -> project.GetNodeInfoRequest + 37, // 43: project.ProjectService.SaveProject:input_type -> project.SaveProjectRequest + 23, // 44: project.ProjectService.RunWorkflow:input_type -> project.RunWorkflowRequest + 8, // 45: project.ProjectService.StopWorkflow:input_type -> project.StopWorkflowRequest + 14, // 46: project.ProjectService.GetWorkflowRuns:input_type -> project.GetWorkflowRunsRequest + 7, // 47: project.ProjectService.GetProjectTypes:output_type -> project.ProjectTypes + 13, // 48: project.ProjectService.SendChat:output_type -> project.SendChatResponse + 3, // 49: project.ProjectService.ExportProject:output_type -> project.ExportProjectResponse + 5, // 50: project.ProjectService.LoadProject:output_type -> project.LoadProjectResponse + 26, // 51: project.ProjectService.GetProject:output_type -> project.GetProjectResponse + 28, // 52: project.ProjectService.GetProjects:output_type -> project.GetProjectsResponse + 30, // 53: project.ProjectService.CreateProject:output_type -> project.CreateProjectResponse + 32, // 54: project.ProjectService.DeleteProject:output_type -> project.DeleteProjectResponse + 36, // 55: project.ProjectService.EnumerateProviders:output_type -> project.GetProvidersResponse + 20, // 56: project.ProjectService.GetNodeInfo:output_type -> project.GetNodeInfoResponse + 38, // 57: project.ProjectService.SaveProject:output_type -> project.SaveProjectResponse + 17, // 58: project.ProjectService.RunWorkflow:output_type -> project.NodeExecution + 9, // 59: project.ProjectService.StopWorkflow:output_type -> project.StopWorkflowResponse + 15, // 60: project.ProjectService.GetWorkflowRuns:output_type -> project.GetWorkflowRunsResponse + 47, // [47:61] is the sub-list for method output_type + 33, // [33:47] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name } func init() { file_project_proto_init() } @@ -3056,11 +2533,9 @@ func file_project_proto_init() { return } file_graph_proto_init() - file_block_proto_init() - file_resource_proto_init() if !protoimpl.UnsafeEnabled { file_project_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Layer); i { + switch v := v.(*Project); i { case 0: return &v.state case 1: @@ -3072,7 +2547,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Project); i { + switch v := v.(*ExportProjectRequest); i { case 0: return &v.state case 1: @@ -3084,7 +2559,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportProjectRequest); i { + switch v := v.(*ExportProjectResponse); i { case 0: return &v.state case 1: @@ -3096,7 +2571,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportProjectResponse); i { + switch v := v.(*LoadProjectRequest); i { case 0: return &v.state case 1: @@ -3108,7 +2583,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadProjectRequest); i { + switch v := v.(*LoadProjectResponse); i { case 0: return &v.state case 1: @@ -3120,7 +2595,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadProjectResponse); i { + switch v := v.(*GetProjectTypesRequest); i { case 0: return &v.state case 1: @@ -3132,7 +2607,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProjectTypesRequest); i { + switch v := v.(*ProjectTypes); i { case 0: return &v.state case 1: @@ -3144,7 +2619,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectTypes); i { + switch v := v.(*StopWorkflowRequest); i { case 0: return &v.state case 1: @@ -3156,7 +2631,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopWorkflowRequest); i { + switch v := v.(*StopWorkflowResponse); i { case 0: return &v.state case 1: @@ -3168,7 +2643,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StopWorkflowResponse); i { + switch v := v.(*Chat); i { case 0: return &v.state case 1: @@ -3180,7 +2655,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceRequest); i { + switch v := v.(*ChatMessage); i { case 0: return &v.state case 1: @@ -3192,7 +2667,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceResponse); i { + switch v := v.(*SendChatRequest); i { case 0: return &v.state case 1: @@ -3204,7 +2679,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Chat); i { + switch v := v.(*SendChatResponse); i { case 0: return &v.state case 1: @@ -3216,7 +2691,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatMessage); i { + switch v := v.(*GetWorkflowRunsRequest); i { case 0: return &v.state case 1: @@ -3228,7 +2703,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendChatRequest); i { + switch v := v.(*GetWorkflowRunsResponse); i { case 0: return &v.state case 1: @@ -3240,7 +2715,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendChatResponse); i { + switch v := v.(*WorkflowRun); i { case 0: return &v.state case 1: @@ -3252,7 +2727,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowRunsRequest); i { + switch v := v.(*NodeExecution); i { case 0: return &v.state case 1: @@ -3264,7 +2739,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowRunsResponse); i { + switch v := v.(*GetNodeInfoRequest); i { case 0: return &v.state case 1: @@ -3276,7 +2751,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowRun); i { + switch v := v.(*GRPCTypeInfo); i { case 0: return &v.state case 1: @@ -3288,7 +2763,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeExecution); i { + switch v := v.(*GetNodeInfoResponse); i { case 0: return &v.state case 1: @@ -3300,7 +2775,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoRequest); i { + switch v := v.(*RuntimeData); i { case 0: return &v.state case 1: @@ -3312,7 +2787,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCTypeInfo); i { + switch v := v.(*GraphData); i { case 0: return &v.state case 1: @@ -3324,7 +2799,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNodeInfoResponse); i { + switch v := v.(*RunWorkflowRequest); i { case 0: return &v.state case 1: @@ -3336,7 +2811,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceRequest); i { + switch v := v.(*Data); i { case 0: return &v.state case 1: @@ -3348,7 +2823,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceResponse); i { + switch v := v.(*GetProjectRequest); i { case 0: return &v.state case 1: @@ -3360,7 +2835,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeData); i { + switch v := v.(*GetProjectResponse); i { case 0: return &v.state case 1: @@ -3372,7 +2847,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GraphData); i { + switch v := v.(*GetProjectsRequest); i { case 0: return &v.state case 1: @@ -3384,7 +2859,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunWorkflowRequest); i { + switch v := v.(*GetProjectsResponse); i { case 0: return &v.state case 1: @@ -3396,7 +2871,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Data); i { + switch v := v.(*CreateProjectRequest); i { case 0: return &v.state case 1: @@ -3408,7 +2883,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceRequest); i { + switch v := v.(*CreateProjectResponse); i { case 0: return &v.state case 1: @@ -3420,7 +2895,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceResponse); i { + switch v := v.(*DeleteProjectRequest); i { case 0: return &v.state case 1: @@ -3432,7 +2907,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProjectRequest); i { + switch v := v.(*DeleteProjectResponse); i { case 0: return &v.state case 1: @@ -3444,7 +2919,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProjectResponse); i { + switch v := v.(*GetProvidersRequest); i { case 0: return &v.state case 1: @@ -3456,7 +2931,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProjectsRequest); i { + switch v := v.(*EnumeratedProvider); i { case 0: return &v.state case 1: @@ -3468,7 +2943,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetProjectsResponse); i { + switch v := v.(*ProviderInfo); i { case 0: return &v.state case 1: @@ -3480,7 +2955,7 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProjectRequest); i { + switch v := v.(*GetProvidersResponse); i { case 0: return &v.state case 1: @@ -3492,90 +2967,6 @@ func file_project_proto_init() { } } file_project_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProjectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteProjectRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteProjectResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnumeratedResource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_project_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SaveProjectRequest); i { case 0: return &v.state @@ -3587,7 +2978,7 @@ func file_project_proto_init() { return nil } } - file_project_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_project_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SaveProjectResponse); i { case 0: return &v.state @@ -3605,8 +2996,8 @@ func file_project_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_project_proto_rawDesc, - NumEnums: 2, - NumMessages: 49, + NumEnums: 1, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/project_grpc.pb.go b/gen/project_grpc.pb.go index 89867da..ffadf02 100644 --- a/gen/project_grpc.pb.go +++ b/gen/project_grpc.pb.go @@ -32,10 +32,7 @@ type ProjectServiceClient interface { GetProjects(ctx context.Context, in *GetProjectsRequest, opts ...grpc.CallOption) (*GetProjectsResponse, error) CreateProject(ctx context.Context, in *CreateProjectRequest, opts ...grpc.CallOption) (*CreateProjectResponse, error) DeleteProject(ctx context.Context, in *DeleteProjectRequest, opts ...grpc.CallOption) (*DeleteProjectResponse, error) - UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*UpdateResourceResponse, error) - CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*CreateResourceResponse, error) - GetResources(ctx context.Context, in *GetResourcesRequest, opts ...grpc.CallOption) (*GetResourcesResponse, error) - DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) + EnumerateProviders(ctx context.Context, in *GetProvidersRequest, opts ...grpc.CallOption) (*GetProvidersResponse, error) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) SaveProject(ctx context.Context, in *SaveProjectRequest, opts ...grpc.CallOption) (*SaveProjectResponse, error) RunWorkflow(ctx context.Context, in *RunWorkflowRequest, opts ...grpc.CallOption) (ProjectService_RunWorkflowClient, error) @@ -146,36 +143,9 @@ func (c *projectServiceClient) DeleteProject(ctx context.Context, in *DeleteProj return out, nil } -func (c *projectServiceClient) UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*UpdateResourceResponse, error) { - out := new(UpdateResourceResponse) - err := c.cc.Invoke(ctx, "/project.ProjectService/UpdateResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectServiceClient) CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*CreateResourceResponse, error) { - out := new(CreateResourceResponse) - err := c.cc.Invoke(ctx, "/project.ProjectService/CreateResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectServiceClient) GetResources(ctx context.Context, in *GetResourcesRequest, opts ...grpc.CallOption) (*GetResourcesResponse, error) { - out := new(GetResourcesResponse) - err := c.cc.Invoke(ctx, "/project.ProjectService/GetResources", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *projectServiceClient) DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) { - out := new(DeleteResourceResponse) - err := c.cc.Invoke(ctx, "/project.ProjectService/DeleteResource", in, out, opts...) +func (c *projectServiceClient) EnumerateProviders(ctx context.Context, in *GetProvidersRequest, opts ...grpc.CallOption) (*GetProvidersResponse, error) { + out := new(GetProvidersResponse) + err := c.cc.Invoke(ctx, "/project.ProjectService/EnumerateProviders", in, out, opts...) if err != nil { return nil, err } @@ -264,10 +234,7 @@ type ProjectServiceServer interface { GetProjects(context.Context, *GetProjectsRequest) (*GetProjectsResponse, error) CreateProject(context.Context, *CreateProjectRequest) (*CreateProjectResponse, error) DeleteProject(context.Context, *DeleteProjectRequest) (*DeleteProjectResponse, error) - UpdateResource(context.Context, *UpdateResourceRequest) (*UpdateResourceResponse, error) - CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error) - GetResources(context.Context, *GetResourcesRequest) (*GetResourcesResponse, error) - DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) + EnumerateProviders(context.Context, *GetProvidersRequest) (*GetProvidersResponse, error) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) SaveProject(context.Context, *SaveProjectRequest) (*SaveProjectResponse, error) RunWorkflow(*RunWorkflowRequest, ProjectService_RunWorkflowServer) error @@ -303,17 +270,8 @@ func (UnimplementedProjectServiceServer) CreateProject(context.Context, *CreateP func (UnimplementedProjectServiceServer) DeleteProject(context.Context, *DeleteProjectRequest) (*DeleteProjectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteProject not implemented") } -func (UnimplementedProjectServiceServer) UpdateResource(context.Context, *UpdateResourceRequest) (*UpdateResourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateResource not implemented") -} -func (UnimplementedProjectServiceServer) CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateResource not implemented") -} -func (UnimplementedProjectServiceServer) GetResources(context.Context, *GetResourcesRequest) (*GetResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResources not implemented") -} -func (UnimplementedProjectServiceServer) DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteResource not implemented") +func (UnimplementedProjectServiceServer) EnumerateProviders(context.Context, *GetProvidersRequest) (*GetProvidersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnumerateProviders not implemented") } func (UnimplementedProjectServiceServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") @@ -489,74 +447,20 @@ func _ProjectService_DeleteProject_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _ProjectService_UpdateResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectServiceServer).UpdateResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/project.ProjectService/UpdateResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectServiceServer).UpdateResource(ctx, req.(*UpdateResourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProjectService_CreateResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateResourceRequest) +func _ProjectService_EnumerateProviders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProvidersRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ProjectServiceServer).CreateResource(ctx, in) + return srv.(ProjectServiceServer).EnumerateProviders(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/project.ProjectService/CreateResource", + FullMethod: "/project.ProjectService/EnumerateProviders", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectServiceServer).CreateResource(ctx, req.(*CreateResourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProjectService_GetResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectServiceServer).GetResources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/project.ProjectService/GetResources", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectServiceServer).GetResources(ctx, req.(*GetResourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProjectService_DeleteResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProjectServiceServer).DeleteResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/project.ProjectService/DeleteResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProjectServiceServer).DeleteResource(ctx, req.(*DeleteResourceRequest)) + return srv.(ProjectServiceServer).EnumerateProviders(ctx, req.(*GetProvidersRequest)) } return interceptor(ctx, in, info, handler) } @@ -690,20 +594,8 @@ var ProjectService_ServiceDesc = grpc.ServiceDesc{ Handler: _ProjectService_DeleteProject_Handler, }, { - MethodName: "UpdateResource", - Handler: _ProjectService_UpdateResource_Handler, - }, - { - MethodName: "CreateResource", - Handler: _ProjectService_CreateResource_Handler, - }, - { - MethodName: "GetResources", - Handler: _ProjectService_GetResources_Handler, - }, - { - MethodName: "DeleteResource", - Handler: _ProjectService_DeleteResource_Handler, + MethodName: "EnumerateProviders", + Handler: _ProjectService_EnumerateProviders_Handler, }, { MethodName: "GetNodeInfo", diff --git a/gen/reason/reason.pb.go b/gen/reason/reason.pb.go new file mode 100644 index 0000000..366c1e3 --- /dev/null +++ b/gen/reason/reason.pb.go @@ -0,0 +1,307 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: reason/reason.proto + +package reason + +import ( + 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 Prompt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Prompt string `protobuf:"bytes,1,opt,name=prompt,proto3" json:"prompt,omitempty"` +} + +func (x *Prompt) Reset() { + *x = Prompt{} + if protoimpl.UnsafeEnabled { + mi := &file_reason_reason_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Prompt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Prompt) ProtoMessage() {} + +func (x *Prompt) ProtoReflect() protoreflect.Message { + mi := &file_reason_reason_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 Prompt.ProtoReflect.Descriptor instead. +func (*Prompt) Descriptor() ([]byte, []int) { + return file_reason_reason_proto_rawDescGZIP(), []int{0} +} + +func (x *Prompt) GetPrompt() string { + if x != nil { + return x.Prompt + } + return "" +} + +type Engine struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Engine) Reset() { + *x = Engine{} + if protoimpl.UnsafeEnabled { + mi := &file_reason_reason_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Engine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Engine) ProtoMessage() {} + +func (x *Engine) ProtoReflect() protoreflect.Message { + mi := &file_reason_reason_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 Engine.ProtoReflect.Descriptor instead. +func (*Engine) Descriptor() ([]byte, []int) { + return file_reason_reason_proto_rawDescGZIP(), []int{1} +} + +type Reason struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Reason_Prompt + // *Reason_Engine + Type isReason_Type `protobuf_oneof:"type"` +} + +func (x *Reason) Reset() { + *x = Reason{} + if protoimpl.UnsafeEnabled { + mi := &file_reason_reason_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Reason) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Reason) ProtoMessage() {} + +func (x *Reason) ProtoReflect() protoreflect.Message { + mi := &file_reason_reason_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 Reason.ProtoReflect.Descriptor instead. +func (*Reason) Descriptor() ([]byte, []int) { + return file_reason_reason_proto_rawDescGZIP(), []int{2} +} + +func (m *Reason) GetType() isReason_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Reason) GetPrompt() *Prompt { + if x, ok := x.GetType().(*Reason_Prompt); ok { + return x.Prompt + } + return nil +} + +func (x *Reason) GetEngine() *Engine { + if x, ok := x.GetType().(*Reason_Engine); ok { + return x.Engine + } + return nil +} + +type isReason_Type interface { + isReason_Type() +} + +type Reason_Prompt struct { + Prompt *Prompt `protobuf:"bytes,1,opt,name=prompt,proto3,oneof"` +} + +type Reason_Engine struct { + Engine *Engine `protobuf:"bytes,2,opt,name=engine,proto3,oneof"` +} + +func (*Reason_Prompt) isReason_Type() {} + +func (*Reason_Engine) isReason_Type() {} + +var File_reason_reason_proto protoreflect.FileDescriptor + +var file_reason_reason_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x20, 0x0a, + 0x06, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x22, + 0x08, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x64, 0x0a, 0x06, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, + 0x6d, 0x70, 0x74, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x28, 0x0a, + 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, + 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, + 0x81, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x0b, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, + 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, + 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0xa2, 0x02, 0x03, + 0x52, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0xca, 0x02, 0x06, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0xe2, 0x02, 0x12, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_reason_reason_proto_rawDescOnce sync.Once + file_reason_reason_proto_rawDescData = file_reason_reason_proto_rawDesc +) + +func file_reason_reason_proto_rawDescGZIP() []byte { + file_reason_reason_proto_rawDescOnce.Do(func() { + file_reason_reason_proto_rawDescData = protoimpl.X.CompressGZIP(file_reason_reason_proto_rawDescData) + }) + return file_reason_reason_proto_rawDescData +} + +var file_reason_reason_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_reason_reason_proto_goTypes = []interface{}{ + (*Prompt)(nil), // 0: reason.Prompt + (*Engine)(nil), // 1: reason.Engine + (*Reason)(nil), // 2: reason.Reason +} +var file_reason_reason_proto_depIdxs = []int32{ + 0, // 0: reason.Reason.prompt:type_name -> reason.Prompt + 1, // 1: reason.Reason.engine:type_name -> reason.Engine + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_reason_reason_proto_init() } +func file_reason_reason_proto_init() { + if File_reason_reason_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_reason_reason_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Prompt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reason_reason_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Engine); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_reason_reason_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Reason); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_reason_reason_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Reason_Prompt)(nil), + (*Reason_Engine)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_reason_reason_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_reason_reason_proto_goTypes, + DependencyIndexes: file_reason_reason_proto_depIdxs, + MessageInfos: file_reason_reason_proto_msgTypes, + }.Build() + File_reason_reason_proto = out.File + file_reason_reason_proto_rawDesc = nil + file_reason_reason_proto_goTypes = nil + file_reason_reason_proto_depIdxs = nil +} diff --git a/gen/resource.pb.go b/gen/resource.pb.go deleted file mode 100644 index 0eb369e..0000000 --- a/gen/resource.pb.go +++ /dev/null @@ -1,1136 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: resource.proto - -package gen - -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 ( - // 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 Runtime int32 - -const ( - Runtime_NODEJS Runtime = 0 - Runtime_PYTHON Runtime = 1 - Runtime_GO Runtime = 2 -) - -// Enum value maps for Runtime. -var ( - Runtime_name = map[int32]string{ - 0: "NODEJS", - 1: "PYTHON", - 2: "GO", - } - Runtime_value = map[string]int32{ - "NODEJS": 0, - "PYTHON": 1, - "GO": 2, - } -) - -func (x Runtime) Enum() *Runtime { - p := new(Runtime) - *p = x - return p -} - -func (x Runtime) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Runtime) Descriptor() protoreflect.EnumDescriptor { - return file_resource_proto_enumTypes[0].Descriptor() -} - -func (Runtime) Type() protoreflect.EnumType { - return &file_resource_proto_enumTypes[0] -} - -func (x Runtime) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Runtime.Descriptor instead. -func (Runtime) EnumDescriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{0} -} - -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // dependencies are the ids of other resources - Dependencies []string `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` - // Types that are assignable to Type: - // - // *Resource_GrpcService - // *Resource_RestService - // *Resource_DocStore - // *Resource_FileStore - // *Resource_LanguageService - // *Resource_ConfigProvider - // *Resource_SecretStore - // *Resource_ReasoningEngine - // *Resource_HttpRouter - // *Resource_TemplateService - Type isResource_Type `protobuf_oneof:"type"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{0} -} - -func (x *Resource) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Resource) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Resource) GetDependencies() []string { - if x != nil { - return x.Dependencies - } - return nil -} - -func (m *Resource) GetType() isResource_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Resource) GetGrpcService() *GRPCService { - if x, ok := x.GetType().(*Resource_GrpcService); ok { - return x.GrpcService - } - return nil -} - -func (x *Resource) GetRestService() *RESTService { - if x, ok := x.GetType().(*Resource_RestService); ok { - return x.RestService - } - return nil -} - -func (x *Resource) GetDocStore() *DocStore { - if x, ok := x.GetType().(*Resource_DocStore); ok { - return x.DocStore - } - return nil -} - -func (x *Resource) GetFileStore() *FileStore { - if x, ok := x.GetType().(*Resource_FileStore); ok { - return x.FileStore - } - return nil -} - -func (x *Resource) GetLanguageService() *LanguageService { - if x, ok := x.GetType().(*Resource_LanguageService); ok { - return x.LanguageService - } - return nil -} - -func (x *Resource) GetConfigProvider() *ConfigProvider { - if x, ok := x.GetType().(*Resource_ConfigProvider); ok { - return x.ConfigProvider - } - return nil -} - -func (x *Resource) GetSecretStore() *SecretStore { - if x, ok := x.GetType().(*Resource_SecretStore); ok { - return x.SecretStore - } - return nil -} - -func (x *Resource) GetReasoningEngine() *ReasoningEngine { - if x, ok := x.GetType().(*Resource_ReasoningEngine); ok { - return x.ReasoningEngine - } - return nil -} - -func (x *Resource) GetHttpRouter() *HTTPRouter { - if x, ok := x.GetType().(*Resource_HttpRouter); ok { - return x.HttpRouter - } - return nil -} - -func (x *Resource) GetTemplateService() *TemplateService { - if x, ok := x.GetType().(*Resource_TemplateService); ok { - return x.TemplateService - } - return nil -} - -type isResource_Type interface { - isResource_Type() -} - -type Resource_GrpcService struct { - GrpcService *GRPCService `protobuf:"bytes,4,opt,name=grpc_service,json=grpcService,proto3,oneof"` -} - -type Resource_RestService struct { - RestService *RESTService `protobuf:"bytes,5,opt,name=rest_service,json=restService,proto3,oneof"` -} - -type Resource_DocStore struct { - DocStore *DocStore `protobuf:"bytes,6,opt,name=doc_store,json=docStore,proto3,oneof"` -} - -type Resource_FileStore struct { - FileStore *FileStore `protobuf:"bytes,7,opt,name=file_store,json=fileStore,proto3,oneof"` -} - -type Resource_LanguageService struct { - LanguageService *LanguageService `protobuf:"bytes,8,opt,name=language_service,json=languageService,proto3,oneof"` -} - -type Resource_ConfigProvider struct { - ConfigProvider *ConfigProvider `protobuf:"bytes,9,opt,name=config_provider,json=configProvider,proto3,oneof"` -} - -type Resource_SecretStore struct { - SecretStore *SecretStore `protobuf:"bytes,10,opt,name=secret_store,json=secretStore,proto3,oneof"` -} - -type Resource_ReasoningEngine struct { - ReasoningEngine *ReasoningEngine `protobuf:"bytes,11,opt,name=reasoning_engine,json=reasoningEngine,proto3,oneof"` -} - -type Resource_HttpRouter struct { - HttpRouter *HTTPRouter `protobuf:"bytes,12,opt,name=http_router,json=httpRouter,proto3,oneof"` -} - -type Resource_TemplateService struct { - TemplateService *TemplateService `protobuf:"bytes,13,opt,name=template_service,json=templateService,proto3,oneof"` -} - -func (*Resource_GrpcService) isResource_Type() {} - -func (*Resource_RestService) isResource_Type() {} - -func (*Resource_DocStore) isResource_Type() {} - -func (*Resource_FileStore) isResource_Type() {} - -func (*Resource_LanguageService) isResource_Type() {} - -func (*Resource_ConfigProvider) isResource_Type() {} - -func (*Resource_SecretStore) isResource_Type() {} - -func (*Resource_ReasoningEngine) isResource_Type() {} - -func (*Resource_HttpRouter) isResource_Type() {} - -func (*Resource_TemplateService) isResource_Type() {} - -type TemplateService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TemplateService) Reset() { - *x = TemplateService{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TemplateService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TemplateService) ProtoMessage() {} - -func (x *TemplateService) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 TemplateService.ProtoReflect.Descriptor instead. -func (*TemplateService) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{1} -} - -type HTTPRouter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Root string `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` -} - -func (x *HTTPRouter) Reset() { - *x = HTTPRouter{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HTTPRouter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HTTPRouter) ProtoMessage() {} - -func (x *HTTPRouter) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 HTTPRouter.ProtoReflect.Descriptor instead. -func (*HTTPRouter) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{2} -} - -func (x *HTTPRouter) GetRoot() string { - if x != nil { - return x.Root - } - return "" -} - -type ReasoningEngine struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ReasoningEngine) Reset() { - *x = ReasoningEngine{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReasoningEngine) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReasoningEngine) ProtoMessage() {} - -func (x *ReasoningEngine) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 ReasoningEngine.ProtoReflect.Descriptor instead. -func (*ReasoningEngine) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{3} -} - -type SecretStore struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *SecretStore) Reset() { - *x = SecretStore{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretStore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretStore) ProtoMessage() {} - -func (x *SecretStore) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 SecretStore.ProtoReflect.Descriptor instead. -func (*SecretStore) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{4} -} - -func (x *SecretStore) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type ConfigProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ConfigProvider) Reset() { - *x = ConfigProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConfigProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigProvider) ProtoMessage() {} - -func (x *ConfigProvider) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 ConfigProvider.ProtoReflect.Descriptor instead. -func (*ConfigProvider) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{5} -} - -type CodeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - ContainerURI string `protobuf:"bytes,2,opt,name=containerURI,proto3" json:"containerURI,omitempty"` -} - -func (x *CodeConfig) Reset() { - *x = CodeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CodeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CodeConfig) ProtoMessage() {} - -func (x *CodeConfig) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 CodeConfig.ProtoReflect.Descriptor instead. -func (*CodeConfig) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{6} -} - -func (x *CodeConfig) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *CodeConfig) GetContainerURI() string { - if x != nil { - return x.ContainerURI - } - return "" -} - -type LanguageService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Runtime Runtime `protobuf:"varint,1,opt,name=runtime,proto3,enum=resource.Runtime" json:"runtime,omitempty"` - Grpc *GRPCService `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"` - CodeConfig *CodeConfig `protobuf:"bytes,3,opt,name=code_config,json=codeConfig,proto3" json:"code_config,omitempty"` -} - -func (x *LanguageService) Reset() { - *x = LanguageService{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LanguageService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LanguageService) ProtoMessage() {} - -func (x *LanguageService) ProtoReflect() protoreflect.Message { - mi := &file_resource_proto_msgTypes[7] - 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 LanguageService.ProtoReflect.Descriptor instead. -func (*LanguageService) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{7} -} - -func (x *LanguageService) GetRuntime() Runtime { - if x != nil { - return x.Runtime - } - return Runtime_NODEJS -} - -func (x *LanguageService) GetGrpc() *GRPCService { - if x != nil { - return x.Grpc - } - return nil -} - -func (x *LanguageService) GetCodeConfig() *CodeConfig { - if x != nil { - return x.CodeConfig - } - return nil -} - -type GRPCService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` -} - -func (x *GRPCService) Reset() { - *x = GRPCService{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GRPCService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GRPCService) ProtoMessage() {} - -func (x *GRPCService) ProtoReflect() protoreflect.Message { - mi := &file_resource_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 GRPCService.ProtoReflect.Descriptor instead. -func (*GRPCService) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{8} -} - -func (x *GRPCService) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -type RESTService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"` -} - -func (x *RESTService) Reset() { - *x = RESTService{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RESTService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RESTService) ProtoMessage() {} - -func (x *RESTService) ProtoReflect() protoreflect.Message { - mi := &file_resource_proto_msgTypes[9] - 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 RESTService.ProtoReflect.Descriptor instead. -func (*RESTService) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{9} -} - -func (x *RESTService) GetBaseUrl() string { - if x != nil { - return x.BaseUrl - } - return "" -} - -type DocStore struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *DocStore) Reset() { - *x = DocStore{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DocStore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DocStore) ProtoMessage() {} - -func (x *DocStore) ProtoReflect() protoreflect.Message { - mi := &file_resource_proto_msgTypes[10] - 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 DocStore.ProtoReflect.Descriptor instead. -func (*DocStore) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{10} -} - -func (x *DocStore) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type FileStore struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *FileStore) Reset() { - *x = FileStore{} - if protoimpl.UnsafeEnabled { - mi := &file_resource_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileStore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileStore) ProtoMessage() {} - -func (x *FileStore) ProtoReflect() protoreflect.Message { - mi := &file_resource_proto_msgTypes[11] - 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 FileStore.ProtoReflect.Descriptor instead. -func (*FileStore) Descriptor() ([]byte, []int) { - return file_resource_proto_rawDescGZIP(), []int{11} -} - -func (x *FileStore) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -var File_resource_proto protoreflect.FileDescriptor - -var file_resource_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x05, 0x0a, 0x08, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x3a, - 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x47, 0x52, 0x50, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x67, - 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x72, 0x65, - 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x45, 0x53, 0x54, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x5f, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x48, 0x00, 0x52, - 0x08, 0x64, 0x6f, 0x63, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x66, 0x69, 0x6c, - 0x65, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x48, 0x00, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, - 0x46, 0x0a, 0x10, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0c, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, - 0x0f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x12, 0x37, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x68, - 0x74, 0x74, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x00, - 0x52, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x0a, 0x0a, - 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x11, - 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, - 0x65, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x22, 0x44, 0x0a, 0x0a, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x55, 0x52, 0x49, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x55, 0x52, 0x49, 0x22, 0xa0, 0x01, 0x0a, 0x0f, 0x4c, - 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, - 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x11, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x67, - 0x72, 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x35, 0x0a, 0x0b, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x21, 0x0a, - 0x0b, 0x47, 0x52, 0x50, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, - 0x22, 0x28, 0x0a, 0x0b, 0x52, 0x45, 0x53, 0x54, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x1c, 0x0a, 0x08, 0x44, 0x6f, - 0x63, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x1d, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, - 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x2a, 0x29, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x44, 0x45, 0x4a, 0x53, 0x10, 0x00, 0x12, 0x0a, - 0x0a, 0x06, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x4f, - 0x10, 0x02, 0x42, 0x86, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0xa2, 0x02, 0x03, - 0x52, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xca, 0x02, - 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xe2, 0x02, 0x14, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_resource_proto_rawDescOnce sync.Once - file_resource_proto_rawDescData = file_resource_proto_rawDesc -) - -func file_resource_proto_rawDescGZIP() []byte { - file_resource_proto_rawDescOnce.Do(func() { - file_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_resource_proto_rawDescData) - }) - return file_resource_proto_rawDescData -} - -var file_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_resource_proto_goTypes = []interface{}{ - (Runtime)(0), // 0: resource.Runtime - (*Resource)(nil), // 1: resource.Resource - (*TemplateService)(nil), // 2: resource.TemplateService - (*HTTPRouter)(nil), // 3: resource.HTTPRouter - (*ReasoningEngine)(nil), // 4: resource.ReasoningEngine - (*SecretStore)(nil), // 5: resource.SecretStore - (*ConfigProvider)(nil), // 6: resource.ConfigProvider - (*CodeConfig)(nil), // 7: resource.CodeConfig - (*LanguageService)(nil), // 8: resource.LanguageService - (*GRPCService)(nil), // 9: resource.GRPCService - (*RESTService)(nil), // 10: resource.RESTService - (*DocStore)(nil), // 11: resource.DocStore - (*FileStore)(nil), // 12: resource.FileStore -} -var file_resource_proto_depIdxs = []int32{ - 9, // 0: resource.Resource.grpc_service:type_name -> resource.GRPCService - 10, // 1: resource.Resource.rest_service:type_name -> resource.RESTService - 11, // 2: resource.Resource.doc_store:type_name -> resource.DocStore - 12, // 3: resource.Resource.file_store:type_name -> resource.FileStore - 8, // 4: resource.Resource.language_service:type_name -> resource.LanguageService - 6, // 5: resource.Resource.config_provider:type_name -> resource.ConfigProvider - 5, // 6: resource.Resource.secret_store:type_name -> resource.SecretStore - 4, // 7: resource.Resource.reasoning_engine:type_name -> resource.ReasoningEngine - 3, // 8: resource.Resource.http_router:type_name -> resource.HTTPRouter - 2, // 9: resource.Resource.template_service:type_name -> resource.TemplateService - 0, // 10: resource.LanguageService.runtime:type_name -> resource.Runtime - 9, // 11: resource.LanguageService.grpc:type_name -> resource.GRPCService - 7, // 12: resource.LanguageService.code_config:type_name -> resource.CodeConfig - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_resource_proto_init() } -func file_resource_proto_init() { - if File_resource_proto != nil { - return - } - file_block_proto_init() - if !protoimpl.UnsafeEnabled { - file_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TemplateService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRouter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReasoningEngine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CodeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LanguageService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GRPCService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RESTService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DocStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_resource_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileStore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_resource_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Resource_GrpcService)(nil), - (*Resource_RestService)(nil), - (*Resource_DocStore)(nil), - (*Resource_FileStore)(nil), - (*Resource_LanguageService)(nil), - (*Resource_ConfigProvider)(nil), - (*Resource_SecretStore)(nil), - (*Resource_ReasoningEngine)(nil), - (*Resource_HttpRouter)(nil), - (*Resource_TemplateService)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_resource_proto_rawDesc, - NumEnums: 1, - NumMessages: 12, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_resource_proto_goTypes, - DependencyIndexes: file_resource_proto_depIdxs, - EnumInfos: file_resource_proto_enumTypes, - MessageInfos: file_resource_proto_msgTypes, - }.Build() - File_resource_proto = out.File - file_resource_proto_rawDesc = nil - file_resource_proto_goTypes = nil - file_resource_proto_depIdxs = nil -} diff --git a/gen/storage/storage.pb.go b/gen/storage/storage.pb.go new file mode 100644 index 0000000..9937935 --- /dev/null +++ b/gen/storage/storage.pb.go @@ -0,0 +1,568 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: storage/storage.proto + +package storage + +import ( + 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 Collection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Collection) Reset() { + *x = Collection{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Collection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Collection) ProtoMessage() {} + +func (x *Collection) ProtoReflect() protoreflect.Message { + mi := &file_storage_storage_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 Collection.ProtoReflect.Descriptor instead. +func (*Collection) Descriptor() ([]byte, []int) { + return file_storage_storage_proto_rawDescGZIP(), []int{0} +} + +func (x *Collection) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type Query struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *Query) Reset() { + *x = Query{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Query) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Query) ProtoMessage() {} + +func (x *Query) ProtoReflect() protoreflect.Message { + mi := &file_storage_storage_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 Query.ProtoReflect.Descriptor instead. +func (*Query) Descriptor() ([]byte, []int) { + return file_storage_storage_proto_rawDescGZIP(), []int{1} +} + +func (x *Query) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type Document struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Document_Collection + // *Document_Query + Type isDocument_Type `protobuf_oneof:"type"` +} + +func (x *Document) Reset() { + *x = Document{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +func (x *Document) ProtoReflect() protoreflect.Message { + mi := &file_storage_storage_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 Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_storage_storage_proto_rawDescGZIP(), []int{2} +} + +func (m *Document) GetType() isDocument_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Document) GetCollection() *Collection { + if x, ok := x.GetType().(*Document_Collection); ok { + return x.Collection + } + return nil +} + +func (x *Document) GetQuery() *Query { + if x, ok := x.GetType().(*Document_Query); ok { + return x.Query + } + return nil +} + +type isDocument_Type interface { + isDocument_Type() +} + +type Document_Collection struct { + Collection *Collection `protobuf:"bytes,1,opt,name=collection,proto3,oneof"` +} + +type Document_Query struct { + Query *Query `protobuf:"bytes,2,opt,name=query,proto3,oneof"` +} + +func (*Document_Collection) isDocument_Type() {} + +func (*Document_Query) isDocument_Type() {} + +type Folder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Folder) Reset() { + *x = Folder{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Folder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Folder) ProtoMessage() {} + +func (x *Folder) ProtoReflect() protoreflect.Message { + mi := &file_storage_storage_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 Folder.ProtoReflect.Descriptor instead. +func (*Folder) Descriptor() ([]byte, []int) { + return file_storage_storage_proto_rawDescGZIP(), []int{3} +} + +func (x *Folder) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type File struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *File) Reset() { + *x = File{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *File) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*File) ProtoMessage() {} + +func (x *File) ProtoReflect() protoreflect.Message { + mi := &file_storage_storage_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 File.ProtoReflect.Descriptor instead. +func (*File) Descriptor() ([]byte, []int) { + return file_storage_storage_proto_rawDescGZIP(), []int{4} +} + +func (x *File) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type Storage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *Storage_Document + // *Storage_Folder + // *Storage_File + Type isStorage_Type `protobuf_oneof:"type"` +} + +func (x *Storage) Reset() { + *x = Storage{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Storage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Storage) ProtoMessage() {} + +func (x *Storage) ProtoReflect() protoreflect.Message { + mi := &file_storage_storage_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 Storage.ProtoReflect.Descriptor instead. +func (*Storage) Descriptor() ([]byte, []int) { + return file_storage_storage_proto_rawDescGZIP(), []int{5} +} + +func (m *Storage) GetType() isStorage_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Storage) GetDocument() *Document { + if x, ok := x.GetType().(*Storage_Document); ok { + return x.Document + } + return nil +} + +func (x *Storage) GetFolder() *Folder { + if x, ok := x.GetType().(*Storage_Folder); ok { + return x.Folder + } + return nil +} + +func (x *Storage) GetFile() *File { + if x, ok := x.GetType().(*Storage_File); ok { + return x.File + } + return nil +} + +type isStorage_Type interface { + isStorage_Type() +} + +type Storage_Document struct { + Document *Document `protobuf:"bytes,1,opt,name=document,proto3,oneof"` +} + +type Storage_Folder struct { + Folder *Folder `protobuf:"bytes,2,opt,name=folder,proto3,oneof"` +} + +type Storage_File struct { + File *File `protobuf:"bytes,3,opt,name=file,proto3,oneof"` +} + +func (*Storage_Document) isStorage_Type() {} + +func (*Storage_Folder) isStorage_Type() {} + +func (*Storage_File) isStorage_Type() {} + +var File_storage_storage_proto protoreflect.FileDescriptor + +var file_storage_storage_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x22, 0x20, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x22, 0x71, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, + 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x06, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x22, 0x1a, 0x0a, 0x06, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, + 0x22, 0x1a, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x92, 0x01, 0x0a, + 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x66, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x66, 0x6f, + 0x6c, 0x64, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x42, 0x88, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x42, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0xca, 0x02, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0xe2, 0x02, 0x13, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_storage_storage_proto_rawDescOnce sync.Once + file_storage_storage_proto_rawDescData = file_storage_storage_proto_rawDesc +) + +func file_storage_storage_proto_rawDescGZIP() []byte { + file_storage_storage_proto_rawDescOnce.Do(func() { + file_storage_storage_proto_rawDescData = protoimpl.X.CompressGZIP(file_storage_storage_proto_rawDescData) + }) + return file_storage_storage_proto_rawDescData +} + +var file_storage_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_storage_storage_proto_goTypes = []interface{}{ + (*Collection)(nil), // 0: storage.Collection + (*Query)(nil), // 1: storage.Query + (*Document)(nil), // 2: storage.Document + (*Folder)(nil), // 3: storage.Folder + (*File)(nil), // 4: storage.File + (*Storage)(nil), // 5: storage.Storage +} +var file_storage_storage_proto_depIdxs = []int32{ + 0, // 0: storage.Document.collection:type_name -> storage.Collection + 1, // 1: storage.Document.query:type_name -> storage.Query + 2, // 2: storage.Storage.document:type_name -> storage.Document + 3, // 3: storage.Storage.folder:type_name -> storage.Folder + 4, // 4: storage.Storage.file:type_name -> storage.File + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_storage_storage_proto_init() } +func file_storage_storage_proto_init() { + if File_storage_storage_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_storage_storage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Collection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_storage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Query); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_storage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_storage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Folder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_storage_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*File); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_storage_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Storage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_storage_storage_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Document_Collection)(nil), + (*Document_Query)(nil), + } + file_storage_storage_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*Storage_Document)(nil), + (*Storage_Folder)(nil), + (*Storage_File)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_storage_storage_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_storage_storage_proto_goTypes, + DependencyIndexes: file_storage_storage_proto_depIdxs, + MessageInfos: file_storage_storage_proto_msgTypes, + }.Build() + File_storage_storage_proto = out.File + file_storage_storage_proto_rawDesc = nil + file_storage_storage_proto_goTypes = nil + file_storage_storage_proto_depIdxs = nil +} diff --git a/pkg/api/http.go b/pkg/api/http.go index 1009909..d5ac1a2 100644 --- a/pkg/api/http.go +++ b/pkg/api/http.go @@ -6,9 +6,9 @@ import ( "github.com/bufbuild/connect-go" "github.com/google/wire" "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" + phttp "github.com/protoflow-labs/protoflow/gen/http" + nhttp "github.com/protoflow-labs/protoflow/pkg/node/http" "github.com/protoflow-labs/protoflow/pkg/util/rx" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/protoflow-labs/protoflow/studio/public" "github.com/rs/zerolog/log" "io" @@ -51,12 +51,12 @@ func NewLogInterceptor() connect.UnaryInterceptorFunc { return interceptor } -func ParseHttpRequest(r *http.Request) (*gen.HttpRequest, error) { - var req gen.HttpRequest - h := make([]*gen.Header, 0) +func ParseHttpRequest(r *http.Request) (*phttp.Request, error) { + var req phttp.Request + h := make([]*phttp.Header, 0) for name, headers := range r.Header { for _, hValue := range headers { - h = append(h, &gen.Header{Name: name, Value: hValue}) + h = append(h, &phttp.Header{Name: name, Value: hValue}) } } req.Method = r.Method @@ -115,7 +115,7 @@ func NewHTTPServer( } proxy := httputil.NewSingleHostReverseProxy(u) - httpStream := resource.NewHTTPEventStream() + httpStream := nhttp.NewHTTPEventStream() mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { diff --git a/pkg/generate/generate.go b/pkg/generate/generate.go index 1e27668..79efa3b 100644 --- a/pkg/generate/generate.go +++ b/pkg/generate/generate.go @@ -2,11 +2,11 @@ package generate import ( "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" + pcode "github.com/protoflow-labs/protoflow/gen/code" "github.com/protoflow-labs/protoflow/pkg/bucket" + "github.com/protoflow-labs/protoflow/pkg/node/code" "github.com/protoflow-labs/protoflow/pkg/project" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/rs/zerolog/log" "os" "path" @@ -47,13 +47,14 @@ func NewGenerate(config Config) (*Generate, error) { } func (s *Generate) GenerateImplementation(project *project.Project, n graph.Node) error { - r, ok := project.Workflow.Resources[n.ResourceID()] - if !ok || r == nil { - return errors.Errorf("resource %s not found", n.ResourceID()) + r, err := n.Provider() + if err != nil { + return errors.Wrapf(err, "error getting node provider") } + switch r := r.(type) { - case *resource.LanguageServiceResource: - if r.Runtime == gen.Runtime_NODEJS { + case *code.Server: + if r.Runtime == pcode.Runtime_NODEJS { jsManager, err := NewNodeJSManager(s.bucket) if err != nil { return errors.Wrap(err, "error creating nodejs manager") @@ -78,14 +79,14 @@ func (s *Generate) InferNodeType(project *project.Project, n graph.Node) error { return errors.Wrapf(err, "error getting node info") } - r, ok := project.Workflow.Resources[n.ResourceID()] - if !ok || r == nil { - return errors.Errorf("resource %s not found", n.ResourceID()) + r, err := n.Provider() + if err != nil { + return errors.Wrapf(err, "error getting node provider") } switch r := r.(type) { - case *resource.LanguageServiceResource: + case *code.Server: switch r.Runtime { - case gen.Runtime_NODEJS: + case pcode.Runtime_NODEJS: jsManager, err := NewNodeJSManager(s.bucket) if err != nil { return errors.Wrap(err, "error creating nodejs manager") @@ -101,20 +102,20 @@ func (s *Generate) InferNodeType(project *project.Project, n graph.Node) error { } func (s *Generate) Generate(project *project.Project) error { - for _, r := range project.Workflow.Resources { + for _, r := range project.Workflow.NodeLookup { if r == nil { log.Error().Msg("resource is nil") continue } switch r := r.(type) { - case *resource.LanguageServiceResource: - if r.Runtime == gen.Runtime_NODEJS { + case *code.Server: + if r.Runtime == pcode.Runtime_NODEJS { jsManager, err := NewNodeJSManager(s.bucket) if err != nil { return errors.Wrap(err, "error creating nodejs manager") } - for _, n := range r.Nodes() { + for _, n := range r.Successors() { info, err := project.Workflow.GetNodeInfo(n) if err != nil { return errors.Wrapf(err, "error getting node info") diff --git a/pkg/generate/golang.go b/pkg/generate/golang.go index 47f7cc9..16a088b 100644 --- a/pkg/generate/golang.go +++ b/pkg/generate/golang.go @@ -3,14 +3,14 @@ package generate import ( "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/pkg/bucket" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" + "github.com/protoflow-labs/protoflow/pkg/node/code" ) type GoManager struct { codeRoot bucket.Bucket } -func (g GoManager) GenerateGRPCService(r *resource.LanguageServiceResource) error { +func (g GoManager) GenerateGRPCService(r *code.Server) error { //TODO implement me panic("implement me") } diff --git a/pkg/generate/nodejs.go b/pkg/generate/nodejs.go index 929cb27..33054a8 100644 --- a/pkg/generate/nodejs.go +++ b/pkg/generate/nodejs.go @@ -5,16 +5,15 @@ import ( "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/pkg/bucket" "github.com/protoflow-labs/protoflow/pkg/grpc" + "github.com/protoflow-labs/protoflow/pkg/node/code" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/node" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/protoflow-labs/protoflow/templates" "path" "strings" ) type LanguageManager interface { - GenerateGRPCService(r *resource.LanguageServiceResource) error + GenerateGRPCService(r *code.Server) error } type NodeJSManager struct { @@ -38,7 +37,7 @@ type Method struct { } type FunctionTemplate struct { - Node *node.FunctionNode + Node *code.FunctionNode } type ServiceTemplate struct { @@ -46,7 +45,7 @@ type ServiceTemplate struct { Methods []Method } -func (s *NodeJSManager) GenerateGRPCService(r *resource.LanguageServiceResource) error { +func (s *NodeJSManager) GenerateGRPCService(r *code.Server) error { var err error tmpl, err := s.generateServiceTemplate(r) @@ -90,9 +89,9 @@ func (s *NodeJSManager) UpdateNodeType(n graph.Node, nodeInfo *graph.Info) error return nil } -func (s *NodeJSManager) GenerateFunctionImpl(r *resource.LanguageServiceResource, n graph.Node) error { +func (s *NodeJSManager) GenerateFunctionImpl(r *code.Server, n graph.Node) error { switch n.(type) { - case *node.FunctionNode: + case *code.FunctionNode: // create function directory funcDir := path.Join("functions", n.NormalizedName()) funcDirPath, err := s.codeRoot.GetFolder(funcDir) @@ -112,14 +111,14 @@ func (s *NodeJSManager) GenerateFunctionImpl(r *resource.LanguageServiceResource return nil } -func (s *NodeJSManager) generateServiceTemplate(r *resource.LanguageServiceResource) (*ServiceTemplate, error) { +func (s *NodeJSManager) generateServiceTemplate(r *code.Server) (*ServiceTemplate, error) { tmpl := &ServiceTemplate{ Runtime: strings.ToLower(r.Runtime.String()), Methods: []Method{}, } - for _, resNode := range r.Nodes() { + for _, resNode := range r.Successors() { switch n := resNode.(type) { - case *node.FunctionNode: + case *code.FunctionNode: method := Method{ Name: n.NormalizedName(), diff --git a/pkg/grpc/blocks.go b/pkg/grpc/blocks.go index 0176bb7..8120a2f 100644 --- a/pkg/grpc/blocks.go +++ b/pkg/grpc/blocks.go @@ -7,6 +7,8 @@ import ( "github.com/jhump/protoreflect/desc/builder" "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/gen/code" + pgrpc "github.com/protoflow-labs/protoflow/gen/grpc" "github.com/rs/zerolog/log" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -14,14 +16,14 @@ import ( "google.golang.org/protobuf/types/descriptorpb" ) -func EnumerateResourceBlocks(service *gen.GRPCService, isLangService bool) ([]*gen.Node, error) { - if service.Host == "" { +func EnumerateResourceBlocks(server *pgrpc.Server, isLangService bool) ([]*gen.Node, error) { + if server.Host == "" { return nil, errors.New("host is required") } - conn, err := grpc.Dial(service.Host, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.Dial(server.Host, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - return nil, errors.Wrapf(err, "unable to connect to python server at %s", service.Host) + return nil, errors.Wrapf(err, "unable to connect to python server at %s", server.Host) } // TODO breadchris there is some repeat code, the grpc package has some code from Buf that does reflection already @@ -30,14 +32,14 @@ func EnumerateResourceBlocks(service *gen.GRPCService, isLangService bool) ([]*g return nil, errors.Wrapf(err, "unable to get all methods via reflection") } - log.Debug().Str("service", service.Host).Msgf("found %d methods", len(methodDesc)) + log.Debug().Str("server", server.Host).Msgf("found %d methods", len(methodDesc)) var blocks []*gen.Node for _, m := range methodDesc { serviceName := m.GetService().GetName() methodName := m.GetName() - grpcInfo := &gen.GRPC{ + grpcInfo := &pgrpc.Method{ Package: m.GetFile().GetPackage(), Service: serviceName, Method: methodName, @@ -46,13 +48,21 @@ func EnumerateResourceBlocks(service *gen.GRPCService, isLangService bool) ([]*g block := &gen.Node{ Id: uuid.New().String(), Name: methodName, - Config: &gen.Node_Grpc{ - Grpc: grpcInfo, + Type: &gen.Node_Grpc{ + Grpc: &pgrpc.GRPC{ + Type: &pgrpc.GRPC_Method{ + Method: grpcInfo, + }, + }, }, } if isLangService { - block.Config = &gen.Node_Function{ - Function: &gen.Function{}, + block.Type = &gen.Node_Code{ + Code: &code.Code{ + Type: &code.Code_Function{ + Function: &code.Function{}, + }, + }, } } blocks = append(blocks, block) diff --git a/pkg/node/base/node.go b/pkg/node/base/node.go new file mode 100644 index 0000000..2beb80e --- /dev/null +++ b/pkg/node/base/node.go @@ -0,0 +1,77 @@ +package base + +import ( + "github.com/pkg/errors" + "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/pkg/util" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" + "github.com/rs/zerolog/log" + "strings" +) + +type Node struct { + Name string + id string + + predecessors []graph.Node + successors []graph.Node +} + +// NewNode creates a new Node from a gen.Node, gen.Node cannot be embedded into Node because proto deserialization will fail on the type +func NewNode(node *gen.Node) *Node { + return &Node{ + Name: util.ToTitleCase(node.Name), + id: node.Id, + } +} + +func (n *Node) NormalizedName() string { + name := util.ToTitleCase(n.Name) + if strings.Contains(name, ".") { + name = strings.Split(name, ".")[1] + } + return name +} + +func (n *Node) ID() string { + return n.id +} + +func (n *Node) Info() (*graph.Info, error) { + log.Warn(). + Str("node", n.Name). + Msg("Info() not implemented") + return nil, nil +} + +func (n *Node) Represent() (string, error) { + return "", errors.New("not implemented") +} + +func (n *Node) Init() (func(), error) { + return func() {}, nil +} + +func (n *Node) AddPredecessor(node graph.Node) { + n.predecessors = append(n.predecessors, node) +} + +func (n *Node) AddSuccessor(node graph.Node) { + n.successors = append(n.successors, node) +} + +func (n *Node) Predecessors() []graph.Node { + return n.predecessors +} + +func (n *Node) Successors() []graph.Node { + return n.successors +} + +// TODO breadchris this should be more robust and take into consideration type types of edges into the node +func (n *Node) Provider() (graph.Node, error) { + if len(n.predecessors) == 0 { + return nil, errors.New("no provider") + } + return n.predecessors[0], nil +} diff --git a/pkg/node/code/function.go b/pkg/node/code/function.go new file mode 100644 index 0000000..7a7862c --- /dev/null +++ b/pkg/node/code/function.go @@ -0,0 +1,168 @@ +package code + +import ( + "context" + "fmt" + "github.com/pkg/errors" + "github.com/protoflow-labs/protoflow/gen/code" + pgrpc "github.com/protoflow-labs/protoflow/gen/grpc" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/node/grpc" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" + "github.com/reactivex/rxgo/v2" + "github.com/rs/zerolog/log" + "net" + "net/url" + "strings" + "time" +) + +type FunctionNode struct { + *base.Node + *code.Function + inMemory bool + f graph.IOFunc +} + +var _ graph.Node = &FunctionNode{} + +type FunctionNodeOption func(*FunctionNode) *FunctionNode + +func InMemoryObserver(name string) graph.IOFunc { + return func(ctx context.Context, input graph.Input) (graph.Output, error) { + output := make(chan rxgo.Item) + input.Observable.ForEach(func(item any) { + log.Info(). + Str("name", name). + Interface("item", item). + Msg("observing item") + output <- rxgo.Of(item) + close(output) + }, func(err error) { + log.Info().Str("name", name).Err(err).Msg("err") + }, func() { + log.Info().Str("name", name).Msg("complete") + }) + return graph.Output{ + Observable: rxgo.FromChannel(output), + }, nil + } +} + +func WithFunction(f graph.IOFunc) FunctionNodeOption { + return func(n *FunctionNode) *FunctionNode { + n.inMemory = true + n.f = f + return n + } +} + +func NewFunctionNode(b *base.Node, node *code.Function, ops ...FunctionNodeOption) *FunctionNode { + f := &FunctionNode{ + Node: b, + Function: node, + } + for _, op := range ops { + f = op(f) + } + return f +} + +func (n *FunctionNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + log.Debug(). + Str("name", n.NormalizedName()). + Msg("setting up function") + + if n.inMemory { + return n.f(ctx, input) + } + + p, err := n.Provider() + if err != nil { + return graph.Output{}, err + } + + g, ok := p.(*Server) + if !ok { + return graph.Output{}, fmt.Errorf("error getting language service resource: %s", n.Name) + } + + grpcNode := n.ToGRPC(g) + return grpcNode.Wire(ctx, input) +} + +func (n *FunctionNode) Info() (*graph.Info, error) { + p, err := n.Provider() + if err != nil { + return nil, err + } + ls, ok := p.(*Server) + if ok { + return nil, errors.New("language service resource is not supported") + } + grpcNode := n.ToGRPC(ls) + // TODO breadchris we should know where the function node is located and should read/write from the proto + return grpcNode.Info() +} + +func (n *FunctionNode) ToGRPC(r *Server) *grpc.Method { + serviceName := strings.ToLower(r.Runtime.String()) + "Service" + return grpc.NewMethod(n.Node, &pgrpc.Method{ + Package: "protoflow", + Service: serviceName, + Method: n.Name, + }) +} + +type Server struct { + *base.Node + *code.Server + GRPC *grpc.Server +} + +var _ graph.Node = &Server{} + +func NewServer(b *base.Node, node *code.Server) *Server { + return &Server{ + Node: b, + Server: node, + // TODO breadchris maybe there is a graph relationship here between the server and the grpc resource + GRPC: grpc.NewServer(b, node.Grpc), + } +} + +func (r *Server) Init() (func(), error) { + if r.Grpc != nil { + return r.GRPC.Init() + } + return nil, nil +} + +func (r *Server) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + //TODO implement me + panic("implement me") +} + +func ensureRunning(host string) error { + maxRetries := 1 + retryInterval := 2 * time.Second + + u, err := url.Parse(host) + if err != nil { + return errors.Wrapf(err, "unable to parse url %s", host) + } + + log.Debug().Str("host", host).Msg("waiting for host to come online") + for i := 1; i <= maxRetries; i++ { + conn, err := net.DialTimeout("tcp", u.Host, time.Second) + if err == nil { + conn.Close() + log.Debug().Str("host", host).Msg("host is not listening") + return nil + } else { + log.Debug().Err(err).Int("attempt", i).Int("max", maxRetries).Msg("error connecting to host") + time.Sleep(retryInterval) + } + } + return errors.New("host did not come online in time") +} diff --git a/pkg/workflow/node/function_test.go b/pkg/node/code/function_test.go similarity index 98% rename from pkg/workflow/node/function_test.go rename to pkg/node/code/function_test.go index 5568b78..1bb37c3 100644 --- a/pkg/workflow/node/function_test.go +++ b/pkg/node/code/function_test.go @@ -1,4 +1,4 @@ -package node +package code import ( "context" diff --git a/pkg/node/code/node.go b/pkg/node/code/node.go new file mode 100644 index 0000000..5f123fc --- /dev/null +++ b/pkg/node/code/node.go @@ -0,0 +1,18 @@ +package code + +import ( + "github.com/protoflow-labs/protoflow/gen/code" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +func New(b *base.Node, node *code.Code) graph.Node { + switch t := node.Type.(type) { + case *code.Code_Function: + return NewFunctionNode(b, t.Function) + case *code.Code_Server: + return NewServer(b, t.Server) + default: + return nil + } +} diff --git a/pkg/node/data/config.go b/pkg/node/data/config.go new file mode 100644 index 0000000..2c3c4e7 --- /dev/null +++ b/pkg/node/data/config.go @@ -0,0 +1,56 @@ +package data + +import ( + "context" + "github.com/pkg/errors" + "github.com/protoflow-labs/protoflow/gen/data" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" + "go.uber.org/config" + "gopkg.in/yaml.v3" +) + +type ConfigNode struct { + *base.Node + *data.Config +} + +var _ graph.Node = &ConfigNode{} + +func NewConfigNode(b *base.Node, node *data.Config) *ConfigNode { + return &ConfigNode{ + Node: b, + Config: node, + } +} + +func (c *ConfigNode) NewConfigProvider(options ...config.YAMLOption) (config.Provider, error) { + opts := []config.YAMLOption{ + config.Permissive(), + } + + for _, o := range options { + opts = append(opts, o) + } + + var u map[string]any + err := yaml.Unmarshal([]byte(c.Config.Value), &u) + if err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal config yaml") + } + opts = append(opts, config.Static(u)) + + conf, err := config.NewYAML(opts...) + if err != nil { + return nil, errors.Wrapf(err, "failed to create config provider") + } + return conf, nil +} + +func (c *ConfigNode) Represent() (string, error) { + return c.Config.Value, nil +} + +func (c *ConfigNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + return graph.Output{}, errors.New("not implemented") +} diff --git a/pkg/node/data/data.go b/pkg/node/data/data.go new file mode 100644 index 0000000..b6e20af --- /dev/null +++ b/pkg/node/data/data.go @@ -0,0 +1,18 @@ +package data + +import ( + "github.com/protoflow-labs/protoflow/gen/data" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +func New(b *base.Node, node *data.Data) graph.Node { + switch t := node.Type.(type) { + case *data.Data_Input: + return NewInputNode(b, t.Input) + case *data.Data_Config: + return NewConfigNode(b, t.Config) + default: + return nil + } +} diff --git a/pkg/workflow/node/input.go b/pkg/node/data/input.go similarity index 57% rename from pkg/workflow/node/input.go rename to pkg/node/data/input.go index 65c6298..51e368a 100644 --- a/pkg/workflow/node/input.go +++ b/pkg/node/data/input.go @@ -1,22 +1,23 @@ -package node +package data import ( "context" - "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/gen/data" + "github.com/protoflow-labs/protoflow/pkg/node/base" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" ) type InputNode struct { - BaseNode - *gen.Input + *base.Node + *data.Input } var _ graph.Node = &InputNode{} -func NewInputNode(node *gen.Node) *InputNode { +func NewInputNode(base *base.Node, input *data.Input) *InputNode { return &InputNode{ - BaseNode: NewBaseNode(node), - Input: node.GetInput(), + Node: base, + Input: input, } } diff --git a/pkg/workflow/node/grpc.go b/pkg/node/grpc/grpc.go similarity index 68% rename from pkg/workflow/node/grpc.go rename to pkg/node/grpc/grpc.go index b727635..3b5ed1c 100644 --- a/pkg/workflow/node/grpc.go +++ b/pkg/node/grpc/grpc.go @@ -1,38 +1,78 @@ -package node +package grpc import ( "context" "fmt" "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" + pgrpc "github.com/protoflow-labs/protoflow/gen/grpc" "github.com/protoflow-labs/protoflow/pkg/grpc" "github.com/protoflow-labs/protoflow/pkg/grpc/bufcurl" "github.com/protoflow-labs/protoflow/pkg/grpc/manager" + "github.com/protoflow-labs/protoflow/pkg/node/base" "github.com/protoflow-labs/protoflow/pkg/util/rx" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/reactivex/rxgo/v2" "github.com/rs/zerolog/log" "google.golang.org/protobuf/reflect/protoreflect" "net/url" + "strings" ) -type GRPCNode struct { - BaseNode - *gen.GRPC +type Server struct { + *base.Node + *pgrpc.Server } -var _ graph.Node = &GRPCNode{} +func NewServer(b *base.Node, n *pgrpc.Server) *Server { + return &Server{ + Node: b, + Server: n, + } +} + +func NewServerProto(host string) *pgrpc.GRPC { + return &pgrpc.GRPC{ + Type: &pgrpc.GRPC_Server{ + Server: &pgrpc.Server{ + Host: host, + }, + }, + } +} + +func (n *Server) Init() (func(), error) { + // TODO breadchris this is a hack to get the grpc server running, this is not ideal + if !strings.HasPrefix(n.Host, "http://") { + n.Host = "http://" + n.Host + } + //if err := ensureRunning(r.Host); err != nil { + // // TODO breadchris ignore errors for now + // // return nil, errors.Wrapf(err, "unable to get the %s grpc server running", r.Name()) + // return nil, nil + //} + return nil, nil +} + +func (n *Server) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + //TODO implement me + panic("implement me") +} + +type Method struct { + *base.Node + *pgrpc.Method +} -// TODO breadchris I would like to be able to return a *GRPCNode from NewGRPCNode -func NewGRPCNode(node *gen.Node) *GRPCNode { - return &GRPCNode{ - BaseNode: NewBaseNode(node), - GRPC: node.GetGrpc(), +var _ graph.Node = &Method{} + +func NewMethod(b *base.Node, n *pgrpc.Method) *Method { + return &Method{ + Node: b, + Method: n, } } -func (n *GRPCNode) getMethodFromServer(r *resource.GRPCResource, protocol bufcurl.ReflectProtocol) (protoreflect.MethodDescriptor, error) { +func (n *Method) getMethodFromServer(r *Server, protocol bufcurl.ReflectProtocol) (protoreflect.MethodDescriptor, error) { // TODO breadchris I think a grpc resource should have a host that has a protocol m := manager.NewReflectionManager("http://"+r.Host, manager.WithProtocol(protocol)) cleanup, err := m.Init() @@ -42,21 +82,25 @@ func (n *GRPCNode) getMethodFromServer(r *resource.GRPCResource, protocol bufcur defer cleanup() serviceName := n.Package + "." + n.Service - method, err := m.ResolveMethod(serviceName, n.Method) + method, err := m.ResolveMethod(serviceName, n.Method.Method) if err != nil { return nil, errors.Wrapf(err, "error resolving method") } return method, nil } -func (n *GRPCNode) Info(r graph.Resource) (*graph.Info, error) { +func (n *Method) Info() (*graph.Info, error) { // TODO breadchris what if we want to get the proto from a proto file? var ( method protoreflect.MethodDescriptor err error ) - gr, ok := r.(*resource.GRPCResource) + p, err := n.Provider() + if err != nil { + return nil, errors.Wrapf(err, "error getting provider") + } + gr, ok := p.(*Server) if !ok { return nil, errors.New("grpc resource is not supported") } @@ -90,13 +134,18 @@ func formatHost(host string) (string, error) { } // TODO breadchris this should be workflow.Context, but for the memory executor it needs context.Context -func (n *GRPCNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { +func (n *Method) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { log.Info(). Str("service", n.Service). - Str("method", n.Method). + Str("method", n.Method.Method). Msg("setting up grpc node") - g, ok := input.Resource.(*resource.GRPCResource) + p, err := n.Provider() + if err != nil { + return graph.Output{}, errors.Wrapf(err, "error getting provider") + } + + g, ok := p.(*Server) if !ok { return graph.Output{}, fmt.Errorf("error getting GRPC resource: %s.%s", n.Service, n.Method) } @@ -119,7 +168,7 @@ func (n *GRPCNode) Wire(ctx context.Context, input graph.Input) (graph.Output, e } defer cleanup() - method, err := manager.ResolveMethod(serviceName, n.Method) + method, err := manager.ResolveMethod(serviceName, n.Method.Method) if err != nil { return graph.Output{}, errors.Wrapf(err, "error resolving method: %s.%s", serviceName, n.Method) } diff --git a/pkg/node/grpc/node.go b/pkg/node/grpc/node.go new file mode 100644 index 0000000..5928e89 --- /dev/null +++ b/pkg/node/grpc/node.go @@ -0,0 +1,18 @@ +package grpc + +import ( + "github.com/protoflow-labs/protoflow/gen/grpc" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +func New(b *base.Node, node *grpc.GRPC) graph.Node { + switch t := node.Type.(type) { + case *grpc.GRPC_Server: + return NewServer(b, t.Server) + case *grpc.GRPC_Method: + return NewMethod(b, t.Method) + default: + return nil + } +} diff --git a/pkg/node/http/http.go b/pkg/node/http/http.go new file mode 100644 index 0000000..c1808f1 --- /dev/null +++ b/pkg/node/http/http.go @@ -0,0 +1,100 @@ +package http + +import ( + "context" + "github.com/pkg/errors" + "github.com/protoflow-labs/protoflow/gen/http" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" + "github.com/reactivex/rxgo/v2" + "sync" +) + +var ( + httpStreamOnce sync.Once + httpStream *HTTPEventStream +) + +type HTTPEventStream struct { + Requests chan rxgo.Item + Responses chan *http.Response + RequestObs rxgo.Observable +} + +// TODO breadchris proper dependency injection will need to be figured out to make this work +func NewHTTPEventStream() *HTTPEventStream { + httpStreamOnce.Do(func() { + // TODO breadchris there must be an easier way to do this + // I was thinking of bypassing the need for this altogether and + // dispatching a workflow job to a workflow service, maybe the executor? + requestChan := make(chan rxgo.Item) + responseChan := make(chan *http.Response) + requestObs := rxgo.FromChannel(requestChan) + httpStream = &HTTPEventStream{ + Requests: requestChan, + Responses: responseChan, + RequestObs: requestObs, + } + }) + return httpStream +} + +type Router struct { + *base.Node + *http.Router + HTTPStream *HTTPEventStream +} + +var _ graph.Node = &Router{} + +func NewRouterNode(b *base.Node, node *http.Router) *Router { + return &Router{ + Node: b, + Router: node, + } +} + +func (r *Router) Init() (func(), error) { + // TODO breadchris proper dependency injection will need to be figured out to make this work + r.HTTPStream = NewHTTPEventStream() + return nil, nil +} + +func (r *Router) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + return graph.Output{}, errors.New("cannot wire router node") +} + +// +//type RESTNode struct { +// Node +// *gen.REST +//} +// +//var _ graph.Node = &RESTNode{} +// +//func NewRestNode(node *gen.Node) *RESTNode { +// return &RESTNode{ +// Node: NewNode(node), +// REST: node.GetRest(), +// } +//} +// +//func (n *RESTNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { +// log.Debug(). +// Interface("headers", n.Headers). +// Str("method", n.Method). +// Str("path", n.Path). +// Msgf("executing rest") +// // TODO breadchris turn this into streamable because why not +// item, err := input.Observable.First().Get() +// if err != nil { +// return graph.Output{}, errors.Wrapf(err, "error getting first item from observable") +// } +// res, err := util.InvokeMethodOnUrl(n.Method, n.Path, n.Headers, item.V) +// if err != nil { +// return graph.Output{Observable: rxgo.Empty()}, nil +// } +// return graph.Output{ +// Observable: rxgo.Just(res)(), +// }, nil +//} diff --git a/pkg/node/http/node.go b/pkg/node/http/node.go new file mode 100644 index 0000000..e999121 --- /dev/null +++ b/pkg/node/http/node.go @@ -0,0 +1,20 @@ +package http + +import ( + "github.com/protoflow-labs/protoflow/gen/http" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +func New(b *base.Node, node *http.HTTP) graph.Node { + switch t := node.Type.(type) { + case *http.HTTP_Route: + return NewRouteNode(b, t.Route) + case *http.HTTP_Router: + return NewRouterNode(b, t.Router) + case *http.HTTP_Template: + return NewTemplateNode(b, t.Template) + default: + return nil + } +} diff --git a/pkg/node/http/route.go b/pkg/node/http/route.go new file mode 100644 index 0000000..c3014ac --- /dev/null +++ b/pkg/node/http/route.go @@ -0,0 +1,69 @@ +package http + +import ( + "context" + "fmt" + "github.com/pkg/errors" + "github.com/protoflow-labs/protoflow/gen/http" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/util/rx" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" + "github.com/reactivex/rxgo/v2" + "net/url" + "path" +) + +type RouteNode struct { + *base.Node + *http.Route +} + +var _ graph.Node = &RouteNode{} + +func NewRouteNode(b *base.Node, node *http.Route) *RouteNode { + return &RouteNode{ + Node: b, + Route: node, + } +} + +func (n *RouteNode) Path(r *Router) string { + return path.Join(r.Root, n.Route.Path) +} + +func (n *RouteNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + p, err := n.Provider() + if err != nil { + return graph.Output{}, err + } + routerResource, ok := p.(*Router) + if !ok { + return graph.Output{}, fmt.Errorf("error getting http router resource: %s", n.Route.Path) + } + + output := make(chan rxgo.Item) + input.Observable.ForEach(func(item any) { + r, ok := item.(*http.Request) + if !ok { + output <- rx.NewError(fmt.Errorf("error getting http request from stream")) + return + } + u, err := url.Parse(r.Url) + if err != nil { + output <- rx.NewError(errors.Wrapf(err, "error parsing request url")) + return + } + if u.Path != n.Path(routerResource) || r.Method != n.Route.Method { + return + } + output <- rx.NewItem(r) + }, func(err error) { + output <- rx.NewError(err) + }, func() { + close(output) + }) + + return graph.Output{ + Observable: rxgo.FromChannel(output, rxgo.WithPublishStrategy()), + }, nil +} diff --git a/pkg/node/http/template.go b/pkg/node/http/template.go new file mode 100644 index 0000000..e88058e --- /dev/null +++ b/pkg/node/http/template.go @@ -0,0 +1,57 @@ +package http + +import ( + "bytes" + "context" + "github.com/protoflow-labs/protoflow/gen/http" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/util/rx" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" + "github.com/reactivex/rxgo/v2" + "html/template" +) + +type TemplateNode struct { + *base.Node + *http.Template +} + +var _ graph.Node = &TemplateNode{} + +func NewTemplateNode(b *base.Node, node *http.Template) *TemplateNode { + return &TemplateNode{ + Node: b, + Template: node, + } +} + +func (n *TemplateNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + output := make(chan rxgo.Item) + + input.Observable.ForEach(func(item any) { + tmpl, err := template.New(n.NormalizedName()).Parse(n.Template.Template) + if err != nil { + output <- rx.NewError(err) + return + } + b := &bytes.Buffer{} + err = tmpl.Execute(b, item) + if err != nil { + output <- rx.NewError(err) + return + } + resp := &http.Response{ + Headers: []*http.Header{}, + Body: b.Bytes(), + } + output <- rx.NewItem(resp) + }, func(err error) { + output <- rx.NewError(err) + }, func() { + close(output) + }) + + return graph.Output{ + Observable: rxgo.FromChannel(output, rxgo.WithPublishStrategy()), + }, nil +} diff --git a/pkg/node/node.go b/pkg/node/node.go new file mode 100644 index 0000000..935d321 --- /dev/null +++ b/pkg/node/node.go @@ -0,0 +1,38 @@ +package node + +import ( + "github.com/google/uuid" + "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/node/code" + "github.com/protoflow-labs/protoflow/pkg/node/data" + "github.com/protoflow-labs/protoflow/pkg/node/grpc" + "github.com/protoflow-labs/protoflow/pkg/node/http" + "github.com/protoflow-labs/protoflow/pkg/node/reason" + "github.com/protoflow-labs/protoflow/pkg/node/storage" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +// TODO breadchris make this something that can be modularized +func New(node *gen.Node) graph.Node { + if node.Id == "" { + node.Id = uuid.NewString() + } + b := base.NewNode(node) + switch t := node.Type.(type) { + case *gen.Node_Data: + return data.New(b, t.Data) + case *gen.Node_Reason: + return reason.New(b, t.Reason) + case *gen.Node_Grpc: + return grpc.New(b, t.Grpc) + case *gen.Node_Http: + return http.New(b, t.Http) + case *gen.Node_Storage: + return storage.New(b, t.Storage) + case *gen.Node_Code: + return code.New(b, t.Code) + default: + return nil + } +} diff --git a/pkg/node/reason/node.go b/pkg/node/reason/node.go new file mode 100644 index 0000000..453c440 --- /dev/null +++ b/pkg/node/reason/node.go @@ -0,0 +1,18 @@ +package reason + +import ( + "github.com/protoflow-labs/protoflow/gen/reason" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +func New(b *base.Node, node *reason.Reason) graph.Node { + switch t := node.Type.(type) { + case *reason.Reason_Prompt: + return NewPromptNode(b, t.Prompt) + case *reason.Reason_Engine: + return NewEngineNode(b, t.Engine) + default: + return nil + } +} diff --git a/pkg/workflow/node/reasonengine.go b/pkg/node/reason/reason.go similarity index 51% rename from pkg/workflow/node/reasonengine.go rename to pkg/node/reason/reason.go index 05da0be..888cb69 100644 --- a/pkg/workflow/node/reasonengine.go +++ b/pkg/node/reason/reason.go @@ -1,36 +1,43 @@ -package node +package reason import ( "context" "encoding/json" - "fmt" "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/gen/reason" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/node/data" + openaiclient "github.com/protoflow-labs/protoflow/pkg/openai" "github.com/protoflow-labs/protoflow/pkg/util/rx" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/reactivex/rxgo/v2" "github.com/rs/zerolog/log" "github.com/sashabaranov/go-openai" + "go.uber.org/config" ) type PromptNode struct { - BaseNode - Prompt *gen.Prompt + *base.Node + *reason.Prompt } var _ graph.Node = &PromptNode{} -func NewPromptNode(node *gen.Node) *PromptNode { +func NewPromptNode(b *base.Node, node *reason.Prompt) *PromptNode { return &PromptNode{ - BaseNode: NewBaseNode(node), - Prompt: node.GetPrompt(), + Node: b, + Prompt: node, } } + func (n *PromptNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { - r, ok := input.Resource.(*resource.ReasoningEngineResource) + p, err := n.Provider() + if err != nil { + return graph.Output{}, err + } + r, ok := p.(*Engine) if !ok { - return graph.Output{}, fmt.Errorf("error getting reasoning engine resource: %s", n.Name) + return graph.Output{}, errors.New("error getting reason engine resource") } log.Info(). @@ -91,3 +98,52 @@ func (n *PromptNode) Wire(ctx context.Context, input graph.Input) (graph.Output, Observable: rxgo.FromChannel(outputStream, rxgo.WithPublishStrategy()), }, nil } + +type Engine struct { + *base.Node + *reason.Engine + QAClient openaiclient.QAClient +} + +func NewEngineNode(b *base.Node, node *reason.Engine) *Engine { + return &Engine{ + Node: b, + Engine: node, + } +} + +func (n *Engine) Init() (func(), error) { + // TODO breadchris replace with some type of dependency injection capability + var ( + configProvider config.Provider + err error + ) + staticConfig := map[string]interface{}{ + "openai": openaiclient.NewDefaultConfig(), + } + for _, n := range n.Predecessors() { + switch t := n.(type) { + case *data.ConfigNode: + // TODO breadchris how do we handle resources that need to be initialized before others? + configProvider, err = t.NewConfigProvider(config.Static(staticConfig)) + if err != nil { + return nil, errors.Wrapf(err, "failed to build config provider") + } + } + } + if configProvider == nil { + return nil, errors.New("config provider not found") + } + c, err := openaiclient.Wire(configProvider) + if err != nil { + return nil, errors.Wrapf(err, "failed to initialize openai client") + } + n.QAClient = c + return nil, nil +} + +func (n *Engine) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { + return graph.Output{ + Observable: input.Observable, + }, nil +} diff --git a/pkg/workflow/node/blobstore.go b/pkg/node/storage/blobstore.go similarity index 72% rename from pkg/workflow/node/blobstore.go rename to pkg/node/storage/blobstore.go index e34b35d..a5a593c 100644 --- a/pkg/workflow/node/blobstore.go +++ b/pkg/node/storage/blobstore.go @@ -1,7 +1,36 @@ -package node +package storage + +//type FileStoreResource struct { +// *BaseResource +// *gen.FileStore +//} +// +//var _ graph.Resource = &FileStoreResource{} +// +//func (r *FileStoreResource) Init() (func(), error) { +// return nil, nil +//} +// +//func (r *FileStoreResource) WithPath(path string) (*blob.Bucket, func(), error) { +// // remove leading slash +// if path[0] == '/' { +// path = path[1:] +// } +// // TODO breadchris validation of this url working should be done on init +// bucket, err := blob.OpenBucket(context.Background(), r.Url+"?prefix="+path) +// if err != nil { +// return nil, nil, fmt.Errorf("could not open bucket: %v", err) +// } +// return bucket, func() { +// err = bucket.Close() +// if err != nil { +// log.Error().Err(err).Msg("error closing blobstore bucket") +// } +// }, nil +//} //type BucketNode struct { -// BaseNode +// Node // *gen.Bucket //} // @@ -9,7 +38,7 @@ package node // //func NewBucketNode(node *gen.Node) *BucketNode { // return &BucketNode{ -// BaseNode: NewBaseNode(node), +// Node: NewBaseNode(node), // Bucket: node.GetBucket(), // } //} @@ -55,7 +84,7 @@ package node //} // //type FileNode struct { -// BaseNode +// Node // File *gen.File //} // @@ -63,7 +92,7 @@ package node // //func NewFileNode(node *gen.Node) *FileNode { // return &FileNode{ -// BaseNode: NewBaseNode(node), +// Node: NewBaseNode(node), // File: node.GetFile(), // } //} diff --git a/pkg/workflow/node/docstore.go b/pkg/node/storage/docstore.go similarity index 64% rename from pkg/workflow/node/docstore.go rename to pkg/node/storage/docstore.go index d3ecd57..cbf0526 100644 --- a/pkg/workflow/node/docstore.go +++ b/pkg/node/storage/docstore.go @@ -1,7 +1,66 @@ -package node +package storage + +//type DocstoreResource struct { +// *BaseResource +// *gen.DocStore +//} +// +//var _ graph.Resource = &DocstoreResource{} +// +//func (r *DocstoreResource) Init() (func(), error) { +// return nil, nil +//} +// +//func (r *DocstoreResource) WithCollection(name string) (*docstore.Collection, func(), error) { +// var ( +// coll *docstore.Collection +// err error +// protoDir string +// ) +// if strings.HasPrefix(r.Url, "mem://") { +// // TODO breadchris replace this with bucket.Cache.GetFolder +// protoDir, err = util.ProtoflowHomeDir() +// if err != nil { +// return nil, nil, errors.Wrap(err, "could not get protoflow home dir") +// } +// +// filename := path.Join(protoDir, name+".json") +// +// // TODO breadchris "id" is +// coll, err = memdocstore.OpenCollection("id", &memdocstore.Options{ +// Filename: filename, +// }) +// if err != nil { +// // remove file if it exists +// if os.IsNotExist(err) { +// return nil, nil, errors.Wrapf(err, "could not open memory docstore collection: %s", name) +// } +// err = os.Remove(filename) +// if err != nil { +// return nil, nil, errors.Wrapf(err, "could not remove memory docstore collection: %s", name) +// } +// } +// } else { +// coll, err = docstore.OpenCollection(context.Background(), r.Url+"/"+name) +// if err != nil { +// return nil, nil, errors.Wrapf(err, "could not open docstore collection: %s", name) +// } +// } +// +// return coll, func() { +// if coll == nil { +// log.Debug().Msg("docstore collection is nil") +// return +// } +// err = coll.Close() +// if err != nil { +// log.Error().Msgf("error closing docstore collection: %+v", err) +// } +// }, nil +//} //type CollectionNode struct { -// BaseNode +// Node // Collection *gen.Collection //} // @@ -9,7 +68,7 @@ package node // //func NewCollectionNode(node *gen.Node) *CollectionNode { // return &CollectionNode{ -// BaseNode: NewBaseNode(node), +// Node: NewBaseNode(node), // Collection: node.GetCollection(), // } //} @@ -79,7 +138,7 @@ package node //} // //type QueryNode struct { -// BaseNode +// Node // Query *gen.Query //} // @@ -87,7 +146,7 @@ package node // //func NewQueryNode(node *gen.Node) *QueryNode { // return &QueryNode{ -// BaseNode: NewBaseNode(node), +// Node: NewBaseNode(node), // Query: node.GetQuery(), // } //} diff --git a/pkg/node/storage/node.go b/pkg/node/storage/node.go new file mode 100644 index 0000000..bf4ad47 --- /dev/null +++ b/pkg/node/storage/node.go @@ -0,0 +1,11 @@ +package storage + +import ( + "github.com/protoflow-labs/protoflow/gen/storage" + "github.com/protoflow-labs/protoflow/pkg/node/base" + "github.com/protoflow-labs/protoflow/pkg/workflow/graph" +) + +func New(b *base.Node, node *storage.Storage) graph.Node { + return nil +} diff --git a/pkg/project/default.go b/pkg/project/default.go index 975fa3e..ebfd345 100644 --- a/pkg/project/default.go +++ b/pkg/project/default.go @@ -3,67 +3,23 @@ package project import ( "github.com/google/uuid" "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/pkg/node/grpc" ) func getDefaultProject(name string, bucketDir string) *gen.Project { return &gen.Project{ Id: uuid.NewString(), Name: name, - Resources: []*gen.Resource{ - { - Id: uuid.NewString(), - Name: "protoflow", - Type: &gen.Resource_GrpcService{ - GrpcService: &gen.GRPCService{ - Host: "localhost:8080", + Graph: &gen.Graph{ + Nodes: []*gen.Node{ + { + Id: uuid.NewString(), + Name: "protoflow", + Type: &gen.Node_Grpc{ + Grpc: grpc.NewServerProto("localhost:8080"), }, }, }, - // TODO breadchris programmatically add resources such as language services - { - Id: uuid.NewString(), - Name: "js", - Type: &gen.Resource_LanguageService{ - LanguageService: &gen.LanguageService{ - Runtime: gen.Runtime_NODEJS, - Grpc: &gen.GRPCService{ - Host: "localhost:8086", - }, - }, - }, - }, - { - Id: uuid.NewString(), - Name: "doc store", - Type: &gen.Resource_DocStore{ - DocStore: &gen.DocStore{ - Url: "mem://", - }, - }, - }, - { - Id: uuid.NewString(), - Name: "file store", - Type: &gen.Resource_FileStore{ - FileStore: &gen.FileStore{ - Url: "file://" + bucketDir, - }, - }, - }, - { - Id: uuid.NewString(), - Name: "openai", - Type: &gen.Resource_ReasoningEngine{ - ReasoningEngine: &gen.ReasoningEngine{}, - }, - }, - { - Id: uuid.NewString(), - Name: "config provider", - Type: &gen.Resource_ConfigProvider{ - ConfigProvider: &gen.ConfigProvider{}, - }, - }, }, } } diff --git a/pkg/project/project.go b/pkg/project/project.go index 30197a3..398af33 100644 --- a/pkg/project/project.go +++ b/pkg/project/project.go @@ -79,10 +79,6 @@ func (s *Service) SaveProject(ctx context.Context, req *connect.Request[gen.Save project.Graph = req.Msg.Graph - if len(req.Msg.Resources) > 0 { - project.Resources = req.Msg.Resources - } - _, err = s.store.SaveProject(project) if err != nil { return nil, errors.Wrapf(err, "failed to save project %s", project.Id) diff --git a/pkg/project/provider.go b/pkg/project/provider.go new file mode 100644 index 0000000..4f4abdd --- /dev/null +++ b/pkg/project/provider.go @@ -0,0 +1,24 @@ +package project + +import ( + "context" + "github.com/bufbuild/connect-go" + "github.com/pkg/errors" + "github.com/protoflow-labs/protoflow/gen" +) + +func (s *Service) EnumerateProviders(ctx context.Context, c *connect.Request[gen.GetProvidersRequest]) (*connect.Response[gen.GetProvidersResponse], error) { + project, err := s.store.GetProject(c.Msg.ProjectId) + if err != nil { + return nil, errors.Wrapf(err, "failed to get project %s", c.Msg.ProjectId) + } + + providers, err := enumerateProvidersFromNodes(project.Graph.GetNodes()) + if err != nil { + return nil, err + } + + return connect.NewResponse(&gen.GetProvidersResponse{ + Providers: providers, + }), nil +} diff --git a/pkg/project/resource.go b/pkg/project/resource.go deleted file mode 100644 index c4aeb48..0000000 --- a/pkg/project/resource.go +++ /dev/null @@ -1,88 +0,0 @@ -package project - -import ( - "context" - "github.com/bufbuild/connect-go" - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" -) - -func (s *Service) GetResources(ctx context.Context, c *connect.Request[gen.GetResourcesRequest]) (*connect.Response[gen.GetResourcesResponse], error) { - project, err := s.store.GetProject(c.Msg.ProjectId) - if err != nil { - return nil, errors.Wrapf(err, "failed to get project %s", c.Msg.ProjectId) - } - - resources, err := hydrateBlocksForResources(project.Resources) - if err != nil { - return nil, err - } - - return connect.NewResponse(&gen.GetResourcesResponse{ - Resources: resources, - }), nil -} - -func (s *Service) DeleteResource(ctx context.Context, c *connect.Request[gen.DeleteResourceRequest]) (*connect.Response[gen.DeleteResourceResponse], error) { - project, err := s.store.GetProject(c.Msg.ProjectId) - if err != nil { - return nil, errors.Wrapf(err, "failed to get project %s", c.Msg.ProjectId) - } - - var newResources []*gen.Resource - for _, resource := range project.Resources { - if resource.Id == c.Msg.ResourceId { - continue - } - newResources = append(newResources, resource) - } - project.Resources = newResources - _, err = s.store.SaveProject(project) - if err != nil { - return nil, err - } - return connect.NewResponse(&gen.DeleteResourceResponse{}), nil -} - -func (s *Service) CreateResource(ctx context.Context, c *connect.Request[gen.CreateResourceRequest]) (*connect.Response[gen.CreateResourceResponse], error) { - project, err := s.store.GetProject(c.Msg.ProjectId) - if err != nil { - return nil, errors.Wrapf(err, "failed to get project %s", c.Msg.ProjectId) - } - - r := c.Msg.Resource - r.Id = uuid.New().String() - - project.Resources = append(project.Resources, r) - _, err = s.store.SaveProject(project) - if err != nil { - return nil, err - } - - return connect.NewResponse(&gen.CreateResourceResponse{ - ResourceId: r.Id, - }), nil -} - -func (s *Service) UpdateResource(ctx context.Context, c *connect.Request[gen.UpdateResourceRequest]) (*connect.Response[gen.UpdateResourceResponse], error) { - project, err := s.store.GetProject(c.Msg.ProjectId) - if err != nil { - return nil, errors.Wrapf(err, "failed to get project %s", c.Msg.ProjectId) - } - - var newResources []*gen.Resource - for _, resource := range project.Resources { - if resource.Id == c.Msg.Resource.Id { - newResources = append(newResources, c.Msg.Resource) - continue - } - newResources = append(newResources, resource) - } - project.Resources = newResources - _, err = s.store.SaveProject(project) - if err != nil { - return nil, err - } - return connect.NewResponse(&gen.UpdateResourceResponse{}), nil -} diff --git a/pkg/project/service.go b/pkg/project/service.go index 2f1ccfa..a739d9c 100644 --- a/pkg/project/service.go +++ b/pkg/project/service.go @@ -7,7 +7,10 @@ import ( "github.com/jhump/protoreflect/desc" "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/gen/code" "github.com/protoflow-labs/protoflow/gen/genconnect" + pgrpc "github.com/protoflow-labs/protoflow/gen/grpc" + "github.com/protoflow-labs/protoflow/gen/storage" "github.com/protoflow-labs/protoflow/pkg/bucket" "github.com/protoflow-labs/protoflow/pkg/grpc" openaiclient "github.com/protoflow-labs/protoflow/pkg/openai" @@ -77,11 +80,16 @@ func nodesFromFiles(u string) ([]*gen.Node, error) { var nodes []*gen.Node for _, file := range files { + // TODO breadchris need to collapse this instantiation nodes = append(nodes, &gen.Node{ Name: file.Name(), - Config: &gen.Node_File{ - File: &gen.File{ - Path: file.Name(), + Type: &gen.Node_Storage{ + Storage: &storage.Storage{ + Type: &storage.Storage_File{ + File: &storage.File{ + Path: file.Name(), + }, + }, }, }, }) @@ -89,38 +97,45 @@ func nodesFromFiles(u string) ([]*gen.Node, error) { return nodes, nil } -func hydrateBlocksForResources(projectResources []*gen.Resource) ([]*gen.EnumeratedResource, error) { - var resources []*gen.EnumeratedResource - for _, resource := range projectResources { - info := &gen.ResourceInfo{ - State: gen.ResourceState_READY, +// TODO breadchris this will be something that needs to be specified when someone is calling the API +func enumerateProvidersFromNodes(nodes []*gen.Node) ([]*gen.EnumeratedProvider, error) { + var resources []*gen.EnumeratedProvider + for _, node := range nodes { + info := &gen.ProviderInfo{ + State: gen.ProviderState_READY, Error: "", } var ( - nodes []*gen.Node - err error + providedNodes []*gen.Node + err error ) - switch resource.Type.(type) { - case *gen.Resource_FileStore: - fileStore := resource.GetFileStore() - nodes, err = nodesFromFiles(fileStore.Url) - case *gen.Resource_GrpcService: - nodes, err = grpc.EnumerateResourceBlocks(resource.GetGrpcService(), false) - case *gen.Resource_LanguageService: - l := resource.GetLanguageService() - nodes, err = grpc.EnumerateResourceBlocks(l.GetGrpc(), true) + switch t := node.Type.(type) { + case *gen.Node_Storage: + switch u := t.Storage.Type.(type) { + case *storage.Storage_Folder: + providedNodes, err = nodesFromFiles(u.Folder.Url) + } + case *gen.Node_Grpc: + switch u := t.Grpc.Type.(type) { + case *pgrpc.GRPC_Server: + providedNodes, err = grpc.EnumerateResourceBlocks(u.Server, false) + } + case *gen.Node_Code: + switch u := t.Code.Type.(type) { + case *code.Code_Server: + providedNodes, err = grpc.EnumerateResourceBlocks(u.Server.Grpc, false) + } + default: + continue } if err != nil { - info.State = gen.ResourceState_ERROR + info.State = gen.ProviderState_ERROR info.Error = err.Error() } - for _, node := range nodes { - node.ResourceId = resource.Id - } - resources = append(resources, &gen.EnumeratedResource{ - Resource: resource, - Nodes: nodes, + resources = append(resources, &gen.EnumeratedProvider{ + Provider: node, + Nodes: providedNodes, Info: info, }) } diff --git a/pkg/project/workflow.go b/pkg/project/workflow.go index 0f0b23b..a627e64 100644 --- a/pkg/project/workflow.go +++ b/pkg/project/workflow.go @@ -6,11 +6,11 @@ import ( "github.com/bufbuild/connect-go" "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/gen" + phttp "github.com/protoflow-labs/protoflow/gen/http" + "github.com/protoflow-labs/protoflow/pkg/node/http" "github.com/protoflow-labs/protoflow/pkg/util/rx" "github.com/protoflow-labs/protoflow/pkg/workflow" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/node" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/reactivex/rxgo/v2" "github.com/rs/zerolog/log" ) @@ -21,7 +21,7 @@ func (s *Service) startWorkflow( nodeID string, workflowInput any, // TODO breadchris this should not be needed - httpStream *resource.HTTPEventStream, + httpStream *http.HTTPEventStream, ) (rxgo.Observable, error) { log.Debug(). Str("workflow", w.ID). @@ -39,7 +39,7 @@ func (s *Service) startWorkflow( httpRequest bool ) switch n.(type) { - case *node.RouteNode: + case *http.RouteNode: inputObs = httpStream.RequestObs httpRequest = true default: @@ -90,12 +90,12 @@ func (s *Service) RunWorkflow(ctx context.Context, c *connect.Request[gen.RunWor observables []rxgo.Observable ) - httpStream := resource.NewHTTPEventStream() + httpStream := http.NewHTTPEventStream() if c.Msg.StartServer { for _, n := range w.NodeLookup { switch n.(type) { - case *node.RouteNode: + case *http.RouteNode: entrypoints = append(entrypoints, n.ID()) } } @@ -118,7 +118,7 @@ func (s *Service) RunWorkflow(ctx context.Context, c *connect.Request[gen.RunWor ) <-obs.ForEach(func(item any) { switch t := item.(type) { - case *gen.HttpResponse: + case *phttp.Response: httpStream.Responses <- t log.Debug().Msg("sent http response") } diff --git a/pkg/workflow/graph/project.go b/pkg/workflow/graph/project.go index 656dfb5..7d55bd8 100644 --- a/pkg/workflow/graph/project.go +++ b/pkg/workflow/graph/project.go @@ -16,16 +16,12 @@ func ConvertProto(p *gen.Project) *protoProject[*gen.Node] { for _, e := range p.GetGraph().GetEdges() { pp.graph.edges = append(pp.graph.edges, e) } - for _, r := range p.GetResources() { - pp.resources = append(pp.resources, r) - } return pp } type ProtoNode interface { protoreflect.ProtoMessage GetId() string - GetResourceId() string } type ProtoEdge interface { @@ -65,17 +61,11 @@ func (g *protoGraph[T]) SetEdges(edges []*gen.Edge) { type ProtoProject[T ProtoNode] interface { GetId() string GetGraph() ProtoGraph[T] - GetResources() []*gen.Resource } type protoProject[T ProtoNode] struct { - id string - graph protoGraph[T] - resources []*gen.Resource -} - -func (p *protoProject[T]) GetResources() []*gen.Resource { - return p.resources + id string + graph protoGraph[T] } func (p *protoProject[T]) SetId(id string) { diff --git a/pkg/workflow/graph/types.go b/pkg/workflow/graph/types.go index 84dfc15..9e1504e 100644 --- a/pkg/workflow/graph/types.go +++ b/pkg/workflow/graph/types.go @@ -11,14 +11,13 @@ import ( type Input struct { Observable rxgo.Observable - Resource Resource } type Output struct { Observable rxgo.Observable } -type DependencyProvider map[string]Resource +type DependencyProvider map[string]Node type Info struct { Method *grpc.MethodDescriptor @@ -41,25 +40,23 @@ type IOFunc func(ctx context.Context, input Input) (Output, error) type Node interface { NormalizedName() string ID() string - ResourceID() string - Info(r Resource) (*Info, error) + Info() (*Info, error) // Represent the node as a string Represent() (string, error) // Wire up the node to an input stream of data and return an output stream of data Wire(ctx context.Context, input Input) (Output, error) + + Init() (func(), error) + + AddPredecessor(n Node) + AddSuccessor(n Node) + Predecessors() []Node + Successors() []Node + Provider() (Node, error) + //DeploymentInfo() (*DeploymentInfo, error) } type Edge struct { From Node To Node } - -type Resource interface { - Name() string - Init() (func(), error) - ID() string - AddNode(n Node) - Nodes() []Node - ResolveDependencies(dp DependencyProvider) error - //DeploymentInfo() (*DeploymentInfo, error) -} diff --git a/pkg/workflow/info.go b/pkg/workflow/info.go index ff3d2e0..eba7b11 100644 --- a/pkg/workflow/info.go +++ b/pkg/workflow/info.go @@ -5,8 +5,10 @@ import ( "github.com/jhump/protoreflect/desc/builder" "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/pkg/grpc" + "github.com/protoflow-labs/protoflow/pkg/node/code" + "github.com/protoflow-labs/protoflow/pkg/node/data" + "github.com/protoflow-labs/protoflow/pkg/node/reason" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - worknode "github.com/protoflow-labs/protoflow/pkg/workflow/node" "github.com/rs/zerolog/log" "github.com/samber/lo" "google.golang.org/protobuf/reflect/protoreflect" @@ -16,7 +18,7 @@ import ( func (w *Workflow) GetNodeInfo(n graph.Node) (*graph.Info, error) { var resp *graph.Info switch n.(type) { - case *worknode.InputNode: + case *data.InputNode: children := w.AdjMap[n.ID()] if len(children) != 1 { // TODO breadchris support multiple children @@ -30,7 +32,7 @@ func (w *Workflow) GetNodeInfo(n graph.Node) (*graph.Info, error) { } return w.GetNodeInfo(n) } - case *worknode.PromptNode: + case *reason.PromptNode: reqMsg := builder.NewMessage("Request") reqMsg = reqMsg.AddField(builder.NewField("message", builder.FieldTypeString())) req := builder.RpcTypeMessage(reqMsg, true) @@ -55,7 +57,7 @@ func (w *Workflow) GetNodeInfo(n graph.Node) (*graph.Info, error) { resp = &graph.Info{ Method: mthd, } - case *worknode.FunctionNode: + case *code.FunctionNode: children := w.AdjMap[n.ID()] parents := w.PreMap[n.ID()] @@ -75,7 +77,7 @@ func (w *Workflow) GetNodeInfo(n graph.Node) (*graph.Info, error) { } switch n.(type) { - case *worknode.FunctionNode: + case *code.FunctionNode: log.Warn(). Str("parent", n.ID()). Str("child", child). @@ -102,7 +104,7 @@ func (w *Workflow) GetNodeInfo(n graph.Node) (*graph.Info, error) { } switch n.(type) { - case *worknode.FunctionNode: + case *code.FunctionNode: log.Warn(). Str("parent", parent). Str("child", n.ID()). @@ -206,11 +208,7 @@ func (w *Workflow) GetNodeInfo(n graph.Node) (*graph.Info, error) { // Method: mthd, // } default: - res, err := w.GetNodeResource(n.ID()) - if err != nil { - return nil, errors.Wrapf(err, "error getting node resource for %s", n.NormalizedName()) - } - return n.Info(res) + return n.Info() } return resp, nil } diff --git a/pkg/workflow/node/base.go b/pkg/workflow/node/base.go deleted file mode 100644 index a10f5cd..0000000 --- a/pkg/workflow/node/base.go +++ /dev/null @@ -1,56 +0,0 @@ -package node - -import ( - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - "github.com/protoflow-labs/protoflow/pkg/util" - "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/rs/zerolog/log" - "strings" -) - -type BaseNode struct { - Name string - id string - resourceID string - - // TODO breadchris see if resources can also be represented as nodes - // predecessors []graph.Node - // successors []graph.Node -} - -// NewBaseNode creates a new BaseNode from a gen.Node, gen.Node cannot be embedded into BaseNode because proto deserialization will fail on the type -func NewBaseNode(node *gen.Node) BaseNode { - return BaseNode{ - Name: util.ToTitleCase(node.Name), - id: node.Id, - resourceID: node.ResourceId, - } -} - -func (n *BaseNode) NormalizedName() string { - name := util.ToTitleCase(n.Name) - if strings.Contains(name, ".") { - name = strings.Split(name, ".")[1] - } - return name -} - -func (n *BaseNode) ID() string { - return n.id -} - -func (n *BaseNode) ResourceID() string { - return n.resourceID -} - -func (n *BaseNode) Info(r graph.Resource) (*graph.Info, error) { - log.Warn(). - Str("node", n.Name). - Msg("Info() not implemented") - return nil, nil -} - -func (n *BaseNode) Represent() (string, error) { - return "", errors.New("not implemented") -} diff --git a/pkg/workflow/node/config.go b/pkg/workflow/node/config.go deleted file mode 100644 index aa17043..0000000 --- a/pkg/workflow/node/config.go +++ /dev/null @@ -1,23 +0,0 @@ -package node - -//type ConfigNode struct { -// BaseNode -// Config *gen.Config -//} -// -//var _ graph.Node = &ConfigNode{} -// -//func NewConfigNode(node *gen.Node) *ConfigNode { -// return &ConfigNode{ -// BaseNode: NewBaseNode(node), -// Config: node.GetConfiguration(), -// } -//} -// -//func (c *ConfigNode) Represent() (string, error) { -// return c.Config.Value, nil -//} -// -//func (c *ConfigNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { -// return graph.Output{}, errors.New("not implemented") -//} diff --git a/pkg/workflow/node/function.go b/pkg/workflow/node/function.go deleted file mode 100644 index 759ad77..0000000 --- a/pkg/workflow/node/function.go +++ /dev/null @@ -1,119 +0,0 @@ -package node - -import ( - "context" - "fmt" - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" - "github.com/reactivex/rxgo/v2" - "github.com/rs/zerolog/log" - "strings" -) - -type FunctionNode struct { - BaseNode - Function *gen.Function - inMemory bool - f graph.IOFunc -} - -var _ graph.Node = &FunctionNode{} - -func NewFunctionProto(name, resourceID string) *gen.Node { - return &gen.Node{ - Id: uuid.NewString(), - Name: name, - ResourceId: resourceID, - Config: &gen.Node_Function{ - Function: &gen.Function{}, - }, - } -} - -type FunctionNodeOption func(*FunctionNode) *FunctionNode - -func InMemoryObserver(name string) graph.IOFunc { - return func(ctx context.Context, input graph.Input) (graph.Output, error) { - output := make(chan rxgo.Item) - input.Observable.ForEach(func(item any) { - log.Info(). - Str("name", name). - Interface("item", item). - Msg("observing item") - output <- rxgo.Of(item) - close(output) - }, func(err error) { - log.Info().Str("name", name).Err(err).Msg("err") - }, func() { - log.Info().Str("name", name).Msg("complete") - }) - return graph.Output{ - Observable: rxgo.FromChannel(output), - }, nil - } -} - -func WithFunction(f graph.IOFunc) FunctionNodeOption { - return func(n *FunctionNode) *FunctionNode { - n.inMemory = true - n.f = f - return n - } -} - -func NewFunctionNode(node *gen.Node, ops ...FunctionNodeOption) *FunctionNode { - f := &FunctionNode{ - BaseNode: NewBaseNode(node), - Function: node.GetFunction(), - } - for _, op := range ops { - f = op(f) - } - return f -} - -func (n *FunctionNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { - log.Debug(). - Str("name", n.NormalizedName()). - Msg("setting up function") - - if n.inMemory { - return n.f(ctx, input) - } - - g, ok := input.Resource.(*resource.LanguageServiceResource) - if !ok { - return graph.Output{}, fmt.Errorf("error getting language service resource: %s", n.Name) - } - - // provide the grpc resource to the grpc gn call. Is this the best place for this? Should this be provided on injection? Probably. - input.Resource = g.GRPCResource - - grpcNode := n.ToGRPC(g) - return grpcNode.Wire(ctx, input) -} - -func (n *FunctionNode) Info(r graph.Resource) (*graph.Info, error) { - ls, ok := r.(*resource.LanguageServiceResource) - if ok { - return nil, errors.New("language service resource is not supported") - } - grpcNode := n.ToGRPC(ls) - // TODO breadchris we should know where the function node is located and should read/write from the proto - return grpcNode.Info(ls.GRPCResource) -} - -func (n *FunctionNode) ToGRPC(r *resource.LanguageServiceResource) *GRPCNode { - serviceName := strings.ToLower(r.Runtime.String()) + "Service" - return &GRPCNode{ - BaseNode: n.BaseNode, - GRPC: &gen.GRPC{ - Package: "protoflow", - Service: serviceName, - Method: n.Name, - }, - } -} diff --git a/pkg/workflow/node/httpservice.go b/pkg/workflow/node/httpservice.go deleted file mode 100644 index ccc0b1c..0000000 --- a/pkg/workflow/node/httpservice.go +++ /dev/null @@ -1,152 +0,0 @@ -package node - -import ( - "bytes" - "context" - "fmt" - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - "github.com/protoflow-labs/protoflow/pkg/util/rx" - "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" - "github.com/reactivex/rxgo/v2" - "html/template" - "net/url" - "path" -) - -type RouteNode struct { - BaseNode - Route *gen.Route -} - -var _ graph.Node = &RouteNode{} - -func NewRouteNode(node *gen.Node) *RouteNode { - return &RouteNode{ - BaseNode: NewBaseNode(node), - Route: node.GetRoute(), - } -} - -func (n *RouteNode) Path(r *resource.HTTPRouterResource) string { - return path.Join(r.HTTPRouter.Root, n.Route.Path) -} - -func (n *RouteNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { - routerResource, ok := input.Resource.(*resource.HTTPRouterResource) - if !ok { - return graph.Output{}, fmt.Errorf("error getting http router resource: %s", n.Route.Path) - } - - output := make(chan rxgo.Item) - input.Observable.ForEach(func(item any) { - r, ok := item.(*gen.HttpRequest) - if !ok { - output <- rx.NewError(fmt.Errorf("error getting http request from stream")) - return - } - u, err := url.Parse(r.Url) - if err != nil { - output <- rx.NewError(errors.Wrapf(err, "error parsing request url")) - return - } - if u.Path != n.Path(routerResource) || r.Method != n.Route.Method { - return - } - output <- rx.NewItem(r) - }, func(err error) { - output <- rx.NewError(err) - }, func() { - close(output) - }) - - return graph.Output{ - Observable: rxgo.FromChannel(output, rxgo.WithPublishStrategy()), - }, nil -} - -type TemplateNode struct { - BaseNode - Template *gen.Template -} - -var _ graph.Node = &TemplateNode{} - -func NewTemplateNode(node *gen.Node) *TemplateNode { - return &TemplateNode{ - BaseNode: NewBaseNode(node), - Template: node.GetTemplate(), - } -} - -func (n *TemplateNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { - _, ok := input.Resource.(*resource.TemplateServiceResource) - if !ok { - return graph.Output{}, fmt.Errorf("error getting template service resource: %s", n.NormalizedName()) - } - - output := make(chan rxgo.Item) - - input.Observable.ForEach(func(item any) { - tmpl, err := template.New(n.NormalizedName()).Parse(n.Template.Template) - if err != nil { - output <- rx.NewError(err) - return - } - b := &bytes.Buffer{} - err = tmpl.Execute(b, item) - if err != nil { - output <- rx.NewError(err) - return - } - resp := &gen.HttpResponse{ - Headers: []*gen.Header{}, - Body: b.Bytes(), - } - output <- rx.NewItem(resp) - }, func(err error) { - output <- rx.NewError(err) - }, func() { - close(output) - }) - - return graph.Output{ - Observable: rxgo.FromChannel(output, rxgo.WithPublishStrategy()), - }, nil -} - -// -//type RESTNode struct { -// BaseNode -// *gen.REST -//} -// -//var _ graph.Node = &RESTNode{} -// -//func NewRestNode(node *gen.Node) *RESTNode { -// return &RESTNode{ -// BaseNode: NewBaseNode(node), -// REST: node.GetRest(), -// } -//} -// -//func (n *RESTNode) Wire(ctx context.Context, input graph.Input) (graph.Output, error) { -// log.Debug(). -// Interface("headers", n.Headers). -// Str("method", n.Method). -// Str("path", n.Path). -// Msgf("executing rest") -// // TODO breadchris turn this into streamable because why not -// item, err := input.Observable.First().Get() -// if err != nil { -// return graph.Output{}, errors.Wrapf(err, "error getting first item from observable") -// } -// res, err := util.InvokeMethodOnUrl(n.Method, n.Path, n.Headers, item.V) -// if err != nil { -// return graph.Output{Observable: rxgo.Empty()}, nil -// } -// return graph.Output{ -// Observable: rxgo.Just(res)(), -// }, nil -//} diff --git a/pkg/workflow/node/node.go b/pkg/workflow/node/node.go deleted file mode 100644 index 26b977d..0000000 --- a/pkg/workflow/node/node.go +++ /dev/null @@ -1,41 +0,0 @@ -package node - -import ( - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - "github.com/protoflow-labs/protoflow/pkg/workflow/graph" -) - -// TODO breadchris make this something that can be modularized -func NewNode(node *gen.Node) (graph.Node, error) { - if node.Id == "" { - node.Id = uuid.NewString() - } - switch node.Config.(type) { - case *gen.Node_Grpc: - return NewGRPCNode(node), nil - case *gen.Node_Input: - return NewInputNode(node), nil - case *gen.Node_Function: - return NewFunctionNode(node), nil - case *gen.Node_Prompt: - return NewPromptNode(node), nil - case *gen.Node_Template: - return NewTemplateNode(node), nil - case *gen.Node_Route: - return NewRouteNode(node), nil - //case *gen.Node_Collection: - // return NewCollectionNode(node), nil - //case *gen.Node_Bucket: - // return NewBucketNode(node), nil - //case *gen.Node_Query: - // return NewQueryNode(node), nil - //case *gen.Node_Configuration: - // return NewConfigNode(node), nil - //case *gen.Node_File: - // return NewFileNode(node), nil - default: - return nil, errors.New("no node found") - } -} diff --git a/pkg/workflow/resource/blobstore.go b/pkg/workflow/resource/blobstore.go deleted file mode 100644 index bd7a31d..0000000 --- a/pkg/workflow/resource/blobstore.go +++ /dev/null @@ -1,30 +0,0 @@ -package resource - -//type FileStoreResource struct { -// *BaseResource -// *gen.FileStore -//} -// -//var _ graph.Resource = &FileStoreResource{} -// -//func (r *FileStoreResource) Init() (func(), error) { -// return nil, nil -//} -// -//func (r *FileStoreResource) WithPath(path string) (*blob.Bucket, func(), error) { -// // remove leading slash -// if path[0] == '/' { -// path = path[1:] -// } -// // TODO breadchris validation of this url working should be done on init -// bucket, err := blob.OpenBucket(context.Background(), r.Url+"?prefix="+path) -// if err != nil { -// return nil, nil, fmt.Errorf("could not open bucket: %v", err) -// } -// return bucket, func() { -// err = bucket.Close() -// if err != nil { -// log.Error().Err(err).Msg("error closing blobstore bucket") -// } -// }, nil -//} diff --git a/pkg/workflow/resource/configprovider.go b/pkg/workflow/resource/configprovider.go deleted file mode 100644 index d4b6f7b..0000000 --- a/pkg/workflow/resource/configprovider.go +++ /dev/null @@ -1,49 +0,0 @@ -package resource - -import ( - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "go.uber.org/config" - "gopkg.in/yaml.v3" -) - -type ConfigProviderResource struct { - *BaseResource - *gen.ConfigProvider -} - -var _ graph.Resource = &ConfigProviderResource{} - -func (r *ConfigProviderResource) Init() (func(), error) { - return nil, nil -} - -func (r *ConfigProviderResource) NewConfigProvider(options ...config.YAMLOption) (config.Provider, error) { - opts := []config.YAMLOption{ - config.Permissive(), - } - - for _, o := range options { - opts = append(opts, o) - } - - for _, n := range r.Nodes() { - repr, err := n.Represent() - if err != nil { - return nil, errors.Wrapf(err, "failed to represent node") - } - var u map[string]any - err = yaml.Unmarshal([]byte(repr), &u) - if err != nil { - return nil, errors.Wrapf(err, "failed to unmarshal config yaml") - } - opts = append(opts, config.Static(u)) - } - - c, err := config.NewYAML(opts...) - if err != nil { - return nil, errors.Wrapf(err, "failed to create config provider") - } - return c, nil -} diff --git a/pkg/workflow/resource/docstore.go b/pkg/workflow/resource/docstore.go deleted file mode 100644 index 047b1c8..0000000 --- a/pkg/workflow/resource/docstore.go +++ /dev/null @@ -1,60 +0,0 @@ -package resource - -//type DocstoreResource struct { -// *BaseResource -// *gen.DocStore -//} -// -//var _ graph.Resource = &DocstoreResource{} -// -//func (r *DocstoreResource) Init() (func(), error) { -// return nil, nil -//} -// -//func (r *DocstoreResource) WithCollection(name string) (*docstore.Collection, func(), error) { -// var ( -// coll *docstore.Collection -// err error -// protoDir string -// ) -// if strings.HasPrefix(r.Url, "mem://") { -// // TODO breadchris replace this with bucket.Cache.GetFolder -// protoDir, err = util.ProtoflowHomeDir() -// if err != nil { -// return nil, nil, errors.Wrap(err, "could not get protoflow home dir") -// } -// -// filename := path.Join(protoDir, name+".json") -// -// // TODO breadchris "id" is -// coll, err = memdocstore.OpenCollection("id", &memdocstore.Options{ -// Filename: filename, -// }) -// if err != nil { -// // remove file if it exists -// if os.IsNotExist(err) { -// return nil, nil, errors.Wrapf(err, "could not open memory docstore collection: %s", name) -// } -// err = os.Remove(filename) -// if err != nil { -// return nil, nil, errors.Wrapf(err, "could not remove memory docstore collection: %s", name) -// } -// } -// } else { -// coll, err = docstore.OpenCollection(context.Background(), r.Url+"/"+name) -// if err != nil { -// return nil, nil, errors.Wrapf(err, "could not open docstore collection: %s", name) -// } -// } -// -// return coll, func() { -// if coll == nil { -// log.Debug().Msg("docstore collection is nil") -// return -// } -// err = coll.Close() -// if err != nil { -// log.Error().Msgf("error closing docstore collection: %+v", err) -// } -// }, nil -//} diff --git a/pkg/workflow/resource/grpc.go b/pkg/workflow/resource/grpc.go deleted file mode 100644 index 18277ee..0000000 --- a/pkg/workflow/resource/grpc.go +++ /dev/null @@ -1,24 +0,0 @@ -package resource - -import ( - "github.com/protoflow-labs/protoflow/gen" - "strings" -) - -type GRPCResource struct { - *BaseResource - *gen.GRPCService -} - -func (r *GRPCResource) Init() (func(), error) { - // TODO breadchris this is a hack to get the grpc server running, this is not ideal - if !strings.HasPrefix(r.Host, "http://") { - r.Host = "http://" + r.Host - } - //if err := ensureRunning(r.Host); err != nil { - // // TODO breadchris ignore errors for now - // // return nil, errors.Wrapf(err, "unable to get the %s grpc server running", r.Name()) - // return nil, nil - //} - return nil, nil -} diff --git a/pkg/workflow/resource/httpservice.go b/pkg/workflow/resource/httpservice.go deleted file mode 100644 index 896d6a4..0000000 --- a/pkg/workflow/resource/httpservice.go +++ /dev/null @@ -1,48 +0,0 @@ -package resource - -import ( - "github.com/protoflow-labs/protoflow/gen" - "github.com/reactivex/rxgo/v2" - "sync" -) - -var ( - httpStreamOnce sync.Once - httpStream *HTTPEventStream -) - -type HTTPEventStream struct { - Requests chan rxgo.Item - Responses chan *gen.HttpResponse - RequestObs rxgo.Observable -} - -// TODO breadchris proper dependency injection will need to be figured out to make this work -func NewHTTPEventStream() *HTTPEventStream { - httpStreamOnce.Do(func() { - // TODO breadchris there must be an easier way to do this - // I was thinking of bypassing the need for this altogether and - // dispatching a workflow job to a workflow service, maybe the executor? - requestChan := make(chan rxgo.Item) - responseChan := make(chan *gen.HttpResponse) - requestObs := rxgo.FromChannel(requestChan) - httpStream = &HTTPEventStream{ - Requests: requestChan, - Responses: responseChan, - RequestObs: requestObs, - } - }) - return httpStream -} - -type HTTPRouterResource struct { - *BaseResource - *gen.HTTPRouter - HTTPStream *HTTPEventStream -} - -func (r *HTTPRouterResource) Init() (func(), error) { - // TODO breadchris proper dependency injection will need to be figured out to make this work - r.HTTPStream = NewHTTPEventStream() - return nil, nil -} diff --git a/pkg/workflow/resource/language.go b/pkg/workflow/resource/language.go deleted file mode 100644 index abaa31a..0000000 --- a/pkg/workflow/resource/language.go +++ /dev/null @@ -1,46 +0,0 @@ -package resource - -import ( - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - "github.com/rs/zerolog/log" - "net" - "net/url" - "time" -) - -type LanguageServiceResource struct { - *gen.LanguageService - *GRPCResource -} - -func (r *LanguageServiceResource) Init() (func(), error) { - if r.GRPCResource.GRPCService != nil { - return r.GRPCResource.Init() - } - return nil, nil -} - -func ensureRunning(host string) error { - maxRetries := 1 - retryInterval := 2 * time.Second - - u, err := url.Parse(host) - if err != nil { - return errors.Wrapf(err, "unable to parse url %s", host) - } - - log.Debug().Str("host", host).Msg("waiting for host to come online") - for i := 1; i <= maxRetries; i++ { - conn, err := net.DialTimeout("tcp", u.Host, time.Second) - if err == nil { - conn.Close() - log.Debug().Str("host", host).Msg("host is not listening") - return nil - } else { - log.Debug().Err(err).Int("attempt", i).Int("max", maxRetries).Msg("error connecting to host") - time.Sleep(retryInterval) - } - } - return errors.New("host did not come online in time") -} diff --git a/pkg/workflow/resource/reasonengine.go b/pkg/workflow/resource/reasonengine.go deleted file mode 100644 index 296b925..0000000 --- a/pkg/workflow/resource/reasonengine.go +++ /dev/null @@ -1,44 +0,0 @@ -package resource - -import ( - "github.com/pkg/errors" - "github.com/protoflow-labs/protoflow/gen" - openaiclient "github.com/protoflow-labs/protoflow/pkg/openai" - "go.uber.org/config" -) - -type ReasoningEngineResource struct { - *BaseResource - *gen.ReasoningEngine - QAClient openaiclient.QAClient -} - -func (r *ReasoningEngineResource) Init() (func(), error) { - // TODO breadchris replace with some type of dependency injection capability - var ( - configProvider config.Provider - err error - ) - staticConfig := map[string]interface{}{ - "openai": openaiclient.NewDefaultConfig(), - } - for _, n := range r.dependencyLookup { - switch t := n.(type) { - case *ConfigProviderResource: - // TODO breadchris how do we handle resources that need to be initialized before others? - configProvider, err = t.NewConfigProvider(config.Static(staticConfig)) - if err != nil { - return nil, errors.Wrapf(err, "failed to build config provider") - } - } - } - if configProvider == nil { - return nil, errors.New("config provider not found") - } - c, err := openaiclient.Wire(configProvider) - if err != nil { - return nil, errors.Wrapf(err, "failed to initialize openai client") - } - r.QAClient = c - return nil, nil -} diff --git a/pkg/workflow/resource/resource.go b/pkg/workflow/resource/resource.go deleted file mode 100644 index ab8e6c2..0000000 --- a/pkg/workflow/resource/resource.go +++ /dev/null @@ -1,126 +0,0 @@ -package resource - -import ( - "fmt" - "github.com/google/uuid" - "github.com/protoflow-labs/protoflow/gen" - "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - _ "gocloud.dev/blob/fileblob" - _ "gocloud.dev/blob/memblob" - _ "gocloud.dev/docstore/memdocstore" -) - -type DeploymentInfo struct { - ContainerURI string - Ports []int - Volumes []string -} - -type BaseResource struct { - id string - name string - dependencyLookup map[string]graph.Resource - nodes []graph.Node -} - -func (r *BaseResource) ID() string { - return r.id -} - -func (r *BaseResource) Name() string { - return r.name -} - -func (r *BaseResource) Init() (func(), error) { - return func() {}, nil -} - -func (r *BaseResource) Info(n graph.Node) (*graph.Info, error) { - return nil, nil -} - -func (r *BaseResource) AddNode(n graph.Node) { - r.nodes = append(r.nodes, n) -} - -func (r *BaseResource) Nodes() []graph.Node { - return r.nodes -} - -// TODO breadchris resolve dependencies using a go wire pattern? https://github.com/google/wire -func (r *BaseResource) ResolveDependencies(dp graph.DependencyProvider) error { - for id := range r.dependencyLookup { - if _, ok := dp[id]; !ok { - return fmt.Errorf("dependency not found: %s", id) - } - r.dependencyLookup[id] = dp[id] - } - return nil -} - -// NewProto creates a new resource from a proto resource and generates a new ID. -func NewProto(r *gen.Resource) *gen.Resource { - return &gen.Resource{ - Id: uuid.NewString(), - Type: r.Type, - } -} - -func FromProto(r *gen.Resource) (graph.Resource, error) { - base := &BaseResource{ - id: r.Id, - name: r.Name, - } - // TODO breadchris is this too sketch? - base.dependencyLookup = make(map[string]graph.Resource) - for _, dep := range r.Dependencies { - base.dependencyLookup[dep] = nil - } - switch t := r.Type.(type) { - case *gen.Resource_LanguageService: - return &LanguageServiceResource{ - GRPCResource: &GRPCResource{ - BaseResource: base, - GRPCService: t.LanguageService.Grpc, - }, - LanguageService: t.LanguageService, - }, nil - case *gen.Resource_GrpcService: - return &GRPCResource{ - BaseResource: base, - GRPCService: t.GrpcService, - }, nil - case *gen.Resource_ReasoningEngine: - return &ReasoningEngineResource{ - BaseResource: base, - ReasoningEngine: t.ReasoningEngine, - }, nil - case *gen.Resource_ConfigProvider: - return &ConfigProviderResource{ - BaseResource: base, - ConfigProvider: t.ConfigProvider, - }, nil - case *gen.Resource_TemplateService: - return &TemplateServiceResource{ - BaseResource: base, - TemplateService: t.TemplateService, - }, nil - case *gen.Resource_HttpRouter: - return &HTTPRouterResource{ - BaseResource: base, - HTTPRouter: t.HttpRouter, - }, nil - //case *gen.Resource_DocStore: - // return &DocstoreResource{ - // BaseResource: base, - // DocStore: t.DocStore, - // }, nil - //case *gen.Resource_FileStore: - // return &FileStoreResource{ - // BaseResource: base, - // FileStore: t.FileStore, - // }, nil - default: - return nil, fmt.Errorf("no resource found with type: %s", t) - } -} diff --git a/pkg/workflow/resource/resource_test.go b/pkg/workflow/resource/resource_test.go deleted file mode 100644 index 3942730..0000000 --- a/pkg/workflow/resource/resource_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package resource - -import ( - "testing" -) - -func TestBlobstoreResource_Init(t *testing.T) { - // r, err := ResourceFromProto(&gen.Resource{ - // Id: "1", - // Type: &gen.Resource_Blobstore{ - // Blobstore: &gen.Blobstore{ - // Url: "mem://", - // }, - // }, - // }) - // if err != nil { - // t.Fatal(err) - // } - // _, err = r.Init() - // if err != nil { - // t.Fatal(err) - // } - - // resources := map[string]any{ - // "1": r, - // } - - // // try to look up wrong resource - // _, err = getResource[DocstoreResource](resources) - // if err == nil { - // t.Fatal("expected error") - // } - - // resource, err := getResource[FileStoreResource](resources) - // if err != nil { - // t.Fatal(err) - // } - // if resource == nil { - // t.Fatal("resource is nil") - // } - - // b, cleanup, err := resource.WithPath("test") - // if err != nil { - // t.Fatal(err) - // } - // defer cleanup() - - // err = b.WriteAll(context.Background(), "test", []byte("test"), nil) - // if err != nil { - // t.Fatal(err) - // } - // data, err := b.ReadAll(context.Background(), "test") - // if err != nil { - // t.Fatal(err) - // } - // if string(data) != "test" { - // t.Fatalf("expected %s, got %s", "test", string(data)) - // } -} - -func TestDocstoreResource_Init(t *testing.T) { - // r, err := ResourceFromProto(&gen.Resource{ - // Id: "1", - // Type: &gen.Resource_Docstore{ - // Docstore: &gen.Docstore{ - // Url: "mem://collection", - // }, - // }, - // }) - // if err != nil { - // t.Fatal(err) - // } - // _, err = r.Init() - // if err != nil { - // t.Fatal(err) - // } - - // resources := map[string]any{ - // "1": r, - // } - - // resource, err := getResource[DocstoreResource](resources) - // if err != nil { - // t.Fatal(err) - // } - // if resource == nil { - // t.Fatal("resource is nil") - // } - - // d, _, err := resource.WithCollection("Name") - // if err != nil { - // t.Fatal(err) - // } - - // type Player struct { - // Name string - // Score int - // } - - // createPlayer := Player{ - // Name: "chris", - // Score: 100, - // } - - // err = d.Create(context.Background(), &createPlayer) - // if err != nil { - // t.Fatal(err) - // } - - // getPlayer := Player{ - // Name: "chris", - // } - // err = d.Get(context.Background(), &getPlayer) - // if err != nil { - // t.Fatal(err) - // } - // if createPlayer.Score != getPlayer.Score { - // t.Fatalf("expected %d, got %d", createPlayer.Score, getPlayer.Score) - // } -} diff --git a/pkg/workflow/resource/templateservice.go b/pkg/workflow/resource/templateservice.go deleted file mode 100644 index d4aa514..0000000 --- a/pkg/workflow/resource/templateservice.go +++ /dev/null @@ -1,14 +0,0 @@ -package resource - -import ( - "github.com/protoflow-labs/protoflow/gen" -) - -type TemplateServiceResource struct { - *BaseResource - *gen.TemplateService -} - -func (r *TemplateServiceResource) Init() (func(), error) { - return nil, nil -} diff --git a/pkg/workflow/workflow.go b/pkg/workflow/workflow.go index e2594b4..8b21a08 100644 --- a/pkg/workflow/workflow.go +++ b/pkg/workflow/workflow.go @@ -7,9 +7,8 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" "github.com/protoflow-labs/protoflow/gen" + "github.com/protoflow-labs/protoflow/pkg/node" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/node" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/reactivex/rxgo/v2" "github.com/rs/zerolog/log" "google.golang.org/protobuf/reflect/protoreflect" @@ -20,7 +19,7 @@ const edgeIDKey = "id" type AdjMap map[string]map[string]graphlib.Edge[string] // TODO breadchris can this be a map[string]Resource? -type Instances map[string]graph.Resource +type Instances map[string]graph.Node // Workflow is a directed graph of nodes that represent a workflow. The builder interface is immutable allowing for extensions. type Workflow struct { @@ -31,10 +30,9 @@ type Workflow struct { NodeLookup map[string]graph.Node AdjMap AdjMap PreMap AdjMap - Resources map[string]graph.Resource } -type Builder[T graph.ProtoNode] func(message T) (graph.Node, error) +type Builder[T graph.ProtoNode] func(message T) graph.Node type WorkflowBuilder[T graph.ProtoNode] struct { w *Workflow @@ -45,7 +43,7 @@ type WorkflowBuilder[T graph.ProtoNode] struct { // TODO breadchris is a workflow builder type needed so that you separate the build and workflow steps? func Default() *WorkflowBuilder[*gen.Node] { - return NewBuilder[*gen.Node]().WithNodeTypes(&gen.Node{}, node.NewNode) + return NewBuilder[*gen.Node]().WithNodeTypes(&gen.Node{}, node.New) } func NewBuilder[T graph.ProtoNode]() *WorkflowBuilder[T] { @@ -54,7 +52,6 @@ func NewBuilder[T graph.ProtoNode]() *WorkflowBuilder[T] { w: &Workflow{ ProjectID: uuid.NewString(), // TODO breadchris can reseources be replaced with a graph? - Resources: graph.DependencyProvider{}, NodeLookup: map[string]graph.Node{}, Graph: graphlib.New(graphlib.StringHash, graphlib.Directed(), graphlib.PreventCycles()), }, @@ -74,7 +71,11 @@ func (w *WorkflowBuilder[T]) newNode(n T) (graph.Node, error) { if !ok { return nil, errors.Errorf("no builder found for node type %s", bn) } - return nodeBuilder(n) + builtNode := nodeBuilder(n) + if builtNode == nil { + return nil, errors.Errorf("node builder for node type %+v returned nil", n) + } + return builtNode, nil } func (w *WorkflowBuilder[T]) WithNodeTypes(n T, builder Builder[T]) *WorkflowBuilder[T] { @@ -123,16 +124,6 @@ func (w *WorkflowBuilder[T]) WithBuiltEdges(edges ...graph.Edge) *WorkflowBuilde return &nw } -func (w *WorkflowBuilder[T]) WithResource(r *gen.Resource) *WorkflowBuilder[T] { - nw := *w - err := nw.addResource(r) - if err != nil { - nw.err = errors.Wrapf(err, "error adding resource %s", r.Id) - return &nw - } - return &nw -} - func (w *WorkflowBuilder[T]) addNode(n T) error { builtNode, err := w.newNode(n) if err != nil { @@ -151,13 +142,6 @@ func (w *WorkflowBuilder[T]) addBuiltNode(builtNode graph.Node) error { } w.w.NodeLookup[builtNode.ID()] = builtNode - r := w.w.Resources[builtNode.ResourceID()] - if r != nil { - r.AddNode(builtNode) - } else { - // TODO breadchris inputs do not have resources, but should they? - log.Warn().Str("node", builtNode.NormalizedName()).Msg("no resource found for node") - } return nil } @@ -166,16 +150,6 @@ func (w *WorkflowBuilder[T]) addEdge(edge *gen.Edge) error { return w.w.Graph.AddEdge(edge.From, edge.To, graphlib.EdgeAttribute(edgeIDKey, edge.Id)) } -// TODO breadchris change to generic resource -func (w *WorkflowBuilder[T]) addResource(protoRes *gen.Resource) error { - r, err := resource.FromProto(protoRes) - if err != nil { - return errors.Wrapf(err, "error creating resource for node %s", protoRes.Id) - } - w.w.Resources[protoRes.Id] = r - return nil -} - func (w *WorkflowBuilder[T]) WithProtoProject(project graph.ProtoProject[T]) *WorkflowBuilder[T] { nw := *w var g = project.GetGraph() @@ -185,14 +159,6 @@ func (w *WorkflowBuilder[T]) WithProtoProject(project graph.ProtoProject[T]) *Wo } nw.w.ProjectID = project.GetId() - for _, protoRes := range project.GetResources() { - err := nw.addResource(protoRes) - if err != nil { - nw.err = errors.Wrapf(err, "error adding resource %s", protoRes.Id) - return &nw - } - } - for _, n := range g.GetNodes() { err := nw.addNode(n) if err != nil { @@ -214,11 +180,7 @@ func (w *WorkflowBuilder[T]) WithProtoProject(project graph.ProtoProject[T]) *Wo func (w *WorkflowBuilder[T]) Build() (*Workflow, error) { nw := *w - for _, r := range nw.w.Resources { - if err := r.ResolveDependencies(nw.w.Resources); err != nil { - return nil, errors.Wrapf(err, "error resolving dependencies for resource %s", r.ID()) - } - } + // TODO breadchris resolve dependencies adjMap, err := nw.w.Graph.AdjacencyMap() if err != nil { @@ -247,16 +209,12 @@ func (w *Workflow) GetNode(id string) (graph.Node, error) { return node, nil } -func (w *Workflow) GetNodeResource(id string) (graph.Resource, error) { - node, err := w.GetNode(id) +func (w *Workflow) GetNodeProvider(id string) (graph.Node, error) { + n, err := w.GetNode(id) if err != nil { return nil, err } - r, ok := w.Resources[node.ResourceID()] - if !ok { - return nil, fmt.Errorf("resource %s not found", node.ResourceID()) - } - return r, nil + return n.Provider() } // TODO breadchris nodeID should not be needed, the workflow should already be a slice of the graph that is configured to run @@ -273,10 +231,10 @@ func (w *Workflow) WireNodes(ctx context.Context, nodeID string, input rxgo.Obse // TODO breadchris make a slice of resources that are needed for the workflow // TODO breadchris implement resource pool to avoid creating resources for every workflow instances := Instances{} - for id, r := range w.Resources { + for id, r := range w.NodeLookup { cleanup, err := r.Init() if err != nil { - return nil, errors.Wrapf(err, "error creating resource %s", r.Name()) + return nil, errors.Wrapf(err, "error creating resource %s", r.NormalizedName()) } cleanupFuncs = append(cleanupFuncs, cleanup) instances[id] = r @@ -315,12 +273,6 @@ func (w *Workflow) wireWorkflow( return nil, fmt.Errorf("vertex not found: %s", nodeID) } - log.Debug().Str("node", node.NormalizedName()).Msg("injecting dependencies for node") - err := injectDepsForNode(instances, &input, node) - if err != nil { - return nil, errors.Wrapf(err, "error injecting dependencies for node %s", nodeID) - } - log.Debug(). Str("node", node.NormalizedName()). // Interface("resource", input.Resource.Name()). @@ -380,15 +332,3 @@ func (w *Workflow) wireWorkflow( } return nil, nil } - -func injectDepsForNode(instances Instances, input *graph.Input, node graph.Node) error { - if node.ResourceID() == "" { - return nil - } - r, ok := instances[node.ResourceID()] - if !ok { - return fmt.Errorf("resource not found: %s", node.ResourceID()) - } - input.Resource = r - return nil -} diff --git a/pkg/workflow/workflow_test.go b/pkg/workflow/workflow_test.go index 5fb655a..ecee1e1 100644 --- a/pkg/workflow/workflow_test.go +++ b/pkg/workflow/workflow_test.go @@ -2,9 +2,9 @@ package workflow import ( "context" + "github.com/protoflow-labs/protoflow/pkg/node" + "github.com/protoflow-labs/protoflow/pkg/node/code" "github.com/protoflow-labs/protoflow/pkg/workflow/graph" - "github.com/protoflow-labs/protoflow/pkg/workflow/node" - "github.com/protoflow-labs/protoflow/pkg/workflow/resource" "github.com/reactivex/rxgo/v2" "github.com/rs/zerolog/log" "testing" @@ -15,23 +15,22 @@ import ( func TestRun(t *testing.T) { // TODO breadchris start server to listen for localhost:8080? - r := resource.NewProto(&gen.Resource{ + r := node.NewProto(&gen.Resource{ Type: &gen.Resource_LanguageService{ LanguageService: &gen.LanguageService{}, }, }) - n1 := node.NewFunctionNode( - node.NewFunctionProto("test 1", r.Id), - node.WithFunction(node.InMemoryObserver("test 1")), + n1 := code.NewFunctionNode( + code.NewFunctionProto("test 1", r.Id), + code.WithFunction(code.InMemoryObserver("test 1")), ) - n2 := node.NewFunctionNode( - node.NewFunctionProto("test 2", r.Id), - node.WithFunction(node.InMemoryObserver("test 2")), + n2 := code.NewFunctionNode( + code.NewFunctionProto("test 2", r.Id), + code.WithFunction(code.InMemoryObserver("test 2")), ) a, err := Default(). - WithResource(r). WithBuiltNodes(n1, n2). WithBuiltEdges(graph.Edge{ From: n1, diff --git a/proto/block.proto b/proto/block.proto deleted file mode 100644 index 32f1009..0000000 --- a/proto/block.proto +++ /dev/null @@ -1,78 +0,0 @@ -syntax = "proto3"; - -package block; -option go_package = "block"; -import "google/protobuf/any.proto"; -import "google/protobuf/descriptor.proto"; - -message Input { - repeated FieldDefinition fields = 1; -} - -message Config { - string value = 1; - // TODO breadchris configs could have a type - //google.protobuf.DescriptorProto type = 1; -} - -message Template { - string template = 1; -} - -message Route { - string path = 1; - string method = 2; -} - -message Secret { - string value = 1; -} - -message File { - string path = 1; -} - -message Collection { - string name = 1; -} - -message Bucket { - string path = 1; -} - -message Function { -} - -message Query { - string collection = 1; -} - -message Prompt { - string prompt = 3; -} - -message Result { - bytes data = 1; -} - -message FieldDefinition { - enum FieldType { - STRING = 0; - INTEGER = 1; - BOOLEAN = 2; - } - string name = 1; - FieldType type = 2; -} - -message REST { - string path = 1; - string method = 2; - map headers = 3; -} - -message GRPC { - string package = 1; - string service = 2; - string method = 3; -} diff --git a/proto/code/code.proto b/proto/code/code.proto new file mode 100644 index 0000000..79e3c39 --- /dev/null +++ b/proto/code/code.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package code; +option go_package = "code"; + +import "grpc/grpc.proto"; + +enum Runtime { + NODEJS = 0; + PYTHON = 1; + GO = 2; +} + +message Function { +} + +message Server { + Runtime runtime = 1; + grpc.Server grpc = 2; + string path = 3; + // string containerURI = 4; +} + +message Code { + oneof type { + Function function = 1; + Server server = 2; + } +} diff --git a/proto/data/data.proto b/proto/data/data.proto new file mode 100644 index 0000000..4861f62 --- /dev/null +++ b/proto/data/data.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package data; +option go_package = "data"; + +message Input { + string value = 1; +} + +// TODO breadchris do we need an explicit provider for config? probably +message Config { + string value = 1; + // TODO breadchris configs could have a type + //google.protobuf.DescriptorProto type = 1; +} + +message Data { + oneof type { + Input input = 1; + Config config = 2; + } +} \ No newline at end of file diff --git a/proto/graph.proto b/proto/graph.proto index 40582cd..c5d7b79 100644 --- a/proto/graph.proto +++ b/proto/graph.proto @@ -1,17 +1,18 @@ syntax = "proto3"; -import "block.proto"; -import "resource.proto"; +import "grpc/grpc.proto"; +import "reason/reason.proto"; +import "data/data.proto"; +import "http/http.proto"; +import "storage/storage.proto"; +import "code/code.proto"; package graph; option go_package = "graph"; message Graph { - // TODO breadchris get rid of id and name, they are not needed - string id = 1; - string name = 2; - repeated Node nodes = 3; - repeated Edge edges = 4; + repeated Node nodes = 1; + repeated Edge edges = 2; } message Node { @@ -20,35 +21,31 @@ message Node { float x = 4; float y = 5; - string resource_id = 6; - - oneof config { - block.REST rest = 7; - block.GRPC grpc = 8; - block.Collection collection = 9; - block.Bucket bucket = 10; - block.Input input = 11; - block.Function function = 12; - block.Query query = 13; - block.Prompt prompt = 14; - block.Config configuration = 15; - block.Route route = 16; - block.Template template = 17; - block.Secret secret = 18; - block.File file = 19; + oneof type { + data.Data data = 7; + reason.Reason reason = 8; + grpc.GRPC grpc = 9; + http.HTTP http = 10; + storage.Storage storage = 11; + code.Code code = 12; } } +// TODO breadchris message NodeInstance { node_id, name, x, y } for displaying + message CodeAdapter { string code = 1; } +message Provides {} + message Edge { string id = 1; string from = 2; string to = 3; - oneof config { + oneof type { CodeAdapter code_adapter = 4; + Provides provides = 5; } } diff --git a/proto/grpc/grpc.proto b/proto/grpc/grpc.proto new file mode 100644 index 0000000..639d626 --- /dev/null +++ b/proto/grpc/grpc.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package grpc; +option go_package = "grpc"; + +message Method { + string package = 1; + string service = 2; + string method = 3; +} + +message Server { + string host = 1; +} + +message GRPC { + oneof type { + Method method = 1; + Server server = 2; + } +} diff --git a/proto/http.proto b/proto/http.proto deleted file mode 100644 index cfc22ab..0000000 --- a/proto/http.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package http; -option go_package = "http"; - -message Header { - string name = 1; - string value = 2; -} - -message HttpRequest { - string method = 1; - string url = 2; - repeated Header headers = 3; - bytes body = 4; -} - -message HttpResponse { - repeated Header headers = 1; - bytes body = 2; -} diff --git a/proto/http/http.proto b/proto/http/http.proto new file mode 100644 index 0000000..945535c --- /dev/null +++ b/proto/http/http.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +package http; +option go_package = "http"; + +message Header { + string name = 1; + string value = 2; +} + +message Request { + string method = 1; + string url = 2; + repeated Header headers = 3; + bytes body = 4; +} + +message Response { + repeated Header headers = 1; + bytes body = 2; +} + +message Route { + string path = 1; + string method = 2; +} + +message Template { + string template = 1; +} + +message Router { + string root = 1; +} + +message HTTP { + oneof type { + Route route = 9; + Template template = 10; + Router router = 11; + } +} \ No newline at end of file diff --git a/proto/project.proto b/proto/project.proto index 269afee..dccbb44 100644 --- a/proto/project.proto +++ b/proto/project.proto @@ -2,31 +2,14 @@ syntax = "proto3"; import "google/protobuf/descriptor.proto"; import "graph.proto"; -import "block.proto"; -import "resource.proto"; package project; option go_package = "project"; -enum LayerType { - Execution = 0; - Resource = 1; -} - -message Layer { - LayerType type = 1; - graph.Graph graph = 2; -} - message Project { string id = 1; string name = 2; - string description = 3; - string owner = 4; - string created_at = 5; - string updated_at = 6; - graph.Graph graph = 7; - repeated resource.Resource resources = 8; + graph.Graph graph = 3; } service ProjectService { @@ -43,10 +26,7 @@ service ProjectService { rpc CreateProject(CreateProjectRequest) returns (CreateProjectResponse) {} rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse) {} - rpc UpdateResource(UpdateResourceRequest) returns (UpdateResourceResponse) {} - rpc CreateResource(CreateResourceRequest) returns (CreateResourceResponse) {} - rpc GetResources(GetResourcesRequest) returns (GetResourcesResponse) {} - rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) {} + rpc EnumerateProviders(GetProvidersRequest) returns (GetProvidersResponse) {} rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) {} @@ -89,13 +69,6 @@ message StopWorkflowRequest { message StopWorkflowResponse {} -message UpdateResourceRequest { - string project_id = 1; - resource.Resource resource = 2; -} - -message UpdateResourceResponse {} - message Chat { string id = 1; } @@ -156,13 +129,6 @@ message GetNodeInfoResponse { GRPCTypeInfo type_info = 2; } -message DeleteResourceRequest { - string project_id = 1; - string resource_id = 2; -} - -message DeleteResourceResponse {} - message RuntimeData { string name = 1; repeated string calls = 2; @@ -185,15 +151,6 @@ message Data { string value = 1; } -message CreateResourceRequest { - string project_id = 1; - resource.Resource resource = 2; -} - -message CreateResourceResponse { - string resource_id = 1; -} - message GetProjectRequest { string id = 1; } @@ -227,35 +184,34 @@ message DeleteProjectResponse { Project project = 1; } -message GetResourcesRequest { +message GetProvidersRequest { string project_id = 1; } -message EnumeratedResource { - resource.Resource resource = 1; +message EnumeratedProvider { + graph.Node provider = 1; repeated graph.Node nodes = 2; - ResourceInfo info = 3; + ProviderInfo info = 3; } -message ResourceInfo { - ResourceState state = 1; +message ProviderInfo { + ProviderState state = 1; string error = 2; } -enum ResourceState { +enum ProviderState { UNKNOWN = 0; READY = 1; ERROR = 2; } -message GetResourcesResponse { - repeated EnumeratedResource resources = 1; +message GetProvidersResponse { + repeated EnumeratedProvider providers = 1; } message SaveProjectRequest { string project_id = 1; graph.Graph graph = 2; - repeated resource.Resource resources = 3; } message SaveProjectResponse { diff --git a/proto/reason/reason.proto b/proto/reason/reason.proto new file mode 100644 index 0000000..6e771e5 --- /dev/null +++ b/proto/reason/reason.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package reason; +option go_package = "reason"; + +message Prompt { + string prompt = 1; +} + +message Engine { + +} + +message Reason { + oneof type { + Prompt prompt = 1; + Engine engine = 2; + } +} diff --git a/proto/resource.proto b/proto/resource.proto deleted file mode 100644 index ebfca0f..0000000 --- a/proto/resource.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; - -package resource; -option go_package = "resource"; - -import "block.proto"; -import "google/protobuf/descriptor.proto"; - -enum Runtime { - NODEJS = 0; - PYTHON = 1; - GO = 2; -} - -message Resource { - string id = 1; - string name = 2; - // dependencies are the ids of other resources - repeated string dependencies = 3; - oneof type { - GRPCService grpc_service = 4; - RESTService rest_service = 5; - DocStore doc_store = 6; - FileStore file_store = 7; - LanguageService language_service = 8; - ConfigProvider config_provider = 9; - SecretStore secret_store = 10; - ReasoningEngine reasoning_engine = 11; - HTTPRouter http_router = 12; - TemplateService template_service = 13; - } -} - -message TemplateService { -} - -message HTTPRouter { - string root = 1; -} - -message ReasoningEngine { -} - -message SecretStore { - string url = 1; -} - -message ConfigProvider {} - -message CodeConfig { - string path = 1; - string containerURI = 2; -} - -message LanguageService { - Runtime runtime = 1; - GRPCService grpc = 2; - CodeConfig code_config = 3; -} - -message GRPCService { - string host = 1; -} - -message RESTService { - string base_url = 1; -} - -message DocStore { - string url = 1; -} - -message FileStore { - string url = 1; -} - diff --git a/proto/storage/storage.proto b/proto/storage/storage.proto new file mode 100644 index 0000000..dfb2ac6 --- /dev/null +++ b/proto/storage/storage.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package storage; +option go_package = "storage"; + +// TODO breadchris add storage type that supports SQL + +message Collection { + string name = 1; +} + +message Query { + string query = 1; +} + +message Document { + oneof type { + Collection collection = 1; + Query query = 2; + } +} + +message Folder { + string url = 1; +} + +message File { + string path = 1; +} + +message Storage { + oneof type { + Document document = 1; + Folder folder = 2; + File file = 3; + } +} \ No newline at end of file diff --git a/studio/src/rpc/code/code_pb.ts b/studio/src/rpc/code/code_pb.ts new file mode 100644 index 0000000..ee6e672 --- /dev/null +++ b/studio/src/rpc/code/code_pb.ts @@ -0,0 +1,167 @@ +// @generated by protoc-gen-es v1.2.1 with parameter "target=ts" +// @generated from file code/code.proto (package code, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import { Server as Server$1 } from "../grpc/grpc_pb.js"; + +/** + * @generated from enum code.Runtime + */ +export enum Runtime { + /** + * @generated from enum value: NODEJS = 0; + */ + NODEJS = 0, + + /** + * @generated from enum value: PYTHON = 1; + */ + PYTHON = 1, + + /** + * @generated from enum value: GO = 2; + */ + GO = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(Runtime) +proto3.util.setEnumType(Runtime, "code.Runtime", [ + { no: 0, name: "NODEJS" }, + { no: 1, name: "PYTHON" }, + { no: 2, name: "GO" }, +]); + +/** + * @generated from message code.Function + */ +export class Function extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "code.Function"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Function { + return new Function().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Function { + return new Function().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Function { + return new Function().fromJsonString(jsonString, options); + } + + static equals(a: Function | PlainMessage | undefined, b: Function | PlainMessage | undefined): boolean { + return proto3.util.equals(Function, a, b); + } +} + +/** + * @generated from message code.Server + */ +export class Server extends Message { + /** + * @generated from field: code.Runtime runtime = 1; + */ + runtime = Runtime.NODEJS; + + /** + * @generated from field: grpc.Server grpc = 2; + */ + grpc?: Server$1; + + /** + * string containerURI = 4; + * + * @generated from field: string path = 3; + */ + path = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "code.Server"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "runtime", kind: "enum", T: proto3.getEnumType(Runtime) }, + { no: 2, name: "grpc", kind: "message", T: Server$1 }, + { no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Server { + return new Server().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Server { + return new Server().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Server { + return new Server().fromJsonString(jsonString, options); + } + + static equals(a: Server | PlainMessage | undefined, b: Server | PlainMessage | undefined): boolean { + return proto3.util.equals(Server, a, b); + } +} + +/** + * @generated from message code.Code + */ +export class Code extends Message { + /** + * @generated from oneof code.Code.type + */ + type: { + /** + * @generated from field: code.Function function = 1; + */ + value: Function; + case: "function"; + } | { + /** + * @generated from field: code.Server server = 2; + */ + value: Server; + case: "server"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "code.Code"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "function", kind: "message", T: Function, oneof: "type" }, + { no: 2, name: "server", kind: "message", T: Server, oneof: "type" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Code { + return new Code().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Code { + return new Code().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Code { + return new Code().fromJsonString(jsonString, options); + } + + static equals(a: Code | PlainMessage | undefined, b: Code | PlainMessage | undefined): boolean { + return proto3.util.equals(Code, a, b); + } +} + diff --git a/studio/src/rpc/data/data_pb.ts b/studio/src/rpc/data/data_pb.ts new file mode 100644 index 0000000..85471e5 --- /dev/null +++ b/studio/src/rpc/data/data_pb.ts @@ -0,0 +1,137 @@ +// @generated by protoc-gen-es v1.2.1 with parameter "target=ts" +// @generated from file data/data.proto (package data, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message data.Input + */ +export class Input extends Message { + /** + * @generated from field: string value = 1; + */ + value = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "data.Input"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Input { + return new Input().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Input { + return new Input().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Input { + return new Input().fromJsonString(jsonString, options); + } + + static equals(a: Input | PlainMessage | undefined, b: Input | PlainMessage | undefined): boolean { + return proto3.util.equals(Input, a, b); + } +} + +/** + * TODO breadchris do we need an explicit provider for config? probably + * + * @generated from message data.Config + */ +export class Config extends Message { + /** + * TODO breadchris configs could have a type + * google.protobuf.DescriptorProto type = 1; + * + * @generated from field: string value = 1; + */ + value = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "data.Config"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Config { + return new Config().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Config { + return new Config().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Config { + return new Config().fromJsonString(jsonString, options); + } + + static equals(a: Config | PlainMessage | undefined, b: Config | PlainMessage | undefined): boolean { + return proto3.util.equals(Config, a, b); + } +} + +/** + * @generated from message data.Data + */ +export class Data extends Message { + /** + * @generated from oneof data.Data.type + */ + type: { + /** + * @generated from field: data.Input input = 1; + */ + value: Input; + case: "input"; + } | { + /** + * @generated from field: data.Config config = 2; + */ + value: Config; + case: "config"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "data.Data"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "input", kind: "message", T: Input, oneof: "type" }, + { no: 2, name: "config", kind: "message", T: Config, oneof: "type" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Data { + return new Data().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Data { + return new Data().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Data { + return new Data().fromJsonString(jsonString, options); + } + + static equals(a: Data | PlainMessage | undefined, b: Data | PlainMessage | undefined): boolean { + return proto3.util.equals(Data, a, b); + } +} + diff --git a/studio/src/rpc/graph_pb.ts b/studio/src/rpc/graph_pb.ts index 6b7fccc..f3ea813 100644 --- a/studio/src/rpc/graph_pb.ts +++ b/studio/src/rpc/graph_pb.ts @@ -5,31 +5,24 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import { Bucket, Collection, Config, File, Function, GRPC, Input, Prompt, Query, REST, Route, Secret, Template } from "./block_pb.js"; +import { Data } from "./data/data_pb.js"; +import { Reason } from "./reason/reason_pb.js"; +import { GRPC } from "./grpc/grpc_pb.js"; +import { HTTP } from "./http/http_pb.js"; +import { Storage } from "./storage/storage_pb.js"; +import { Code } from "./code/code_pb.js"; /** * @generated from message graph.Graph */ export class Graph extends Message { /** - * TODO breadchris get rid of id and name, they are not needed - * - * @generated from field: string id = 1; - */ - id = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: repeated graph.Node nodes = 3; + * @generated from field: repeated graph.Node nodes = 1; */ nodes: Node[] = []; /** - * @generated from field: repeated graph.Edge edges = 4; + * @generated from field: repeated graph.Edge edges = 2; */ edges: Edge[] = []; @@ -41,10 +34,8 @@ export class Graph extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "graph.Graph"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "nodes", kind: "message", T: Node, repeated: true }, - { no: 4, name: "edges", kind: "message", T: Edge, repeated: true }, + { no: 1, name: "nodes", kind: "message", T: Node, repeated: true }, + { no: 2, name: "edges", kind: "message", T: Edge, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Graph { @@ -89,91 +80,44 @@ export class Node extends Message { y = 0; /** - * @generated from field: string resource_id = 6; + * @generated from oneof graph.Node.type */ - resourceId = ""; - - /** - * @generated from oneof graph.Node.config - */ - config: { - /** - * @generated from field: block.REST rest = 7; - */ - value: REST; - case: "rest"; - } | { - /** - * @generated from field: block.GRPC grpc = 8; - */ - value: GRPC; - case: "grpc"; - } | { - /** - * @generated from field: block.Collection collection = 9; - */ - value: Collection; - case: "collection"; - } | { - /** - * @generated from field: block.Bucket bucket = 10; - */ - value: Bucket; - case: "bucket"; - } | { - /** - * @generated from field: block.Input input = 11; - */ - value: Input; - case: "input"; - } | { - /** - * @generated from field: block.Function function = 12; - */ - value: Function; - case: "function"; - } | { + type: { /** - * @generated from field: block.Query query = 13; + * @generated from field: data.Data data = 7; */ - value: Query; - case: "query"; + value: Data; + case: "data"; } | { /** - * @generated from field: block.Prompt prompt = 14; + * @generated from field: reason.Reason reason = 8; */ - value: Prompt; - case: "prompt"; + value: Reason; + case: "reason"; } | { /** - * @generated from field: block.Config configuration = 15; + * @generated from field: grpc.GRPC grpc = 9; */ - value: Config; - case: "configuration"; - } | { - /** - * @generated from field: block.Route route = 16; - */ - value: Route; - case: "route"; + value: GRPC; + case: "grpc"; } | { /** - * @generated from field: block.Template template = 17; + * @generated from field: http.HTTP http = 10; */ - value: Template; - case: "template"; + value: HTTP; + case: "http"; } | { /** - * @generated from field: block.Secret secret = 18; + * @generated from field: storage.Storage storage = 11; */ - value: Secret; - case: "secret"; + value: Storage; + case: "storage"; } | { /** - * @generated from field: block.File file = 19; + * @generated from field: code.Code code = 12; */ - value: File; - case: "file"; + value: Code; + case: "code"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -188,20 +132,12 @@ export class Node extends Message { { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "x", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, { no: 5, name: "y", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, - { no: 6, name: "resource_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "rest", kind: "message", T: REST, oneof: "config" }, - { no: 8, name: "grpc", kind: "message", T: GRPC, oneof: "config" }, - { no: 9, name: "collection", kind: "message", T: Collection, oneof: "config" }, - { no: 10, name: "bucket", kind: "message", T: Bucket, oneof: "config" }, - { no: 11, name: "input", kind: "message", T: Input, oneof: "config" }, - { no: 12, name: "function", kind: "message", T: Function, oneof: "config" }, - { no: 13, name: "query", kind: "message", T: Query, oneof: "config" }, - { no: 14, name: "prompt", kind: "message", T: Prompt, oneof: "config" }, - { no: 15, name: "configuration", kind: "message", T: Config, oneof: "config" }, - { no: 16, name: "route", kind: "message", T: Route, oneof: "config" }, - { no: 17, name: "template", kind: "message", T: Template, oneof: "config" }, - { no: 18, name: "secret", kind: "message", T: Secret, oneof: "config" }, - { no: 19, name: "file", kind: "message", T: File, oneof: "config" }, + { no: 7, name: "data", kind: "message", T: Data, oneof: "type" }, + { no: 8, name: "reason", kind: "message", T: Reason, oneof: "type" }, + { no: 9, name: "grpc", kind: "message", T: GRPC, oneof: "type" }, + { no: 10, name: "http", kind: "message", T: HTTP, oneof: "type" }, + { no: 11, name: "storage", kind: "message", T: Storage, oneof: "type" }, + { no: 12, name: "code", kind: "message", T: Code, oneof: "type" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Node { @@ -258,6 +194,37 @@ export class CodeAdapter extends Message { } } +/** + * @generated from message graph.Provides + */ +export class Provides extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "graph.Provides"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Provides { + return new Provides().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Provides { + return new Provides().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Provides { + return new Provides().fromJsonString(jsonString, options); + } + + static equals(a: Provides | PlainMessage | undefined, b: Provides | PlainMessage | undefined): boolean { + return proto3.util.equals(Provides, a, b); + } +} + /** * @generated from message graph.Edge */ @@ -278,14 +245,20 @@ export class Edge extends Message { to = ""; /** - * @generated from oneof graph.Edge.config + * @generated from oneof graph.Edge.type */ - config: { + type: { /** * @generated from field: graph.CodeAdapter code_adapter = 4; */ value: CodeAdapter; case: "codeAdapter"; + } | { + /** + * @generated from field: graph.Provides provides = 5; + */ + value: Provides; + case: "provides"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -299,7 +272,8 @@ export class Edge extends Message { { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "from", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "to", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "code_adapter", kind: "message", T: CodeAdapter, oneof: "config" }, + { no: 4, name: "code_adapter", kind: "message", T: CodeAdapter, oneof: "type" }, + { no: 5, name: "provides", kind: "message", T: Provides, oneof: "type" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Edge { diff --git a/studio/src/rpc/grpc/grpc_pb.ts b/studio/src/rpc/grpc/grpc_pb.ts new file mode 100644 index 0000000..d330977 --- /dev/null +++ b/studio/src/rpc/grpc/grpc_pb.ts @@ -0,0 +1,144 @@ +// @generated by protoc-gen-es v1.2.1 with parameter "target=ts" +// @generated from file grpc/grpc.proto (package grpc, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message grpc.Method + */ +export class Method extends Message { + /** + * @generated from field: string package = 1; + */ + package = ""; + + /** + * @generated from field: string service = 2; + */ + service = ""; + + /** + * @generated from field: string method = 3; + */ + method = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "grpc.Method"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "package", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "service", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Method { + return new Method().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Method { + return new Method().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Method { + return new Method().fromJsonString(jsonString, options); + } + + static equals(a: Method | PlainMessage | undefined, b: Method | PlainMessage | undefined): boolean { + return proto3.util.equals(Method, a, b); + } +} + +/** + * @generated from message grpc.Server + */ +export class Server extends Message { + /** + * @generated from field: string host = 1; + */ + host = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "grpc.Server"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "host", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Server { + return new Server().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Server { + return new Server().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Server { + return new Server().fromJsonString(jsonString, options); + } + + static equals(a: Server | PlainMessage | undefined, b: Server | PlainMessage | undefined): boolean { + return proto3.util.equals(Server, a, b); + } +} + +/** + * @generated from message grpc.GRPC + */ +export class GRPC extends Message { + /** + * @generated from oneof grpc.GRPC.type + */ + type: { + /** + * @generated from field: grpc.Method method = 1; + */ + value: Method; + case: "method"; + } | { + /** + * @generated from field: grpc.Server server = 2; + */ + value: Server; + case: "server"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "grpc.GRPC"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "method", kind: "message", T: Method, oneof: "type" }, + { no: 2, name: "server", kind: "message", T: Server, oneof: "type" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GRPC { + return new GRPC().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GRPC { + return new GRPC().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GRPC { + return new GRPC().fromJsonString(jsonString, options); + } + + static equals(a: GRPC | PlainMessage | undefined, b: GRPC | PlainMessage | undefined): boolean { + return proto3.util.equals(GRPC, a, b); + } +} + diff --git a/studio/src/rpc/http/http_pb.ts b/studio/src/rpc/http/http_pb.ts new file mode 100644 index 0000000..c44298d --- /dev/null +++ b/studio/src/rpc/http/http_pb.ts @@ -0,0 +1,323 @@ +// @generated by protoc-gen-es v1.2.1 with parameter "target=ts" +// @generated from file http/http.proto (package http, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message http.Header + */ +export class Header extends Message
{ + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: string value = 2; + */ + value = ""; + + constructor(data?: PartialMessage
) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "http.Header"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Header { + return new Header().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Header { + return new Header().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Header { + return new Header().fromJsonString(jsonString, options); + } + + static equals(a: Header | PlainMessage
| undefined, b: Header | PlainMessage
| undefined): boolean { + return proto3.util.equals(Header, a, b); + } +} + +/** + * @generated from message http.Request + */ +export class Request extends Message { + /** + * @generated from field: string method = 1; + */ + method = ""; + + /** + * @generated from field: string url = 2; + */ + url = ""; + + /** + * @generated from field: repeated http.Header headers = 3; + */ + headers: Header[] = []; + + /** + * @generated from field: bytes body = 4; + */ + body = new Uint8Array(0); + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "http.Request"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "headers", kind: "message", T: Header, repeated: true }, + { no: 4, name: "body", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Request { + return new Request().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Request { + return new Request().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Request { + return new Request().fromJsonString(jsonString, options); + } + + static equals(a: Request | PlainMessage | undefined, b: Request | PlainMessage | undefined): boolean { + return proto3.util.equals(Request, a, b); + } +} + +/** + * @generated from message http.Response + */ +export class Response extends Message { + /** + * @generated from field: repeated http.Header headers = 1; + */ + headers: Header[] = []; + + /** + * @generated from field: bytes body = 2; + */ + body = new Uint8Array(0); + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "http.Response"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "headers", kind: "message", T: Header, repeated: true }, + { no: 2, name: "body", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Response { + return new Response().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Response { + return new Response().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Response { + return new Response().fromJsonString(jsonString, options); + } + + static equals(a: Response | PlainMessage | undefined, b: Response | PlainMessage | undefined): boolean { + return proto3.util.equals(Response, a, b); + } +} + +/** + * @generated from message http.Route + */ +export class Route extends Message { + /** + * @generated from field: string path = 1; + */ + path = ""; + + /** + * @generated from field: string method = 2; + */ + method = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "http.Route"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Route { + return new Route().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Route { + return new Route().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Route { + return new Route().fromJsonString(jsonString, options); + } + + static equals(a: Route | PlainMessage | undefined, b: Route | PlainMessage | undefined): boolean { + return proto3.util.equals(Route, a, b); + } +} + +/** + * @generated from message http.Template + */ +export class Template extends Message