From b8b6853909181fe164f12713fb28afc6f2ab257b Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 24 Nov 2020 10:55:52 -0800 Subject: [PATCH 01/80] feat: added total results counts to list requests. This simplifies client logic for determining resource counts --- api/api.swagger.json | 12 + api/workflow.pb.go | 633 +++++++++++++++-------------- api/workflow.proto | 1 + api/workflow_template.pb.go | 311 +++++++------- api/workflow_template.proto | 1 + api/workspace.pb.go | 303 +++++++------- api/workspace.proto | 1 + pkg/workflow_template.go | 66 +-- server/workflow_server.go | 16 +- server/workflow_template_server.go | 16 +- server/workspace_server.go | 16 +- 11 files changed, 731 insertions(+), 645 deletions(-) diff --git a/api/api.swagger.json b/api/api.swagger.json index 062e9971..64a199ac 100644 --- a/api/api.swagger.json +++ b/api/api.swagger.json @@ -3361,6 +3361,10 @@ "totalCount": { "type": "integer", "format": "int32" + }, + "totalAvailableCount": { + "type": "integer", + "format": "int32" } } }, @@ -3403,6 +3407,10 @@ "totalCount": { "type": "integer", "format": "int32" + }, + "totalAvailableCount": { + "type": "integer", + "format": "int32" } } }, @@ -3430,6 +3438,10 @@ "totalCount": { "type": "integer", "format": "int32" + }, + "totalAvailableCount": { + "type": "integer", + "format": "int32" } } }, diff --git a/api/workflow.pb.go b/api/workflow.pb.go index 797276f9..3de829b2 100644 --- a/api/workflow.pb.go +++ b/api/workflow.pb.go @@ -792,11 +792,12 @@ type ListWorkflowExecutionsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkflowExecutions []*WorkflowExecution `protobuf:"bytes,2,rep,name=workflowExecutions,proto3" json:"workflowExecutions,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkflowExecutions []*WorkflowExecution `protobuf:"bytes,2,rep,name=workflowExecutions,proto3" json:"workflowExecutions,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` } func (x *ListWorkflowExecutionsResponse) Reset() { @@ -866,6 +867,13 @@ func (x *ListWorkflowExecutionsResponse) GetTotalCount() int32 { return 0 } +func (x *ListWorkflowExecutionsResponse) GetTotalAvailableCount() int32 { + if x != nil { + return x.TotalAvailableCount + } + return 0 +} + type LogEntry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2098,7 +2106,7 @@ var file_workflow_proto_rawDesc = []byte{ 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xc8, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xfa, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, @@ -2111,331 +2119,334 @@ var file_workflow_proto_rawDesc = []byte{ 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x42, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x22, 0xc4, 0x03, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, - 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, - 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x12, 0x30, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xc4, 0x03, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, + 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x26, 0x0a, 0x10, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xc4, 0x01, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, + 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x56, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2e, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, + 0x87, 0x01, 0x0a, 0x24, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x51, 0x0a, 0x31, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x0c, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x26, 0x0a, 0x10, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xc4, 0x01, 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, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, - 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x56, 0x0a, 0x10, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, - 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x87, 0x01, - 0x0a, 0x24, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x32, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, + 0x78, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x98, 0x01, 0x0a, 0x23, 0x41, 0x64, + 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x51, 0x0a, 0x31, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x32, 0x47, 0x65, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x78, 0x0a, - 0x21, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x98, 0x01, 0x0a, 0x23, 0x41, 0x64, 0x64, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x22, 0x7f, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x07, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x22, 0x4a, 0x0a, 0x21, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x32, - 0x81, 0x17, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x35, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x43, 0x6c, - 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x25, 0x0a, + 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x22, 0x7f, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x25, + 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x4a, 0x0a, 0x21, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x32, 0x81, 0x17, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0xdf, 0x01, - 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, - 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6e, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x16, + 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, + 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, 0x70, 0x69, + 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, - 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x16, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x74, 0x63, - 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x77, - 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x64, - 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, - 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2f, - 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, - 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0xdf, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x36, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, - 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0xa0, 0x01, - 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3e, 0x1a, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, - 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x6b, - 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x61, 0x70, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, + 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x99, 0x01, 0x0a, + 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, + 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, - 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x22, 0x3e, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, - 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xcd, 0x01, 0x0a, 0x23, 0x43, - 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5d, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x57, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, 0x0a, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xae, 0x01, 0x0a, 0x1d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x1b, - 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x3a, 0x01, 0x2a, 0x12, 0xbc, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, + 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, + 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3e, 0x1a, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, + 0x12, 0x46, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, + 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, + 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, + 0x22, 0x3e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xcd, 0x01, 0x0a, + 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, + 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xae, 0x01, 0x0a, + 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb6, 0x01, + 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x28, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x12, 0xbc, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/workflow.proto b/api/workflow.proto index 783c97fe..1f9d444f 100644 --- a/api/workflow.proto +++ b/api/workflow.proto @@ -201,6 +201,7 @@ message ListWorkflowExecutionsResponse { int32 page = 3; int32 pages = 4; int32 totalCount = 5; + int32 totalAvailableCount = 6; } message LogEntry { diff --git a/api/workflow_template.pb.go b/api/workflow_template.pb.go index f3471fea..2359331a 100644 --- a/api/workflow_template.pb.go +++ b/api/workflow_template.pb.go @@ -460,11 +460,12 @@ type ListWorkflowTemplatesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,2,rep,name=workflowTemplates,proto3" json:"workflowTemplates,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,2,rep,name=workflowTemplates,proto3" json:"workflowTemplates,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` } func (x *ListWorkflowTemplatesResponse) Reset() { @@ -534,6 +535,13 @@ func (x *ListWorkflowTemplatesResponse) GetTotalCount() int32 { return 0 } +func (x *ListWorkflowTemplatesResponse) GetTotalAvailableCount() int32 { + if x != nil { + return x.TotalAvailableCount + } + return 0 +} + type ArchiveWorkflowTemplateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1037,7 +1045,7 @@ var file_workflow_template_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xc4, 0x01, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xf6, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, @@ -1050,156 +1058,159 @@ var file_workflow_template_proto_rawDesc = []byte{ 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x50, 0x0a, 0x1e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x1f, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x50, 0x0a, 0x1e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xcc, 0x01, 0x0a, 0x20, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, - 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x22, 0x34, 0x0a, 0x1c, 0x43, 0x72, - 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x22, 0xd9, 0x03, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, - 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, 0x72, 0x63, - 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x41, - 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, - 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3b, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x09, 0x63, - 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x6e, 0x0a, 0x20, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xbb, 0x0a, 0x0a, - 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x1f, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xcc, 0x01, + 0x0a, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x22, 0x34, 0x0a, 0x1c, + 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x22, 0xd9, 0x03, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, + 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, + 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x6e, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xbb, + 0x0a, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x46, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x22, 0x4c, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x75, 0x69, + 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xd3, 0x01, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7d, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x22, 0x4c, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xd3, 0x01, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x7d, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, - 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, - 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, 0x01, 0x0a, - 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x95, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x8e, - 0x01, 0x12, 0x3f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x5a, 0x4b, 0x12, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, - 0xa8, 0x01, 0x0a, 0x17, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x1a, 0x3a, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, - 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, + 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x95, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x8e, 0x01, 0x12, 0x3f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x4b, 0x12, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, + 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, + 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/workflow_template.proto b/api/workflow_template.proto index 3a33b535..41cd06e1 100644 --- a/api/workflow_template.proto +++ b/api/workflow_template.proto @@ -105,6 +105,7 @@ message ListWorkflowTemplatesResponse { int32 page = 3; int32 pages = 4; int32 totalCount = 5; + int32 totalAvailableCount = 6; } message ArchiveWorkflowTemplateRequest { diff --git a/api/workspace.pb.go b/api/workspace.pb.go index aa68d43d..a9e7f0e3 100644 --- a/api/workspace.pb.go +++ b/api/workspace.pb.go @@ -675,11 +675,12 @@ type ListWorkspaceResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Workspaces []*Workspace `protobuf:"bytes,2,rep,name=workspaces,proto3" json:"workspaces,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Workspaces []*Workspace `protobuf:"bytes,2,rep,name=workspaces,proto3" json:"workspaces,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` } func (x *ListWorkspaceResponse) Reset() { @@ -749,6 +750,13 @@ func (x *ListWorkspaceResponse) GetTotalCount() int32 { return 0 } +func (x *ListWorkspaceResponse) GetTotalAvailableCount() int32 { + if x != nil { + return x.TotalAvailableCount + } + return 0 +} + type PauseWorkspaceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1324,7 +1332,7 @@ var file_workspace_proto_rawDesc = []byte{ 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, @@ -1334,155 +1342,158 @@ var file_workspace_proto_rawDesc = []byte{ 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x15, - 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, - 0x48, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, + 0x0a, 0x15, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xfe, 0x03, 0x0a, 0x18, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, + 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, + 0x61, 0x75, 0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x26, 0x0a, + 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, + 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, + 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x29, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xfe, 0x03, 0x0a, 0x18, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6c, - 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x72, - 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x75, - 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x75, - 0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, - 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x61, - 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, - 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, - 0x6e, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x29, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0xd7, 0x0a, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0f, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0xd7, 0x0a, 0x0a, 0x10, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, + 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0xbd, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x12, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x12, 0xbd, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, - 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x12, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x75, - 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, - 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3b, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x80, 0x01, - 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x2a, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, - 0x12, 0x7e, 0x0a, 0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x30, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, 0x73, 0x65, - 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x33, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, + 0x12, 0x75, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, - 0x73, 0x75, 0x6d, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2c, 0x2a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x12, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x61, 0x73, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, - 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x80, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x1a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0x7e, 0x0a, 0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x1a, 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, + 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x33, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, + 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x2a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, + 0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x61, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x32, 0x1a, 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/workspace.proto b/api/workspace.proto index 181eff0c..819a7dba 100644 --- a/api/workspace.proto +++ b/api/workspace.proto @@ -144,6 +144,7 @@ message ListWorkspaceResponse { int32 page = 3; int32 pages = 4; int32 totalCount = 5; + int32 totalAvailableCount = 6; } message PauseWorkspaceRequest { diff --git a/pkg/workflow_template.go b/pkg/workflow_template.go index ff7ed4be..fd163414 100644 --- a/pkg/workflow_template.go +++ b/pkg/workflow_template.go @@ -27,22 +27,27 @@ type WorkflowTemplateFilter struct { Labels []*Label } -// applyLabelSelectQuery returns a query builder that adds where statements to filter by labels in the request, -// if there are any -func applyLabelSelectQuery(sb sq.SelectBuilder, request *request.Request) sq.SelectBuilder { - if request.Filter != nil { - filter, ok := request.Filter.(WorkflowTemplateFilter) - if ok && len(filter.Labels) > 0 { - labelsJSON, err := LabelsToJSONString(filter.Labels) - if err != nil { - log.Printf("[error] %v", err) - } else { - sb = sb.Where("wt.labels @> ?", labelsJSON) - } - } +// GetLabels returns the labels in the filter +func (wt *WorkflowTemplateFilter) GetLabels() []*Label { + return wt.Labels +} + +func applyWorkflowTemplateFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) { + if !request.HasFilter() { + return sb, nil } - return sb + filter, ok := request.Filter.(WorkflowTemplateFilter) + if !ok { + return sb, nil + } + + sb, err := ApplyLabelSelectQuery("wt.labels", sb, &filter) + if err != nil { + return sb, err + } + + return sb, nil } // createWorkflowTemplateVersionDB inserts a record into workflow_template_versions using the current time accurate to nanoseconds @@ -414,14 +419,18 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe return } -func (c *Client) selectWorkflowTemplatesQuery(namespace string, request *request.Request) (sb sq.SelectBuilder) { +func (c *Client) selectWorkflowTemplatesQuery(namespace string, request *request.Request) (sb sq.SelectBuilder, err error) { sb = c.workflowTemplatesSelectBuilder(namespace). Column("COUNT(wtv.*) versions, MAX(wtv.id) workflow_template_version_id"). Join("workflow_template_versions wtv ON wtv.workflow_template_id = wt.id"). GroupBy("wt.id", "wt.created_at", "wt.uid", "wt.name", "wt.is_archived"). OrderBy("wt.created_at DESC") - sb = applyLabelSelectQuery(sb, request) + sb, err = applyWorkflowTemplateFilter(sb, request) + if err != nil { + return + } + sb = *request.ApplyPaginationToSelect(&sb) return @@ -432,11 +441,15 @@ func (c *Client) selectWorkflowTemplatesQuery(namespace string, request *request func (c *Client) selectWorkflowTemplatesDB(namespace string, request *request.Request) (workflowTemplates []*WorkflowTemplate, err error) { workflowTemplates = make([]*WorkflowTemplate, 0) - sb := c.selectWorkflowTemplatesQuery(namespace, request). - Where(sq.Eq{ - "wt.is_archived": false, - "wt.is_system": false, - }) + sb, err := c.selectWorkflowTemplatesQuery(namespace, request) + if err != nil { + return nil, err + } + + sb = sb.Where(sq.Eq{ + "wt.is_archived": false, + "wt.is_system": false, + }) err = c.DB.Selectx(&workflowTemplates, sb) @@ -448,7 +461,11 @@ func (c *Client) selectWorkflowTemplatesDB(namespace string, request *request.Re func (c *Client) selectAllWorkflowTemplatesDB(namespace string, request *request.Request) (workflowTemplates []*WorkflowTemplate, err error) { workflowTemplates = make([]*WorkflowTemplate, 0) - sb := c.selectWorkflowTemplatesQuery(namespace, request) + sb, err := c.selectWorkflowTemplatesQuery(namespace, request) + if err != nil { + return nil, err + } + err = c.DB.Selectx(&workflowTemplates, sb) return @@ -465,7 +482,10 @@ func (c *Client) CountWorkflowTemplates(namespace string, request *request.Reque "wt.is_system": false, }) - sb = applyLabelSelectQuery(sb, request) + sb, err = applyWorkflowTemplateFilter(sb, request) + if err != nil { + return 0, err + } err = sb.RunWith(c.DB). QueryRow(). diff --git a/server/workflow_server.go b/server/workflow_server.go index 7c4662de..bb9c5577 100644 --- a/server/workflow_server.go +++ b/server/workflow_server.go @@ -328,13 +328,19 @@ func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.Li return nil, err } + totalCount, err := client.CountWorkflowExecutions(req.Namespace, "", "", req.IncludeSystem, nil) + if err != nil { + return nil, err + } + paginator := resourceRequest.Pagination return &api.ListWorkflowExecutionsResponse{ - Count: int32(len(apiWorkflowExecutions)), - WorkflowExecutions: apiWorkflowExecutions, - Page: int32(paginator.Page), - Pages: paginator.CalculatePages(count), - TotalCount: int32(count), + Count: int32(len(apiWorkflowExecutions)), + WorkflowExecutions: apiWorkflowExecutions, + Page: int32(paginator.Page), + Pages: paginator.CalculatePages(count), + TotalCount: int32(count), + TotalAvailableCount: int32(totalCount), }, nil } diff --git a/server/workflow_template_server.go b/server/workflow_template_server.go index 417e7597..5c5003a8 100644 --- a/server/workflow_template_server.go +++ b/server/workflow_template_server.go @@ -206,13 +206,19 @@ func (s *WorkflowTemplateServer) ListWorkflowTemplates(ctx context.Context, req return nil, err } + totalCount, err := client.CountWorkflowTemplates(req.Namespace, nil) + if err != nil { + return nil, err + } + paginator := resourceRequest.Pagination return &api.ListWorkflowTemplatesResponse{ - Count: int32(len(apiWorkflowTemplates)), - WorkflowTemplates: apiWorkflowTemplates, - Page: int32(paginator.Page), - Pages: paginator.CalculatePages(count), - TotalCount: int32(count), + Count: int32(len(apiWorkflowTemplates)), + WorkflowTemplates: apiWorkflowTemplates, + Page: int32(paginator.Page), + Pages: paginator.CalculatePages(count), + TotalCount: int32(count), + TotalAvailableCount: int32(totalCount), }, nil } diff --git a/server/workspace_server.go b/server/workspace_server.go index 81652c65..df407263 100644 --- a/server/workspace_server.go +++ b/server/workspace_server.go @@ -252,13 +252,19 @@ func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorks return nil, err } + totalCount, err := client.CountWorkspaces(req.Namespace, nil) + if err != nil { + return nil, err + } + paginator := resourceRequest.Pagination return &api.ListWorkspaceResponse{ - Count: int32(len(apiWorkspaces)), - Workspaces: apiWorkspaces, - Page: int32(paginator.Page), - Pages: paginator.CalculatePages(count), - TotalCount: int32(count), + Count: int32(len(apiWorkspaces)), + Workspaces: apiWorkspaces, + Page: int32(paginator.Page), + Pages: paginator.CalculatePages(count), + TotalCount: int32(count), + TotalAvailableCount: int32(totalCount), }, nil } From f0436f084dd7a269269f3ec1ffbb671cf4c1ca27 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 25 Nov 2020 12:34:43 -0800 Subject: [PATCH 02/80] fix: added checks to workspace/workflow templates on creation to make sure they don't allow sys- prefixed names. Also updated workspace creation so that the workflow templates created by workspace templates have a sys- prefix. --- pkg/system.go | 16 ++++++++++++++++ pkg/workspace_template.go | 4 +++- server/server.go | 6 ++++++ server/workflow_template_server.go | 6 ++++++ server/workspace_template_server.go | 4 ++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pkg/system.go diff --git a/pkg/system.go b/pkg/system.go new file mode 100644 index 00000000..a75b00bb --- /dev/null +++ b/pkg/system.go @@ -0,0 +1,16 @@ +package v1 + +import ( + "github.com/onepanelio/core/pkg/util" + "google.golang.org/grpc/codes" +) + +// ConvertToSystemName converts a name to a system name by prefixing it with "sys-" +func ConvertToSystemName(name string) string { + return "sys-" + name +} + +// NameReservedForSystemError is an error returned whenever the user tries to use a name reserved for the system +func NameReservedForSystemError() error { + return &util.UserError{Code: codes.InvalidArgument, Message: "Names prefixed with 'sys-' are reserved by the system"} +} diff --git a/pkg/workspace_template.go b/pkg/workspace_template.go index ad0187b3..1a26d957 100644 --- a/pkg/workspace_template.go +++ b/pkg/workspace_template.go @@ -1000,8 +1000,10 @@ func (c *Client) generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate *Wo workflowTemplateManifest = strings.NewReplacer( "{{workspace.parameters.", "{{workflow.parameters.").Replace(workflowTemplateManifest) + // a workspace template's associated workflow template name should have a sys- prefix + // as it is system generated workflowTemplate = &WorkflowTemplate{ - Name: workspaceTemplate.Name, + Name: ConvertToSystemName(workspaceTemplate.Name), Manifest: workflowTemplateManifest, } diff --git a/server/server.go b/server/server.go index 6f52a2e4..eaaa8027 100644 --- a/server/server.go +++ b/server/server.go @@ -4,6 +4,7 @@ import ( "context" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/server/auth" + "strings" ) const ( @@ -13,3 +14,8 @@ const ( func getClient(ctx context.Context) *v1.Client { return ctx.Value(auth.ContextClientKey).(*v1.Client) } + +// IsNameReservedForSystem returns true if the name is reserved for the system +func IsNameReservedForSystem(name string) bool { + return strings.HasPrefix(name, "sys-") +} diff --git a/server/workflow_template_server.go b/server/workflow_template_server.go index 417e7597..a61c3525 100644 --- a/server/workflow_template_server.go +++ b/server/workflow_template_server.go @@ -50,6 +50,11 @@ func (s *WorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, req if err != nil || !allowed { return nil, err } + + if IsNameReservedForSystem(req.WorkflowTemplate.Name) { + return nil, v1.NameReservedForSystemError() + } + workflowTemplate := &v1.WorkflowTemplate{ Name: req.WorkflowTemplate.Name, Manifest: req.WorkflowTemplate.Manifest, @@ -59,6 +64,7 @@ func (s *WorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, req if err != nil { return nil, err } + req.WorkflowTemplate.Uid = workflowTemplate.UID req.WorkflowTemplate.Version = workflowTemplate.Version diff --git a/server/workspace_template_server.go b/server/workspace_template_server.go index 21c18017..d7ae8ed7 100644 --- a/server/workspace_template_server.go +++ b/server/workspace_template_server.go @@ -74,6 +74,10 @@ func (s *WorkspaceTemplateServer) CreateWorkspaceTemplate(ctx context.Context, r return nil, err } + if IsNameReservedForSystem(req.WorkspaceTemplate.Name) { + return nil, v1.NameReservedForSystemError() + } + workspaceTemplate := &v1.WorkspaceTemplate{ Namespace: req.Namespace, Name: req.WorkspaceTemplate.Name, From f6be3732a180674c2d68f060f52aac1f525ce2de Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 13:17:45 -0600 Subject: [PATCH 03/80] add migration for TFOD and CVAT --- db/data/20201130130433_tfod.yaml | 211 ++++++++++++++++++++++ db/data/20201130130725_cvat.yaml | 148 +++++++++++++++ db/go/20201130130433_update_tfod_patch.go | 31 ++++ db/go/20201130130725_update_cvat_patch.go | 28 +++ 4 files changed, 418 insertions(+) create mode 100644 db/data/20201130130433_tfod.yaml create mode 100644 db/data/20201130130725_cvat.yaml create mode 100644 db/go/20201130130433_update_tfod_patch.go create mode 100644 db/go/20201130130725_update_cvat_patch.go diff --git a/db/data/20201130130433_tfod.yaml b/db/data/20201130130433_tfod.yaml new file mode 100644 index 00000000..580f74fc --- /dev/null +++ b/db/data/20201130130433_tfod.yaml @@ -0,0 +1,211 @@ +arguments: + parameters: + - name: source + value: https://github.com/tensorflow/models.git + displayName: Model source code + type: hidden + visibility: private + + - name: trainingsource + value: https://github.com/onepanelio/cvat-training.git + type: hidden + visibility: private + + - name: revision + value: v1.13.0 + type: hidden + visibility: private + + - name: cvat-annotation-path + value: annotation-dump/sample_dataset + displayName: Dataset path + hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. + visibility: internal + + - name: cvat-output-path + value: workflow-data/output/sample_output + hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. + displayName: Workflow output path + visibility: internal + + - name: cvat-model + value: frcnn-res50-coco + displayName: Model + hint: TF Detection API's model to use for training. + type: select.select + visibility: public + options: + - name: 'Faster RCNN-ResNet 101-COCO' + value: frcnn-res101-coco + - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' + value: frcnn-res101-low + - name: 'Faster RCNN-ResNet 50-COCO' + value: frcnn-res50-coco + - name: 'Faster RCNN-NAS-COCO' + value: frcnn-nas-coco + - name: 'SSD MobileNet V1-COCO' + value: ssd-mobilenet-v1-coco2 + - name: 'SSD MobileNet V2-COCO' + value: ssd-mobilenet-v2-coco + - name: 'SSDLite MobileNet-COCO' + value: ssdlite-mobilenet-coco + + - name: hyperparameters + value: |- + num-steps=10000 + displayName: Hyperparameters + visibility: public + type: textarea.textarea + hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." + + - name: cvat-finetune-checkpoint + value: '' + hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. + displayName: Checkpoint path + visibility: public + + - name: cvat-num-classes + value: 81 + hint: Number of classes + displayName: Number of classes + visibility: internal + + - name: tf-image + value: tensorflow/tensorflow:1.13.1-py3 + type: select.select + displayName: Select TensorFlow image + visibility: public + hint: Select the GPU image if you are running on a GPU node pool + options: + - name: 'TensorFlow 1.13.1 CPU Image' + value: 'tensorflow/tensorflow:1.13.1-py3' + - name: 'TensorFlow 1.13.1 GPU Image' + value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + + - displayName: Node pool + hint: Name of node pool or group to run this workflow task + type: select.select + name: sys-node-pool + value: Standard_D4s_v3 + visibility: public + required: true + options: + - name: 'CPU: 2, RAM: 8GB' + value: Standard_D2s_v3 + - name: 'CPU: 4, RAM: 16GB' + value: Standard_D4s_v3 + - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' + value: Standard_NC6 + - name: dump-format + value: cvat_tfrecord + visibility: public +entrypoint: main +templates: +- dag: + tasks: + - name: train-model + template: tensorflow +# Uncomment the lines below if you want to send Slack notifications +# - arguments: +# artifacts: +# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}' +# name: metrics +# parameters: +# - name: status +# value: '{{tasks.train-model.status}}' +# dependencies: +# - train-model +# name: notify-in-slack +# template: slack-notify-success + name: main +- container: + args: + - | + apt-get update && \ + apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \ + pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \ + cd /mnt/src/tf/research && \ + export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim && \ + cd /mnt/src/train && \ + python convert_workflow.py \ + --extras="{{workflow.parameters.hyperparameters}}" \ + --model="{{workflow.parameters.cvat-model}}" \ + --num_classes="{{workflow.parameters.cvat-num-classes}}" \ + --sys_finetune_checkpoint={{workflow.parameters.cvat-finetune-checkpoint}} + command: + - sh + - -c + image: '{{workflow.parameters.tf-image}}' + volumeMounts: + - mountPath: /mnt/data + name: data + - mountPath: /mnt/output + name: output + workingDir: /mnt/src + nodeSelector: + beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}' + inputs: + artifacts: + - name: data + path: /mnt/data/datasets/ + s3: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' + - name: models + path: /mnt/data/models/ + optional: true + s3: + key: '{{workflow.parameters.cvat-finetune-checkpoint}}' + - git: + repo: '{{workflow.parameters.source}}' + revision: '{{workflow.parameters.revision}}' + name: src + path: /mnt/src/tf + - git: + repo: '{{workflow.parameters.trainingsource}}' + name: tsrc + path: /mnt/src/train + name: tensorflow + outputs: + artifacts: + - name: model + optional: true + path: /mnt/output + s3: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' +# Uncomment the lines below if you want to send Slack notifications +#- container: +# args: +# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}" +# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd +# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify +# command: +# - sh +# - -c +# image: technosophos/slack-notify +# inputs: +# artifacts: +# - name: metrics +# optional: true +# path: /tmp/metrics.json +# parameters: +# - name: status +# name: slack-notify-success +volumeClaimTemplates: +- metadata: + creationTimestamp: null + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi +- metadata: + creationTimestamp: null + name: output + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi diff --git a/db/data/20201130130725_cvat.yaml b/db/data/20201130130725_cvat.yaml new file mode 100644 index 00000000..901ccc5e --- /dev/null +++ b/db/data/20201130130725_cvat.yaml @@ -0,0 +1,148 @@ +# Workspace arguments +arguments: + parameters: + - name: sync-directory + displayName: Directory to sync raw input and training output + value: workflow-data + hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace. +containers: +- name: cvat-db + image: postgres:10-alpine + env: + - name: POSTGRES_USER + value: root + - name: POSTGRES_DB + value: cvat + - name: POSTGRES_HOST_AUTH_METHOD + value: trust + - name: PGDATA + value: /var/lib/psql/data + ports: + - containerPort: 5432 + name: tcp + volumeMounts: + - name: db + mountPath: /var/lib/psql +- name: cvat-redis + image: redis:4.0-alpine + ports: + - containerPort: 6379 + name: tcp +- name: cvat + image: onepanel/cvat:0.16.0_cvat.1.0.0 + env: + - name: DJANGO_MODWSGI_EXTRA_ARGS + value: "" + - name: ALLOWED_HOSTS + value: '*' + - name: CVAT_REDIS_HOST + value: localhost + - name: CVAT_POSTGRES_HOST + value: localhost + - name: CVAT_SHARE_URL + value: /home/django/data + - name: ONEPANEL_SYNC_DIRECTORY + value: '{{workspace.parameters.sync-directory}}' + - name: NVIDIA_VISIBLE_DEVICES + value: all + - name: NVIDIA_DRIVER_CAPABILITIES + value: compute,utility + - name: NVIDIA_REQUIRE_CUDA + value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411" + ports: + - containerPort: 8080 + name: http + volumeMounts: + - name: data + mountPath: /home/django/data + - name: keys + mountPath: /home/django/keys + - name: logs + mountPath: /home/django/logs + - name: models + mountPath: /home/django/models + - name: share + mountPath: /home/django/share + - name: sys-namespace-config + mountPath: /etc/onepanel + readOnly: true +- name: cvat-ui + image: onepanel/cvat-ui:0.14.0_cvat.1.0.0 + ports: + - containerPort: 80 + name: http +# You can add multiple FileSyncer sidecar containers if needed +- name: filesyncer + # Replace s3 with gcs if you are using GCS + image: onepanel/filesyncer:s3 + imagePullPolicy: Always + args: + - download + - -server-prefix=/sys/filesyncer + env: + - name: FS_PATH + value: /mnt/share + - name: FS_PREFIX + value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}' + volumeMounts: + - name: share + mountPath: /mnt/share + - name: sys-namespace-config + mountPath: /etc/onepanel + readOnly: true +ports: +- name: cvat-ui + port: 80 + protocol: TCP + targetPort: 80 +- name: cvat + port: 8080 + protocol: TCP + targetPort: 8080 +- name: fs + port: 8888 + protocol: TCP + targetPort: 8888 +routes: +- match: + - uri: + prefix: /sys/filesyncer + route: + - destination: + port: + number: 8888 +- match: + - uri: + regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.* + - queryParams: + id: + regex: \d+.* + route: + - destination: + port: + number: 8080 +- match: + - uri: + prefix: / + route: + - destination: + port: + number: 80 +# DAG Workflow to be executed once a Workspace action completes (optional) +# Uncomment the lines below if you want to send Slack notifications +#postExecutionWorkflow: +# entrypoint: main +# templates: +# - name: main +# dag: +# tasks: +# - name: slack-notify +# template: slack-notify +# - name: slack-notify +# container: +# image: technosophos/slack-notify +# args: +# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify +# command: +# - sh +# - -c diff --git a/db/go/20201130130433_update_tfod_patch.go b/db/go/20201130130433_update_tfod_patch.go new file mode 100644 index 00000000..3777c15e --- /dev/null +++ b/db/go/20201130130433_update_tfod_patch.go @@ -0,0 +1,31 @@ +package migrations + +import ( + "database/sql" + "github.com/pressly/goose" +) + +func initialize20201130130433() { + if _, ok := initializedMigrations[20201130130433]; !ok { + goose.AddMigration(Up20201130130433, Down20201130130433) + initializedMigrations[20201130130433] = true + } +} + + +func Up20201130130433(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkflowTemplateManifest( + "20201130130433_tfod.yaml", + tfodWorkflowTemplateName, + map[string]string{ + "used-by": "cvat", + }, + ) +} + + +func Down20201130130433(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return nil +} diff --git a/db/go/20201130130725_update_cvat_patch.go b/db/go/20201130130725_update_cvat_patch.go new file mode 100644 index 00000000..fbe8519c --- /dev/null +++ b/db/go/20201130130725_update_cvat_patch.go @@ -0,0 +1,28 @@ +package migrations + +import ( + "database/sql" + "github.com/pressly/goose" +) + + +func initialize20201130130725() { + if _, ok := initializedMigrations[20201130130725]; !ok { + goose.AddMigration(Up20201130130725, 20201130130725) + initializedMigrations[20201130130725] = true + } +} + + +func Up20201130130725(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkspaceTemplateManifest("20201130130725_cvat.yaml", cvatTemplateName) +} + +//Down20201113094916 updates CVAT back to previous python-sdk version of 0.14.0 +func Down20201130130725(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return updateWorkspaceTemplateManifest("20201130130725_cvat.yaml", cvatTemplateName) +} + + From 59492c021dcdf0e4cc0a3e6e180a337d2ede59ac Mon Sep 17 00:00:00 2001 From: Rush Tehrani Date: Mon, 30 Nov 2020 11:18:11 -0800 Subject: [PATCH 04/80] chore: Add issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 35 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..b04eb8d5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**`opctl` version** +```bash +$ opctl version + +CLI version: v0.16.0-rc.0 +Manifest version: v0.16.0-rc.0 +API version: v0.16.0-rc.0 +Web UI version: v0.16.0-rc.0 +``` + +**`opctl init` command** +You can find this at the top of your `params.yaml` file. [e.g. `opctl init --provider eks --artifact-repository-provider s3 --gpu-device-plugins nvidia`] + +**Kubernetes information** + - Cloud provider: [e.g. AKS, EKS, GKE, Microk8s] + - Kubernetes version: [e.g. 1.17.13] + +**Machine information** +- OS: [e.g. Ubuntu 18.04, Windows 10 19042.631, macOS 10.14.6] +- Browser: [e.g. Chrome, Firefox, Safari] + +**Screenshots** +If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..02145855 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 2366cbce016ca3c6378e774fb643019841d31507 Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 13:45:15 -0600 Subject: [PATCH 05/80] add migration in db and add comments --- db/data/20201130130725_cvat.yaml | 148 ---------------------- db/go/20201130130433_update_tfod_patch.go | 4 +- db/go/20201130130725_update_cvat_patch.go | 28 ---- db/go/db.go | 1 + 4 files changed, 3 insertions(+), 178 deletions(-) delete mode 100644 db/data/20201130130725_cvat.yaml delete mode 100644 db/go/20201130130725_update_cvat_patch.go diff --git a/db/data/20201130130725_cvat.yaml b/db/data/20201130130725_cvat.yaml deleted file mode 100644 index 901ccc5e..00000000 --- a/db/data/20201130130725_cvat.yaml +++ /dev/null @@ -1,148 +0,0 @@ -# Workspace arguments -arguments: - parameters: - - name: sync-directory - displayName: Directory to sync raw input and training output - value: workflow-data - hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace. -containers: -- name: cvat-db - image: postgres:10-alpine - env: - - name: POSTGRES_USER - value: root - - name: POSTGRES_DB - value: cvat - - name: POSTGRES_HOST_AUTH_METHOD - value: trust - - name: PGDATA - value: /var/lib/psql/data - ports: - - containerPort: 5432 - name: tcp - volumeMounts: - - name: db - mountPath: /var/lib/psql -- name: cvat-redis - image: redis:4.0-alpine - ports: - - containerPort: 6379 - name: tcp -- name: cvat - image: onepanel/cvat:0.16.0_cvat.1.0.0 - env: - - name: DJANGO_MODWSGI_EXTRA_ARGS - value: "" - - name: ALLOWED_HOSTS - value: '*' - - name: CVAT_REDIS_HOST - value: localhost - - name: CVAT_POSTGRES_HOST - value: localhost - - name: CVAT_SHARE_URL - value: /home/django/data - - name: ONEPANEL_SYNC_DIRECTORY - value: '{{workspace.parameters.sync-directory}}' - - name: NVIDIA_VISIBLE_DEVICES - value: all - - name: NVIDIA_DRIVER_CAPABILITIES - value: compute,utility - - name: NVIDIA_REQUIRE_CUDA - value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411" - ports: - - containerPort: 8080 - name: http - volumeMounts: - - name: data - mountPath: /home/django/data - - name: keys - mountPath: /home/django/keys - - name: logs - mountPath: /home/django/logs - - name: models - mountPath: /home/django/models - - name: share - mountPath: /home/django/share - - name: sys-namespace-config - mountPath: /etc/onepanel - readOnly: true -- name: cvat-ui - image: onepanel/cvat-ui:0.14.0_cvat.1.0.0 - ports: - - containerPort: 80 - name: http -# You can add multiple FileSyncer sidecar containers if needed -- name: filesyncer - # Replace s3 with gcs if you are using GCS - image: onepanel/filesyncer:s3 - imagePullPolicy: Always - args: - - download - - -server-prefix=/sys/filesyncer - env: - - name: FS_PATH - value: /mnt/share - - name: FS_PREFIX - value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}' - volumeMounts: - - name: share - mountPath: /mnt/share - - name: sys-namespace-config - mountPath: /etc/onepanel - readOnly: true -ports: -- name: cvat-ui - port: 80 - protocol: TCP - targetPort: 80 -- name: cvat - port: 8080 - protocol: TCP - targetPort: 8080 -- name: fs - port: 8888 - protocol: TCP - targetPort: 8888 -routes: -- match: - - uri: - prefix: /sys/filesyncer - route: - - destination: - port: - number: 8888 -- match: - - uri: - regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.* - - queryParams: - id: - regex: \d+.* - route: - - destination: - port: - number: 8080 -- match: - - uri: - prefix: / - route: - - destination: - port: - number: 80 -# DAG Workflow to be executed once a Workspace action completes (optional) -# Uncomment the lines below if you want to send Slack notifications -#postExecutionWorkflow: -# entrypoint: main -# templates: -# - name: main -# dag: -# tasks: -# - name: slack-notify -# template: slack-notify -# - name: slack-notify -# container: -# image: technosophos/slack-notify -# args: -# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify -# command: -# - sh -# - -c diff --git a/db/go/20201130130433_update_tfod_patch.go b/db/go/20201130130433_update_tfod_patch.go index 3777c15e..41b787fb 100644 --- a/db/go/20201130130433_update_tfod_patch.go +++ b/db/go/20201130130433_update_tfod_patch.go @@ -12,7 +12,7 @@ func initialize20201130130433() { } } - +//Up20201130130433 remove namespace to resolve checkpoint path issue func Up20201130130433(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -24,7 +24,7 @@ func Up20201130130433(tx *sql.Tx) error { ) } - +//Down20201130130433 do nothing func Down20201130130433(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return nil diff --git a/db/go/20201130130725_update_cvat_patch.go b/db/go/20201130130725_update_cvat_patch.go deleted file mode 100644 index fbe8519c..00000000 --- a/db/go/20201130130725_update_cvat_patch.go +++ /dev/null @@ -1,28 +0,0 @@ -package migrations - -import ( - "database/sql" - "github.com/pressly/goose" -) - - -func initialize20201130130725() { - if _, ok := initializedMigrations[20201130130725]; !ok { - goose.AddMigration(Up20201130130725, 20201130130725) - initializedMigrations[20201130130725] = true - } -} - - -func Up20201130130725(tx *sql.Tx) error { - // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201130130725_cvat.yaml", cvatTemplateName) -} - -//Down20201113094916 updates CVAT back to previous python-sdk version of 0.14.0 -func Down20201130130725(tx *sql.Tx) error { - // This code is executed when the migration is rolled back. - return updateWorkspaceTemplateManifest("20201130130725_cvat.yaml", cvatTemplateName) -} - - diff --git a/db/go/db.go b/db/go/db.go index d41f0a8c..f1aa668d 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -72,6 +72,7 @@ func Initialize() { initialize20201115133046() initialize20201115134934() initialize20201115145814() + initialize20201130130433() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) From 83812bb68ccfe5aeeb3319ca3680a13af66af752 Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 13:58:59 -0600 Subject: [PATCH 06/80] update TFOD based on last migration --- db/data/20201130130433_tfod.yaml | 370 ++++++++++++++++--------------- 1 file changed, 190 insertions(+), 180 deletions(-) diff --git a/db/data/20201130130433_tfod.yaml b/db/data/20201130130433_tfod.yaml index 580f74fc..77df437b 100644 --- a/db/data/20201130130433_tfod.yaml +++ b/db/data/20201130130433_tfod.yaml @@ -1,177 +1,187 @@ +entrypoint: main arguments: parameters: - - name: source - value: https://github.com/tensorflow/models.git - displayName: Model source code - type: hidden - visibility: private + - name: source + value: https://github.com/tensorflow/models.git + displayName: Model source code + type: hidden + visibility: private - - name: trainingsource - value: https://github.com/onepanelio/cvat-training.git - type: hidden - visibility: private + - name: trainingsource + value: https://github.com/onepanelio/cvat-training.git + type: hidden + visibility: private - - name: revision - value: v1.13.0 - type: hidden - visibility: private + - name: revision + value: v1.13.0 + type: hidden + visibility: private - - name: cvat-annotation-path - value: annotation-dump/sample_dataset - displayName: Dataset path - hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. - visibility: internal + - name: cvat-annotation-path + value: annotation-dump/sample_dataset + displayName: Dataset path + hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. + visibility: private - - name: cvat-output-path - value: workflow-data/output/sample_output - hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. - displayName: Workflow output path - visibility: internal + - name: cvat-output-path + value: workflow-data/output/sample_output + hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. + displayName: Workflow output path + visibility: private - - name: cvat-model - value: frcnn-res50-coco - displayName: Model - hint: TF Detection API's model to use for training. - type: select.select - visibility: public - options: - - name: 'Faster RCNN-ResNet 101-COCO' - value: frcnn-res101-coco - - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' - value: frcnn-res101-low - - name: 'Faster RCNN-ResNet 50-COCO' + - name: cvat-model value: frcnn-res50-coco - - name: 'Faster RCNN-NAS-COCO' - value: frcnn-nas-coco - - name: 'SSD MobileNet V1-COCO' - value: ssd-mobilenet-v1-coco2 - - name: 'SSD MobileNet V2-COCO' - value: ssd-mobilenet-v2-coco - - name: 'SSDLite MobileNet-COCO' - value: ssdlite-mobilenet-coco - - - name: hyperparameters - value: |- - num-steps=10000 - displayName: Hyperparameters - visibility: public - type: textarea.textarea - hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." - - - name: cvat-finetune-checkpoint - value: '' - hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. - displayName: Checkpoint path - visibility: public - - - name: cvat-num-classes - value: 81 - hint: Number of classes - displayName: Number of classes - visibility: internal + displayName: Model + hint: TF Detection API's model to use for training. + type: select.select + visibility: public + options: + - name: 'Faster RCNN-ResNet 101-COCO' + value: frcnn-res101-coco + - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' + value: frcnn-res101-low + - name: 'Faster RCNN-ResNet 50-COCO' + value: frcnn-res50-coco + - name: 'Faster RCNN-NAS-COCO' + value: frcnn-nas-coco + - name: 'SSD MobileNet V1-COCO' + value: ssd-mobilenet-v1-coco2 + - name: 'SSD MobileNet V2-COCO' + value: ssd-mobilenet-v2-coco + - name: 'SSDLite MobileNet-COCO' + value: ssdlite-mobilenet-coco + + - name: hyperparameters + value: |- + num-steps=10000 + displayName: Hyperparameters + visibility: public + type: textarea.textarea + hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." + + - name: cvat-finetune-checkpoint + value: '' + hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. + displayName: Checkpoint path + visibility: public - - name: tf-image - value: tensorflow/tensorflow:1.13.1-py3 - type: select.select - displayName: Select TensorFlow image - visibility: public - hint: Select the GPU image if you are running on a GPU node pool - options: - - name: 'TensorFlow 1.13.1 CPU Image' - value: 'tensorflow/tensorflow:1.13.1-py3' - - name: 'TensorFlow 1.13.1 GPU Image' - value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + - name: cvat-num-classes + value: '81' + hint: Number of classes + displayName: Number of classes + visibility: private - - displayName: Node pool - hint: Name of node pool or group to run this workflow task - type: select.select - name: sys-node-pool - value: Standard_D4s_v3 - visibility: public - required: true - options: - - name: 'CPU: 2, RAM: 8GB' - value: Standard_D2s_v3 - - name: 'CPU: 4, RAM: 16GB' + - name: tf-image + value: tensorflow/tensorflow:1.13.1-py3 + type: select.select + displayName: Select TensorFlow image + visibility: public + hint: Select the GPU image if you are running on a GPU node pool + options: + - name: 'TensorFlow 1.13.1 CPU Image' + value: 'tensorflow/tensorflow:1.13.1-py3' + - name: 'TensorFlow 1.13.1 GPU Image' + value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + + - displayName: Node pool + hint: Name of node pool or group to run this workflow task + type: select.select + name: sys-node-pool value: Standard_D4s_v3 - - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' - value: Standard_NC6 - - name: dump-format - value: cvat_tfrecord - visibility: public -entrypoint: main + visibility: public + required: true + options: + - name: 'CPU: 2, RAM: 8GB' + value: Standard_D2s_v3 + - name: 'CPU: 4, RAM: 16GB' + value: Standard_D4s_v3 + - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' + value: Standard_NC6 + - name: dump-format + value: cvat_tfrecord + visibility: public templates: -- dag: - tasks: - - name: train-model - template: tensorflow -# Uncomment the lines below if you want to send Slack notifications -# - arguments: -# artifacts: -# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}' -# name: metrics -# parameters: -# - name: status -# value: '{{tasks.train-model.status}}' -# dependencies: -# - train-model -# name: notify-in-slack -# template: slack-notify-success - name: main -- container: - args: - - | - apt-get update && \ - apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \ - pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \ - cd /mnt/src/tf/research && \ - export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim && \ - cd /mnt/src/train && \ - python convert_workflow.py \ - --extras="{{workflow.parameters.hyperparameters}}" \ - --model="{{workflow.parameters.cvat-model}}" \ - --num_classes="{{workflow.parameters.cvat-num-classes}}" \ - --sys_finetune_checkpoint={{workflow.parameters.cvat-finetune-checkpoint}} - command: - - sh - - -c - image: '{{workflow.parameters.tf-image}}' - volumeMounts: - - mountPath: /mnt/data - name: data - - mountPath: /mnt/output - name: output - workingDir: /mnt/src - nodeSelector: - beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}' - inputs: - artifacts: - - name: data - path: /mnt/data/datasets/ - s3: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' - - name: models - path: /mnt/data/models/ - optional: true - s3: - key: '{{workflow.parameters.cvat-finetune-checkpoint}}' - - git: - repo: '{{workflow.parameters.source}}' - revision: '{{workflow.parameters.revision}}' - name: src - path: /mnt/src/tf - - git: - repo: '{{workflow.parameters.trainingsource}}' - name: tsrc - path: /mnt/src/train - name: tensorflow - outputs: - artifacts: - - name: model - optional: true - path: /mnt/output - s3: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' + - name: main + dag: + tasks: + - name: train-model + template: tensorflow + # Uncomment the lines below if you want to send Slack notifications + # - arguments: + # artifacts: + # - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}' + # name: metrics + # parameters: + # - name: status + # value: '{{tasks.train-model.status}}' + # dependencies: + # - train-model + # name: notify-in-slack + # template: slack-notify-success + - name: tensorflow + container: + args: + - | + apt-get update && \ + apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \ + pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \ + cd /mnt/src/tf/research && \ + export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim && \ + cd /mnt/src/train && \ + python convert_workflow.py \ + --extras="{{workflow.parameters.hyperparameters}}" \ + --model="{{workflow.parameters.cvat-model}}" \ + --num_classes="{{workflow.parameters.cvat-num-classes}}" \ + --sys_finetune_checkpoint={{workflow.parameters.cvat-finetune-checkpoint}} + command: + - sh + - -c + image: '{{workflow.parameters.tf-image}}' + volumeMounts: + - mountPath: /mnt/data + name: data + - mountPath: /mnt/output + name: output + workingDir: /mnt/src + nodeSelector: + beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}' + sidecars: + - name: tensorboard + image: tensorflow/tensorflow:2.3.0 + command: [sh, -c] + tty: true + args: ["tensorboard --logdir /mnt/output/"] + ports: + - containerPort: 6006 + name: tensorboard + inputs: + artifacts: + - name: data + path: /mnt/data/datasets/ + {{.ArtifactRepositoryType}}: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' + - name: models + path: /mnt/data/models/ + optional: true + {{.ArtifactRepositoryType}}: + key: '{{workflow.parameters.cvat-finetune-checkpoint}}' + - git: + repo: '{{workflow.parameters.source}}' + revision: '{{workflow.parameters.revision}}' + name: src + path: /mnt/src/tf + - git: + repo: '{{workflow.parameters.trainingsource}}' + revision: 'optional-artifacts' + name: tsrc + path: /mnt/src/train + outputs: + artifacts: + - name: model + optional: true + path: /mnt/output + {{.ArtifactRepositoryType}}: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' # Uncomment the lines below if you want to send Slack notifications #- container: # args: @@ -191,21 +201,21 @@ templates: # - name: status # name: slack-notify-success volumeClaimTemplates: -- metadata: - creationTimestamp: null - name: data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi -- metadata: - creationTimestamp: null - name: output - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Gi + - metadata: + creationTimestamp: null + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi + - metadata: + creationTimestamp: null + name: output + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi From 72fa2f12700bbcbeadc0180119f98efad26c3305 Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 14:26:09 -0600 Subject: [PATCH 07/80] update template to the previous one --- db/data/20201130130433_tfod.yaml | 182 +++++++++++----------- db/go/20201130130433_update_tfod_patch.go | 10 +- 2 files changed, 99 insertions(+), 93 deletions(-) diff --git a/db/data/20201130130433_tfod.yaml b/db/data/20201130130433_tfod.yaml index 77df437b..7a50d061 100644 --- a/db/data/20201130130433_tfod.yaml +++ b/db/data/20201130130433_tfod.yaml @@ -1,105 +1,105 @@ entrypoint: main arguments: parameters: - - name: source - value: https://github.com/tensorflow/models.git - displayName: Model source code - type: hidden - visibility: private + - name: source + value: https://github.com/tensorflow/models.git + displayName: Model source code + type: hidden + visibility: private - - name: trainingsource - value: https://github.com/onepanelio/cvat-training.git - type: hidden - visibility: private + - name: trainingsource + value: https://github.com/onepanelio/cvat-training.git + type: hidden + visibility: private - - name: revision - value: v1.13.0 - type: hidden - visibility: private + - name: revision + value: v1.13.0 + type: hidden + visibility: private - - name: cvat-annotation-path - value: annotation-dump/sample_dataset - displayName: Dataset path - hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. - visibility: private + - name: cvat-annotation-path + value: annotation-dump/sample_dataset + displayName: Dataset path + hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. + visibility: private - - name: cvat-output-path - value: workflow-data/output/sample_output - hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. - displayName: Workflow output path - visibility: private + - name: cvat-output-path + value: workflow-data/output/sample_output + hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. + displayName: Workflow output path + visibility: private - - name: cvat-model - value: frcnn-res50-coco - displayName: Model - hint: TF Detection API's model to use for training. - type: select.select - visibility: public - options: - - name: 'Faster RCNN-ResNet 101-COCO' - value: frcnn-res101-coco - - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' - value: frcnn-res101-low - - name: 'Faster RCNN-ResNet 50-COCO' - value: frcnn-res50-coco - - name: 'Faster RCNN-NAS-COCO' - value: frcnn-nas-coco - - name: 'SSD MobileNet V1-COCO' - value: ssd-mobilenet-v1-coco2 - - name: 'SSD MobileNet V2-COCO' - value: ssd-mobilenet-v2-coco - - name: 'SSDLite MobileNet-COCO' - value: ssdlite-mobilenet-coco + - name: cvat-model + value: frcnn-res50-coco + displayName: Model + hint: TF Detection API's model to use for training. + type: select.select + visibility: public + options: + - name: 'Faster RCNN-ResNet 101-COCO' + value: frcnn-res101-coco + - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' + value: frcnn-res101-low + - name: 'Faster RCNN-ResNet 50-COCO' + value: frcnn-res50-coco + - name: 'Faster RCNN-NAS-COCO' + value: frcnn-nas-coco + - name: 'SSD MobileNet V1-COCO' + value: ssd-mobilenet-v1-coco2 + - name: 'SSD MobileNet V2-COCO' + value: ssd-mobilenet-v2-coco + - name: 'SSDLite MobileNet-COCO' + value: ssdlite-mobilenet-coco - - name: hyperparameters - value: |- - num-steps=10000 - displayName: Hyperparameters - visibility: public - type: textarea.textarea - hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." + - name: hyperparameters + value: |- + num-steps=10000 + displayName: Hyperparameters + visibility: public + type: textarea.textarea + hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." - - name: cvat-finetune-checkpoint - value: '' - hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. - displayName: Checkpoint path - visibility: public + - name: cvat-finetune-checkpoint + value: '' + hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. + displayName: Checkpoint path + visibility: public - - name: cvat-num-classes - value: '81' - hint: Number of classes - displayName: Number of classes - visibility: private + - name: cvat-num-classes + value: '81' + hint: Number of classes + displayName: Number of classes + visibility: private - - name: tf-image - value: tensorflow/tensorflow:1.13.1-py3 - type: select.select - displayName: Select TensorFlow image - visibility: public - hint: Select the GPU image if you are running on a GPU node pool - options: - - name: 'TensorFlow 1.13.1 CPU Image' - value: 'tensorflow/tensorflow:1.13.1-py3' - - name: 'TensorFlow 1.13.1 GPU Image' - value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + - name: tf-image + value: tensorflow/tensorflow:1.13.1-py3 + type: select.select + displayName: Select TensorFlow image + visibility: public + hint: Select the GPU image if you are running on a GPU node pool + options: + - name: 'TensorFlow 1.13.1 CPU Image' + value: 'tensorflow/tensorflow:1.13.1-py3' + - name: 'TensorFlow 1.13.1 GPU Image' + value: 'tensorflow/tensorflow:1.13.1-gpu-py3' - - displayName: Node pool - hint: Name of node pool or group to run this workflow task - type: select.select - name: sys-node-pool - value: Standard_D4s_v3 - visibility: public - required: true - options: - - name: 'CPU: 2, RAM: 8GB' - value: Standard_D2s_v3 - - name: 'CPU: 4, RAM: 16GB' - value: Standard_D4s_v3 - - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' - value: Standard_NC6 - - name: dump-format - value: cvat_tfrecord - visibility: public + - displayName: Node pool + hint: Name of node pool or group to run this workflow task + type: select.select + name: sys-node-pool + value: Standard_D4s_v3 + visibility: public + required: true + options: + - name: 'CPU: 2, RAM: 8GB' + value: Standard_D2s_v3 + - name: 'CPU: 4, RAM: 16GB' + value: Standard_D4s_v3 + - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' + value: Standard_NC6 + - name: dump-format + value: cvat_tfrecord + visibility: public templates: - name: main dag: @@ -164,7 +164,7 @@ templates: path: /mnt/data/models/ optional: true {{.ArtifactRepositoryType}}: - key: '{{workflow.parameters.cvat-finetune-checkpoint}}' + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-finetune-checkpoint}}' - git: repo: '{{workflow.parameters.source}}' revision: '{{workflow.parameters.revision}}' @@ -218,4 +218,4 @@ volumeClaimTemplates: - ReadWriteOnce resources: requests: - storage: 200Gi + storage: 200Gi \ No newline at end of file diff --git a/db/go/20201130130433_update_tfod_patch.go b/db/go/20201130130433_update_tfod_patch.go index 41b787fb..f5ca02f4 100644 --- a/db/go/20201130130433_update_tfod_patch.go +++ b/db/go/20201130130433_update_tfod_patch.go @@ -16,7 +16,7 @@ func initialize20201130130433() { func Up20201130130433(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( - "20201130130433_tfod.yaml", + "20201115134934_tfod.yaml", tfodWorkflowTemplateName, map[string]string{ "used-by": "cvat", @@ -27,5 +27,11 @@ func Up20201130130433(tx *sql.Tx) error { //Down20201130130433 do nothing func Down20201130130433(tx *sql.Tx) error { // This code is executed when the migration is rolled back. - return nil + return updateWorkflowTemplateManifest( + "20201115134934_tfod.yaml", + tfodWorkflowTemplateName, + map[string]string{ + "used-by": "cvat", + }, + ) } From c556e65a88ec92b9ba475e16da7afa16500b2468 Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 14:33:40 -0600 Subject: [PATCH 08/80] use latest template for up --- db/go/20201130130433_update_tfod_patch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/go/20201130130433_update_tfod_patch.go b/db/go/20201130130433_update_tfod_patch.go index f5ca02f4..105e1d20 100644 --- a/db/go/20201130130433_update_tfod_patch.go +++ b/db/go/20201130130433_update_tfod_patch.go @@ -16,7 +16,7 @@ func initialize20201130130433() { func Up20201130130433(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( - "20201115134934_tfod.yaml", + "20201130130433_tfod.yaml", tfodWorkflowTemplateName, map[string]string{ "used-by": "cvat", From 1946fdd25447bb932918af4f50f0aa7d4b35287b Mon Sep 17 00:00:00 2001 From: Rush Tehrani Date: Mon, 30 Nov 2020 12:35:09 -0800 Subject: [PATCH 09/80] Rename 20201130130433_update_tfod_patch.go to 20201130130433_update_tfod_path.go --- ...33_update_tfod_patch.go => 20201130130433_update_tfod_path.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename db/go/{20201130130433_update_tfod_patch.go => 20201130130433_update_tfod_path.go} (100%) diff --git a/db/go/20201130130433_update_tfod_patch.go b/db/go/20201130130433_update_tfod_path.go similarity index 100% rename from db/go/20201130130433_update_tfod_patch.go rename to db/go/20201130130433_update_tfod_path.go From 0639f108345a674bcc615ea7c30971fdb0e6f573 Mon Sep 17 00:00:00 2001 From: Rush Tehrani Date: Mon, 30 Nov 2020 12:43:40 -0800 Subject: [PATCH 10/80] Fix template name and package name --- db/go/20201130130433_update_tfod_path.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/go/20201130130433_update_tfod_path.go b/db/go/20201130130433_update_tfod_path.go index 105e1d20..f48aa13a 100644 --- a/db/go/20201130130433_update_tfod_path.go +++ b/db/go/20201130130433_update_tfod_path.go @@ -1,4 +1,4 @@ -package migrations +package migration import ( "database/sql" @@ -17,7 +17,7 @@ func Up20201130130433(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( "20201130130433_tfod.yaml", - tfodWorkflowTemplateName, + tensorflowObjectDetectionWorkflowTemplateName, map[string]string{ "used-by": "cvat", }, @@ -29,7 +29,7 @@ func Down20201130130433(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkflowTemplateManifest( "20201115134934_tfod.yaml", - tfodWorkflowTemplateName, + tensorflowObjectDetectionWorkflowTemplateName, map[string]string{ "used-by": "cvat", }, From 8c00552ba066c8a8d663d26fc45b291bed618c23 Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 15:05:53 -0600 Subject: [PATCH 11/80] remove namespace from path --- db/data/20201130130433_tfod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/data/20201130130433_tfod.yaml b/db/data/20201130130433_tfod.yaml index 7a50d061..df156b5a 100644 --- a/db/data/20201130130433_tfod.yaml +++ b/db/data/20201130130433_tfod.yaml @@ -164,7 +164,7 @@ templates: path: /mnt/data/models/ optional: true {{.ArtifactRepositoryType}}: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-finetune-checkpoint}}' + key: '{{workflow.parameters.cvat-finetune-checkpoint}}' - git: repo: '{{workflow.parameters.source}}' revision: '{{workflow.parameters.revision}}' From dbc008100a2fc1e8f56c33590ee9428b862d97c0 Mon Sep 17 00:00:00 2001 From: savan Date: Mon, 30 Nov 2020 15:11:40 -0600 Subject: [PATCH 12/80] update indentation in the template --- db/data/20201130130433_tfod.yaml | 178 +++++++++++++++---------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/db/data/20201130130433_tfod.yaml b/db/data/20201130130433_tfod.yaml index df156b5a..33775d01 100644 --- a/db/data/20201130130433_tfod.yaml +++ b/db/data/20201130130433_tfod.yaml @@ -1,105 +1,105 @@ entrypoint: main arguments: parameters: - - name: source - value: https://github.com/tensorflow/models.git - displayName: Model source code - type: hidden - visibility: private + - name: source + value: https://github.com/tensorflow/models.git + displayName: Model source code + type: hidden + visibility: private - - name: trainingsource - value: https://github.com/onepanelio/cvat-training.git - type: hidden - visibility: private + - name: trainingsource + value: https://github.com/onepanelio/cvat-training.git + type: hidden + visibility: private - - name: revision - value: v1.13.0 - type: hidden - visibility: private + - name: revision + value: v1.13.0 + type: hidden + visibility: private - - name: cvat-annotation-path - value: annotation-dump/sample_dataset - displayName: Dataset path - hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. - visibility: private + - name: cvat-annotation-path + value: annotation-dump/sample_dataset + displayName: Dataset path + hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. + visibility: private - - name: cvat-output-path - value: workflow-data/output/sample_output - hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. - displayName: Workflow output path - visibility: private + - name: cvat-output-path + value: workflow-data/output/sample_output + hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. + displayName: Workflow output path + visibility: private - - name: cvat-model - value: frcnn-res50-coco - displayName: Model - hint: TF Detection API's model to use for training. - type: select.select - visibility: public - options: - - name: 'Faster RCNN-ResNet 101-COCO' - value: frcnn-res101-coco - - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' - value: frcnn-res101-low - - name: 'Faster RCNN-ResNet 50-COCO' - value: frcnn-res50-coco - - name: 'Faster RCNN-NAS-COCO' - value: frcnn-nas-coco - - name: 'SSD MobileNet V1-COCO' - value: ssd-mobilenet-v1-coco2 - - name: 'SSD MobileNet V2-COCO' - value: ssd-mobilenet-v2-coco - - name: 'SSDLite MobileNet-COCO' - value: ssdlite-mobilenet-coco + - name: cvat-model + value: frcnn-res50-coco + displayName: Model + hint: TF Detection API's model to use for training. + type: select.select + visibility: public + options: + - name: 'Faster RCNN-ResNet 101-COCO' + value: frcnn-res101-coco + - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' + value: frcnn-res101-low + - name: 'Faster RCNN-ResNet 50-COCO' + value: frcnn-res50-coco + - name: 'Faster RCNN-NAS-COCO' + value: frcnn-nas-coco + - name: 'SSD MobileNet V1-COCO' + value: ssd-mobilenet-v1-coco2 + - name: 'SSD MobileNet V2-COCO' + value: ssd-mobilenet-v2-coco + - name: 'SSDLite MobileNet-COCO' + value: ssdlite-mobilenet-coco - - name: hyperparameters - value: |- - num-steps=10000 - displayName: Hyperparameters - visibility: public - type: textarea.textarea - hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." + - name: hyperparameters + value: |- + num-steps=10000 + displayName: Hyperparameters + visibility: public + type: textarea.textarea + hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." - - name: cvat-finetune-checkpoint - value: '' - hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. - displayName: Checkpoint path - visibility: public + - name: cvat-finetune-checkpoint + value: '' + hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. + displayName: Checkpoint path + visibility: public - - name: cvat-num-classes - value: '81' - hint: Number of classes - displayName: Number of classes - visibility: private + - name: cvat-num-classes + value: '81' + hint: Number of classes + displayName: Number of classes + visibility: private - - name: tf-image - value: tensorflow/tensorflow:1.13.1-py3 - type: select.select - displayName: Select TensorFlow image - visibility: public - hint: Select the GPU image if you are running on a GPU node pool - options: - - name: 'TensorFlow 1.13.1 CPU Image' - value: 'tensorflow/tensorflow:1.13.1-py3' - - name: 'TensorFlow 1.13.1 GPU Image' - value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + - name: tf-image + value: tensorflow/tensorflow:1.13.1-py3 + type: select.select + displayName: Select TensorFlow image + visibility: public + hint: Select the GPU image if you are running on a GPU node pool + options: + - name: 'TensorFlow 1.13.1 CPU Image' + value: 'tensorflow/tensorflow:1.13.1-py3' + - name: 'TensorFlow 1.13.1 GPU Image' + value: 'tensorflow/tensorflow:1.13.1-gpu-py3' - - displayName: Node pool - hint: Name of node pool or group to run this workflow task - type: select.select - name: sys-node-pool - value: Standard_D4s_v3 - visibility: public - required: true - options: - - name: 'CPU: 2, RAM: 8GB' - value: Standard_D2s_v3 - - name: 'CPU: 4, RAM: 16GB' - value: Standard_D4s_v3 - - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' - value: Standard_NC6 - - name: dump-format - value: cvat_tfrecord - visibility: public + - displayName: Node pool + hint: Name of node pool or group to run this workflow task + type: select.select + name: sys-node-pool + value: Standard_D4s_v3 + visibility: public + required: true + options: + - name: 'CPU: 2, RAM: 8GB' + value: Standard_D2s_v3 + - name: 'CPU: 4, RAM: 16GB' + value: Standard_D4s_v3 + - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' + value: Standard_NC6 + - name: dump-format + value: cvat_tfrecord + visibility: public templates: - name: main dag: From 39e9c2e572f6b7b721264f16f50efe5b0a38e3ad Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Wed, 2 Dec 2020 10:02:27 -0800 Subject: [PATCH 13/80] wip - move env vars to workspace creation --- pkg/workspace.go | 26 +++++++++++++++++++++----- pkg/workspace_template.go | 22 ++-------------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index b27fbdff..0d74ee3b 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -11,10 +11,12 @@ import ( "github.com/ghodss/yaml" "github.com/lib/pq" "github.com/onepanelio/core/pkg/util" + "github.com/onepanelio/core/pkg/util/env" "github.com/onepanelio/core/pkg/util/ptr" "github.com/onepanelio/core/pkg/util/request" log "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" + corev1 "k8s.io/api/core/v1" "strings" "time" ) @@ -223,7 +225,7 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace templates := argoTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace) + resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, systemConfig) if err != nil { return nil, err } @@ -267,7 +269,7 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace // addResourceRequestsAndLimitsToWorkspaceTemplate will take the workspace statefulset resource // and attempt to figure out the resources it requests, based on the Node selected. -func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template, argoTemplate *wfv1.WorkflowTemplate, workspace *Workspace) ([]byte, error) { +func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template, config SystemConfig) ([]byte, error) { //due to placeholders, we can't unmarshal into a k8s statefulset statefulSet := map[string]interface{}{} if err := yaml.Unmarshal([]byte(t.Resource.Manifest), &statefulSet); err != nil { @@ -294,6 +296,21 @@ func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template templateSpec["containers"] = append([]interface{}{extraContainer}, containers...) } + + containers, ok := templateSpec["containers"].([]corev1.Container) + if !ok { + return nil, errors.New("unable to type check statefulset manifest") + } + for _, container := range containers { + env.AddDefaultEnvVarsToContainer(&container) + env.PrependEnvVarToContainer(&container, "ONEPANEL_API_URL", config["ONEPANEL_API_URL"]) + env.PrependEnvVarToContainer(&container, "ONEPANEL_FQDN", config["ONEPANEL_FQDN"]) + env.PrependEnvVarToContainer(&container, "ONEPANEL_DOMAIN", config["ONEPANEL_DOMAIN"]) + env.PrependEnvVarToContainer(&container, "ONEPANEL_PROVIDER", config["ONEPANEL_PROVIDER"]) + env.PrependEnvVarToContainer(&container, "ONEPANEL_RESOURCE_NAMESPACE", "{{workflow.namespace}}") + env.PrependEnvVarToContainer(&container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-uid}}") + } + resultManifest, err := yaml.Marshal(statefulSet) if err != nil { return nil, err @@ -373,7 +390,7 @@ func (c *Client) startWorkspace(namespace string, parameters []byte, workspace * templates := argoTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace) + resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, systemConfig) if err != nil { return nil, err } @@ -734,10 +751,9 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction workspace.WorkspaceTemplate = workspaceTemplate templates := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate.Spec.Templates - argoTemplate := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace) + resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, config) if err != nil { return err } diff --git a/pkg/workspace_template.go b/pkg/workspace_template.go index ad0187b3..87f48805 100644 --- a/pkg/workspace_template.go +++ b/pkg/workspace_template.go @@ -9,7 +9,6 @@ import ( wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" "github.com/asaskevich/govalidator" "github.com/onepanelio/core/pkg/util" - "github.com/onepanelio/core/pkg/util/env" "github.com/onepanelio/core/pkg/util/ptr" "github.com/onepanelio/core/pkg/util/request" "github.com/onepanelio/core/pkg/util/router" @@ -352,7 +351,7 @@ func createVirtualServiceManifest(spec *WorkspaceSpec) (virtualServiceManifest s return } -func createStatefulSetManifest(spec *WorkspaceSpec, config map[string]string, services []*Service) (statefulSetManifest string, err error) { +func createStatefulSetManifest(spec *WorkspaceSpec) (statefulSetManifest string, err error) { var volumeClaims []map[string]interface{} volumeClaimsMapped := make(map[string]bool) // Add volumeClaims that the user has added first @@ -395,18 +394,6 @@ func createStatefulSetManifest(spec *WorkspaceSpec, config map[string]string, se // Automatically map the remaining ones for i, c := range spec.Containers { container := &spec.Containers[i] - env.AddDefaultEnvVarsToContainer(container) - env.PrependEnvVarToContainer(container, "ONEPANEL_API_URL", config["ONEPANEL_API_URL"]) - env.PrependEnvVarToContainer(container, "ONEPANEL_FQDN", config["ONEPANEL_FQDN"]) - env.PrependEnvVarToContainer(container, "ONEPANEL_DOMAIN", config["ONEPANEL_DOMAIN"]) - env.PrependEnvVarToContainer(container, "ONEPANEL_PROVIDER", config["ONEPANEL_PROVIDER"]) - env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_NAMESPACE", "{{workflow.namespace}}") - env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-uid}}") - - for _, service := range services { - envName := fmt.Sprintf("ONEPANEL_SERVICES_%v_API_URL", strings.ToUpper(service.Name)) - env.PrependEnvVarToContainer(container, envName, service.URL) - } for _, v := range c.VolumeMounts { if volumeClaimsMapped[v.Name] { @@ -977,12 +964,7 @@ func (c *Client) generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate *Wo return nil, err } - services, err := c.ListServices(workspaceTemplate.Namespace) - if err != nil { - return nil, err - } - - statefulSetManifest, err := createStatefulSetManifest(workspaceSpec, config, services) + statefulSetManifest, err := createStatefulSetManifest(workspaceSpec) if err != nil { return nil, err } From b2469224df0c255be37fc321531c9c4d0534b217 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 10:20:05 -0800 Subject: [PATCH 14/80] fix: fix existing workspace templates to add sys- prefix, including argo workflow templates. --- ...4442_update_workspace_template_prefixes.go | 177 ++++++++++++++++++ db/go/db.go | 1 + pkg/workspace_template.go | 9 +- 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 db/go/20201202174442_update_workspace_template_prefixes.go diff --git a/db/go/20201202174442_update_workspace_template_prefixes.go b/db/go/20201202174442_update_workspace_template_prefixes.go new file mode 100644 index 00000000..a1262972 --- /dev/null +++ b/db/go/20201202174442_update_workspace_template_prefixes.go @@ -0,0 +1,177 @@ +package migration + +import ( + "database/sql" + "errors" + "fmt" + v1 "github.com/onepanelio/core/pkg" + "github.com/onepanelio/core/pkg/util/label" + "github.com/pressly/goose" +) + +func initialize20201202174442() { + if _, ok := initializedMigrations[20201202174442]; !ok { + goose.AddMigration(Up20201202174442, Down20201202174442) + initializedMigrations[20201202174442] = true + } +} + +func Up20201202174442(tx *sql.Tx) error { + // This code is executed when the migration is applied. + client, err := getClient() + if err != nil { + return err + } + defer client.DB.Close() + + rows, err := tx.Query(` + SELECT namespace, name, uid + FROM workflow_templates + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + ) AND uid NOT LIKE 'sys-%' + `) + if err != nil { + return err + } + defer rows.Close() + + workflowTemplates := make([]v1.WorkflowTemplate, 0) + for rows.Next() { + namespace := "" + name := "" + uid := "" + if err := rows.Scan(&namespace, &name, &uid); err != nil { + return err + } + + workflowTemplates = append(workflowTemplates, v1.WorkflowTemplate{ + Namespace: namespace, + Name: name, + UID: uid, + }) + } + + for _, workflowTemplate := range workflowTemplates { + labelSelect := fmt.Sprintf("%v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) + workflowTemplates, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).List(v1.ListOptions{ + LabelSelector: labelSelect, + }) + if err != nil { + return err + } + + templates := workflowTemplates.Items + if templates.Len() == 0 { + return fmt.Errorf("argo workflowtemplate not found for label: %v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) + } + + for _, argoTemplate := range templates { + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID + + if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { + return err + } + } + } + + _, err = tx.Exec(` + UPDATE workflow_templates + SET name = CONCAT('sys-', name), + uid = CONCAT('sys-', uid) + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + )`) + if err != nil { + return err + } + + return err +} + +func Down20201202174442(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + client, err := getClient() + if err != nil { + return err + } + defer client.DB.Close() + + _, err = tx.Exec(` + UPDATE workflow_templates + SET name = substring(name from 5), + uid = substring(uid from 5) + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + ) AND name LIKE 'sys-%'`) + if err != nil { + return err + } + + rows, err := tx.Query(` + SELECT namespace, name, uid + FROM workflow_templates + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + ) AND uid LIKE 'sys-%' + `) + if err != nil { + return err + } + defer rows.Close() + + workflowTemplates := make([]v1.WorkflowTemplate, 0) + for rows.Next() { + namespace := "" + name := "" + uid := "" + if err := rows.Scan(&namespace, &name, &uid); err != nil { + return err + } + + workflowTemplates = append(workflowTemplates, v1.WorkflowTemplate{ + Namespace: namespace, + Name: name, + UID: uid, + }) + } + + for _, workflowTemplate := range workflowTemplates { + labelSelect := fmt.Sprintf("%v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) + workflowTemplates, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).List(v1.ListOptions{ + LabelSelector: labelSelect, + }) + if err != nil { + return err + } + + templates := workflowTemplates.Items + if templates.Len() == 0 { + return errors.New("not found") + } + + for _, argoTemplate := range templates { + // Remove sys- prefix + workflowTemplate.Name = workflowTemplate.Name[4:] + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID + + if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { + return err + } + } + } + + return err +} diff --git a/db/go/db.go b/db/go/db.go index d41f0a8c..591b178f 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -72,6 +72,7 @@ func Initialize() { initialize20201115133046() initialize20201115134934() initialize20201115145814() + initialize20201202174442() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) diff --git a/pkg/workspace_template.go b/pkg/workspace_template.go index 1a26d957..ad7f3f1f 100644 --- a/pkg/workspace_template.go +++ b/pkg/workspace_template.go @@ -1111,13 +1111,20 @@ func (c *Client) UpdateWorkspaceTemplate(namespace string, workspaceTemplate *Wo workspaceTemplate.ID = existingWorkspaceTemplate.ID workspaceTemplate.Name = existingWorkspaceTemplate.UID workspaceTemplate.Namespace = existingWorkspaceTemplate.Namespace + workspaceTemplate.WorkflowTemplateID = existingWorkspaceTemplate.WorkflowTemplateID + + existingWorkflowTemplate, err := c.getWorkflowTemplateById(workspaceTemplate.WorkflowTemplateID) + if err != nil { + return nil, err + } updatedWorkflowTemplate, err := c.generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate) if err != nil { return nil, err } updatedWorkflowTemplate.ID = existingWorkspaceTemplate.WorkflowTemplate.ID - updatedWorkflowTemplate.UID = existingWorkspaceTemplate.WorkflowTemplate.UID + updatedWorkflowTemplate.UID = existingWorkflowTemplate.UID + updatedWorkflowTemplate.Name = existingWorkflowTemplate.Name updatedWorkflowTemplate.Labels = workspaceTemplate.Labels workflowTemplateVersion, err := c.CreateWorkflowTemplateVersion(namespace, updatedWorkflowTemplate) From 198926aa338be6f13b99de4c6d28ac0d395c9ff4 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:24:31 -0800 Subject: [PATCH 15/80] fix: long names for existing system workflow templates --- db/go/20201202174442_update_workspace_template_prefixes.go | 3 +++ pkg/util/uid/uid.go | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/db/go/20201202174442_update_workspace_template_prefixes.go b/db/go/20201202174442_update_workspace_template_prefixes.go index a1262972..8ff468a4 100644 --- a/db/go/20201202174442_update_workspace_template_prefixes.go +++ b/db/go/20201202174442_update_workspace_template_prefixes.go @@ -69,6 +69,9 @@ func Up20201202174442(tx *sql.Tx) error { for _, argoTemplate := range templates { workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if len(workflowTemplate.Name) > 30 { + workflowTemplate.Name = workflowTemplate.Name[:30] + } if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { return err } diff --git a/pkg/util/uid/uid.go b/pkg/util/uid/uid.go index 0ec602e4..f2e9e07d 100644 --- a/pkg/util/uid/uid.go +++ b/pkg/util/uid/uid.go @@ -7,11 +7,13 @@ import ( "strings" ) +// GenerateUID converts an input string to a uid friendly version where we have all lowercase letters and dashes instead of spaces +// If the max is exceeded, an error is returned func GenerateUID(input string, max int) (string, error) { re, _ := regexp.Compile(`[^a-zA-Z0-9-]{1,}`) cleanUp := strings.ToLower(re.ReplaceAllString(input, `-`)) if len(cleanUp) > max { - return "", errors.New(fmt.Sprintf("Length of string exceeds %d", max)) + return "", errors.New(fmt.Sprintf("Length of string '%s' exceeds %d", input, max)) } return strings.ToLower(re.ReplaceAllString(input, `-`)), nil } From a7f1f49c4360e9adfd3dec69115628542ce54fc4 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:37:40 -0800 Subject: [PATCH 16/80] fix: issue where workflow template name kept adding `sys-` prefix. --- ...02174442_update_workspace_template_prefixes.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/db/go/20201202174442_update_workspace_template_prefixes.go b/db/go/20201202174442_update_workspace_template_prefixes.go index 8ff468a4..697da313 100644 --- a/db/go/20201202174442_update_workspace_template_prefixes.go +++ b/db/go/20201202174442_update_workspace_template_prefixes.go @@ -67,14 +67,15 @@ func Up20201202174442(tx *sql.Tx) error { return fmt.Errorf("argo workflowtemplate not found for label: %v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) } + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if len(workflowTemplate.Name) > 30 { + workflowTemplate.Name = workflowTemplate.Name[:30] + } + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + for _, argoTemplate := range templates { - workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) - if len(workflowTemplate.Name) > 30 { - workflowTemplate.Name = workflowTemplate.Name[:30] - } - if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { - return err - } argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { From 7fad7356c65306aec1836a408ba66f63147733d2 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:47:00 -0800 Subject: [PATCH 17/80] fix: changed uid to use fmt.errorf instead of errors.new - this simplifies the code a little. --- pkg/util/uid/uid.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/util/uid/uid.go b/pkg/util/uid/uid.go index f2e9e07d..c3af4049 100644 --- a/pkg/util/uid/uid.go +++ b/pkg/util/uid/uid.go @@ -1,7 +1,6 @@ package uid import ( - "errors" "fmt" "regexp" "strings" @@ -13,7 +12,7 @@ func GenerateUID(input string, max int) (string, error) { re, _ := regexp.Compile(`[^a-zA-Z0-9-]{1,}`) cleanUp := strings.ToLower(re.ReplaceAllString(input, `-`)) if len(cleanUp) > max { - return "", errors.New(fmt.Sprintf("Length of string '%s' exceeds %d", input, max)) + return "", fmt.Errorf("length of string '%s' (%d) exceeds %d", input, len(input), max) } return strings.ToLower(re.ReplaceAllString(input, `-`)), nil } From 4178efdb05897689e9676a377f74ffbd55604ee4 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:47:18 -0800 Subject: [PATCH 18/80] fix: removing sys- prefix multiple times in down migration --- ...02174442_update_workspace_template_prefixes.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/db/go/20201202174442_update_workspace_template_prefixes.go b/db/go/20201202174442_update_workspace_template_prefixes.go index 697da313..639f5814 100644 --- a/db/go/20201202174442_update_workspace_template_prefixes.go +++ b/db/go/20201202174442_update_workspace_template_prefixes.go @@ -16,6 +16,7 @@ func initialize20201202174442() { } } +// Up20201202174442 updates the argo template labels func Up20201202174442(tx *sql.Tx) error { // This code is executed when the migration is applied. client, err := getClient() @@ -99,6 +100,7 @@ func Up20201202174442(tx *sql.Tx) error { return err } +// Down20201202174442 reverts the argo template label updates func Down20201202174442(tx *sql.Tx) error { // This code is executed when the migration is rolled back. client, err := getClient() @@ -162,13 +164,14 @@ func Down20201202174442(tx *sql.Tx) error { return errors.New("not found") } + // Remove sys- prefix + workflowTemplate.Name = workflowTemplate.Name[4:] + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + for _, argoTemplate := range templates { - // Remove sys- prefix - workflowTemplate.Name = workflowTemplate.Name[4:] - workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) - if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { - return err - } argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { From 93949bf0fb3b352e0f54f771bee06a8ecf476356 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 13:15:00 -0800 Subject: [PATCH 19/80] fix: bug adding sys name back in in down migration --- db/go/20201202174442_update_workspace_template_prefixes.go | 1 - 1 file changed, 1 deletion(-) diff --git a/db/go/20201202174442_update_workspace_template_prefixes.go b/db/go/20201202174442_update_workspace_template_prefixes.go index 639f5814..a1bef027 100644 --- a/db/go/20201202174442_update_workspace_template_prefixes.go +++ b/db/go/20201202174442_update_workspace_template_prefixes.go @@ -166,7 +166,6 @@ func Down20201202174442(tx *sql.Tx) error { // Remove sys- prefix workflowTemplate.Name = workflowTemplate.Name[4:] - workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { return err } From 906e7c4d7b412c6bd650b932c05aa386d758f6d7 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 4 Dec 2020 12:37:55 -0800 Subject: [PATCH 20/80] fix: issue where container env vars were not being updated --- pkg/workspace.go | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index 0d74ee3b..21f7700a 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -297,19 +297,27 @@ func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template templateSpec["containers"] = append([]interface{}{extraContainer}, containers...) } - containers, ok := templateSpec["containers"].([]corev1.Container) - if !ok { - return nil, errors.New("unable to type check statefulset manifest") + containerJSON, err := json.Marshal(templateSpec["containers"]) + if err != nil { + return nil, fmt.Errorf("unable to marshal containers from json spec") } - for _, container := range containers { - env.AddDefaultEnvVarsToContainer(&container) - env.PrependEnvVarToContainer(&container, "ONEPANEL_API_URL", config["ONEPANEL_API_URL"]) - env.PrependEnvVarToContainer(&container, "ONEPANEL_FQDN", config["ONEPANEL_FQDN"]) - env.PrependEnvVarToContainer(&container, "ONEPANEL_DOMAIN", config["ONEPANEL_DOMAIN"]) - env.PrependEnvVarToContainer(&container, "ONEPANEL_PROVIDER", config["ONEPANEL_PROVIDER"]) - env.PrependEnvVarToContainer(&container, "ONEPANEL_RESOURCE_NAMESPACE", "{{workflow.namespace}}") - env.PrependEnvVarToContainer(&container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-uid}}") + + containers := make([]*corev1.Container, 0) + if err := json.Unmarshal(containerJSON, &containers); err != nil { + return nil, err + } + + for i := range containers { + container := containers[i] + env.AddDefaultEnvVarsToContainer(container) + env.PrependEnvVarToContainer(container, "ONEPANEL_API_URL", config["ONEPANEL_API_URL"]) + env.PrependEnvVarToContainer(container, "ONEPANEL_FQDN", config["ONEPANEL_FQDN"]) + env.PrependEnvVarToContainer(container, "ONEPANEL_DOMAIN", config["ONEPANEL_DOMAIN"]) + env.PrependEnvVarToContainer(container, "ONEPANEL_PROVIDER", config["ONEPANEL_PROVIDER"]) + env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_NAMESPACE", "{{workflow.namespace}}") + env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-uid}}") } + templateSpec["containers"] = containers resultManifest, err := yaml.Marshal(statefulSet) if err != nil { From 6ca3d602985084858877164ada7a1c08d6ef78e5 Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Fri, 4 Dec 2020 12:54:52 -0800 Subject: [PATCH 21/80] update method name to be more descriptive --- pkg/workspace.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index 21f7700a..9aecd4a3 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -225,7 +225,7 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace templates := argoTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, systemConfig) + resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, systemConfig) if err != nil { return nil, err } @@ -267,9 +267,9 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace return workspace, nil } -// addResourceRequestsAndLimitsToWorkspaceTemplate will take the workspace statefulset resource +// addRuntimeFieldsToWorkspaceTemplate will take the workspace statefulset resource // and attempt to figure out the resources it requests, based on the Node selected. -func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template, config SystemConfig) ([]byte, error) { +func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, config SystemConfig) ([]byte, error) { //due to placeholders, we can't unmarshal into a k8s statefulset statefulSet := map[string]interface{}{} if err := yaml.Unmarshal([]byte(t.Resource.Manifest), &statefulSet); err != nil { @@ -398,7 +398,7 @@ func (c *Client) startWorkspace(namespace string, parameters []byte, workspace * templates := argoTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, systemConfig) + resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, systemConfig) if err != nil { return nil, err } @@ -761,7 +761,7 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction templates := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, config) + resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, config) if err != nil { return err } From b4ea002387139627216c0c8d2aa529075fa0af4f Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Mon, 7 Dec 2020 15:51:37 -0800 Subject: [PATCH 22/80] support resource limits for GPUs in Workspaces --- pkg/workspace.go | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index 9aecd4a3..3f4be690 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -225,7 +225,7 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace templates := argoTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, systemConfig) + resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, workspace, systemConfig) if err != nil { return nil, err } @@ -269,7 +269,7 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace // addRuntimeFieldsToWorkspaceTemplate will take the workspace statefulset resource // and attempt to figure out the resources it requests, based on the Node selected. -func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, config SystemConfig) ([]byte, error) { +func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace *Workspace, config SystemConfig) ([]byte, error) { //due to placeholders, we can't unmarshal into a k8s statefulset statefulSet := map[string]interface{}{} if err := yaml.Unmarshal([]byte(t.Resource.Manifest), &statefulSet); err != nil { @@ -287,7 +287,7 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, config Sys if !ok { return nil, errors.New("unable to type check statefulset manifest") } - extraContainer := generateExtraContainerWithHostPortToSequesterNode() + extraContainer := generateExtraContainerWithHostPortToSequesterNode(workspace, config) if extraContainer != nil { containers, ok := templateSpec["containers"].([]interface{}) if !ok { @@ -330,7 +330,7 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, config Sys // The extra container have a hostPort set. Kubernetes will ensure the hostPort does not get conflict // between containers, scheduling a new node as needed. // The container will sleep once started, and generally consume negligible resources. -func generateExtraContainerWithHostPortToSequesterNode() map[string]interface{} { +func generateExtraContainerWithHostPortToSequesterNode(workspace *Workspace, config SystemConfig) map[string]interface{} { extraContainer := map[string]interface{}{ "image": "alpine:latest", "name": "node-capturer", @@ -344,6 +344,22 @@ func generateExtraContainerWithHostPortToSequesterNode() map[string]interface{} }, }, } + + // Add resource limits for GPUs + nodePoolVal := "" + for _, parameter := range workspace.Parameters { + if parameter.Name == "sys-node-pool" { + nodePoolVal = *parameter.Value + } + } + n, err := config.NodePoolOptionByValue(nodePoolVal) + if err != nil { + return nil + } + if n != nil && n.Resources.Limits != nil { + extraContainer["resources"] = n.Resources + } + return extraContainer } @@ -398,7 +414,7 @@ func (c *Client) startWorkspace(namespace string, parameters []byte, workspace * templates := argoTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, systemConfig) + resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, workspace, systemConfig) if err != nil { return nil, err } @@ -761,7 +777,7 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction templates := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate.Spec.Templates for i, t := range templates { if t.Name == WorkspaceStatefulSetResource { - resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, config) + resultManifest, err := c.addRuntimeFieldsToWorkspaceTemplate(t, workspace, config) if err != nil { return err } From 78fde018fd093280f2cd5b30abb4dd914724c642 Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Mon, 7 Dec 2020 15:51:50 -0800 Subject: [PATCH 23/80] support resource limits for GPUs in Workflows --- pkg/workflow_execution.go | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index f93e272e..13571ad4 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -204,7 +204,7 @@ func injectArtifactRepositoryConfig(artifact *wfv1.Artifact, namespaceConfig *Na // injectHostPortToContainer adds a hostPort to the template container, if a nodeSelector is present. // Kubernetes will ensure that multiple containers with the same hostPort do not share the same node. -func (c *Client) injectHostPortToContainer(template *wfv1.Template) error { +func (c *Client) injectHostPortToContainer(template *wfv1.Template, opts *WorkflowExecutionOptions, config SystemConfig) error { if template.NodeSelector == nil { return nil } @@ -212,11 +212,37 @@ func (c *Client) injectHostPortToContainer(template *wfv1.Template) error { ports := []corev1.ContainerPort{ {Name: "node-capturer", HostPort: 80, ContainerPort: 80}, } + + // Add resource limits for GPUs + nodePoolVal := "" + for _, v := range template.NodeSelector { + nodePoolVal = v + break + } + if strings.Contains(nodePoolVal, "{{workflow.") { + parts := strings.Split(strings.Replace(nodePoolVal, "}}", "", -1), ".") + paramName := parts[len(parts)-1] + for _, parameter := range opts.Parameters { + if parameter.Name == paramName { + nodePoolVal = *parameter.Value + } + } + } + n, err := config.NodePoolOptionByValue(nodePoolVal) + if err != nil { + return nil + } if template.Container != nil { template.Container.Ports = ports + if n != nil && n.Resources.Limits != nil { + template.Container.Resources = n.Resources + } } if template.Script != nil { template.Script.Container.Ports = ports + if n != nil && n.Resources.Limits != nil { + template.Container.Resources = n.Resources + } } return nil } @@ -297,7 +323,7 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts Name: "sys-dshm", MountPath: "/dev/shm", }) - err = c.injectHostPortToContainer(template) + err = c.injectHostPortToContainer(template, opts, systemConfig) if err != nil { return err } @@ -305,7 +331,7 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts } if template.Script != nil { - err = c.injectHostPortToContainer(template) + err = c.injectHostPortToContainer(template, opts, systemConfig) if err != nil { return err } From 3abdda5b815e8bbd6439692ef99994ec073f22c3 Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Mon, 7 Dec 2020 16:52:26 -0800 Subject: [PATCH 24/80] name methods more explicitly --- pkg/workflow_execution.go | 8 ++++---- pkg/workspace.go | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index 13571ad4..26a63396 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -202,9 +202,9 @@ func injectArtifactRepositoryConfig(artifact *wfv1.Artifact, namespaceConfig *Na } } -// injectHostPortToContainer adds a hostPort to the template container, if a nodeSelector is present. +// injectHostPortAndResourcesToContainer adds a hostPort to the template container, if a nodeSelector is present. // Kubernetes will ensure that multiple containers with the same hostPort do not share the same node. -func (c *Client) injectHostPortToContainer(template *wfv1.Template, opts *WorkflowExecutionOptions, config SystemConfig) error { +func (c *Client) injectHostPortAndResourcesToContainer(template *wfv1.Template, opts *WorkflowExecutionOptions, config SystemConfig) error { if template.NodeSelector == nil { return nil } @@ -323,7 +323,7 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts Name: "sys-dshm", MountPath: "/dev/shm", }) - err = c.injectHostPortToContainer(template, opts, systemConfig) + err = c.injectHostPortAndResourcesToContainer(template, opts, systemConfig) if err != nil { return err } @@ -331,7 +331,7 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts } if template.Script != nil { - err = c.injectHostPortToContainer(template, opts, systemConfig) + err = c.injectHostPortAndResourcesToContainer(template, opts, systemConfig) if err != nil { return err } diff --git a/pkg/workspace.go b/pkg/workspace.go index 3f4be690..ae27fd29 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -287,7 +287,7 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace if !ok { return nil, errors.New("unable to type check statefulset manifest") } - extraContainer := generateExtraContainerWithHostPortToSequesterNode(workspace, config) + extraContainer := generateNodeCaptureContainer(workspace, config) if extraContainer != nil { containers, ok := templateSpec["containers"].([]interface{}) if !ok { @@ -326,11 +326,11 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace return resultManifest, nil } -// generateExtraContainerWithHostPortToSequesterNode will add an extra container to a workspace. +// generateNodeCaptureContainer will add an extra container to a workspace. // The extra container have a hostPort set. Kubernetes will ensure the hostPort does not get conflict // between containers, scheduling a new node as needed. // The container will sleep once started, and generally consume negligible resources. -func generateExtraContainerWithHostPortToSequesterNode(workspace *Workspace, config SystemConfig) map[string]interface{} { +func generateNodeCaptureContainer(workspace *Workspace, config SystemConfig) map[string]interface{} { extraContainer := map[string]interface{}{ "image": "alpine:latest", "name": "node-capturer", From 70d604b2d016ed2ed3bf4ba2c68b78d050e0361a Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Mon, 7 Dec 2020 18:21:57 -0800 Subject: [PATCH 25/80] test: istio inject var instead of tty --- pkg/workflow_execution.go | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index f93e272e..720908d0 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -283,11 +283,14 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts template.Metadata.Annotations["sidecar.istio.io/inject"] = "false" //For workflows with accessible sidecars, we need istio //Istio does not prevent the main container from stopping + sidecarLoop: for _, s := range template.Sidecars { - if s.TTY == true { - template.Metadata.Annotations["sidecar.istio.io/inject"] = "true" - //Only need one instance to require istio injection - break + for _, e := range s.Env { + if e.Name == "inject-istio" && e.Value == "true" { + template.Metadata.Annotations["sidecar.istio.io/inject"] = "true" + //Only need one instance to require istio injection + break sidecarLoop + } } } @@ -466,7 +469,16 @@ func (c *Client) injectAccessForSidecars(namespace string, wf *wfv1.Workflow) ([ for si, s := range t.Sidecars { //If TTY is true, sidecar needs to be accessible by HTTP //Otherwise, we skip the sidecar - if s.TTY != true { + + hasInjectIstio := false + for _, e := range s.Env { + if e.Name == "inject-istio" && e.Value == "true" { + hasInjectIstio = true + break + } + } + + if !hasInjectIstio { continue } if len(s.Ports) == 0 { From e29b6266e46cd715f53b9ef6bd54acf0313fc1fe Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 8 Dec 2020 12:14:15 -0800 Subject: [PATCH 26/80] fix: added timeout to k8s so it doesn't wait forever. --- pkg/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/client.go b/pkg/client.go index 36bd9d77..2133eac8 100644 --- a/pkg/client.go +++ b/pkg/client.go @@ -12,6 +12,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" + "time" ) type Config = rest.Config @@ -82,6 +83,8 @@ func NewClient(config *Config, db *DB, systemConfig SystemConfig) (client *Clien config.CertFile = "" } + config.Timeout = 1 * time.Minute + kubeClient, err := kubernetes.NewForConfig(config) if err != nil { return From 701d31cb74619a0227f7172d022ff746bd9c3e50 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 8 Dec 2020 13:22:19 -0800 Subject: [PATCH 27/80] feat: update kubernetes timeout to be set via environment variable --- pkg/client.go | 19 ++++++++++++++++++- pkg/util/env/env.go | 10 ++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/pkg/client.go b/pkg/client.go index 2133eac8..6de79587 100644 --- a/pkg/client.go +++ b/pkg/client.go @@ -5,6 +5,7 @@ import ( sq "github.com/Masterminds/squirrel" argoprojv1alpha1 "github.com/argoproj/argo/pkg/client/clientset/versioned/typed/workflow/v1alpha1" "github.com/jmoiron/sqlx" + "github.com/onepanelio/core/pkg/util/env" "github.com/onepanelio/core/pkg/util/gcs" "github.com/onepanelio/core/pkg/util/router" "github.com/onepanelio/core/pkg/util/s3" @@ -12,6 +13,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" + "strconv" "time" ) @@ -83,7 +85,7 @@ func NewClient(config *Config, db *DB, systemConfig SystemConfig) (client *Clien config.CertFile = "" } - config.Timeout = 1 * time.Minute + config.Timeout = getKubernetesTimeout() kubeClient, err := kubernetes.NewForConfig(config) if err != nil { @@ -149,3 +151,18 @@ func (c *Client) GetWebRouter() (router.Web, error) { return webRouter, err } + +// getKubernetesTimeout returns the timeout for kubernetes requests. +// It uses the KUBERNETES_TIMEOUT environment variable and defaults to 60 seconds if not found or an error occurs +// parsing the set timeout. +func getKubernetesTimeout() time.Duration { + timeoutSeconds := env.Get("KUBERNETES_TIMEOUT", "60") + + timeout, err := strconv.Atoi(timeoutSeconds) + if err != nil { + log.Warn("Unable to parse KUBERNETES_TIMEOUT environment variable. Defaulting to 60 seconds") + return 60 * time.Second + } + + return time.Duration(timeout) * time.Second +} diff --git a/pkg/util/env/env.go b/pkg/util/env/env.go index a56ed1c5..f0b94605 100644 --- a/pkg/util/env/env.go +++ b/pkg/util/env/env.go @@ -10,6 +10,8 @@ const ( DefaultEnvironmentVariableSecret = "onepanel-default-env" ) +// GetEnv gets the environment variable value, or returns fallback if the environment variable does not exist +// Deprecated: use Get instead func GetEnv(key, fallback string) string { if value, ok := os.LookupEnv(key); ok { return value @@ -17,6 +19,14 @@ func GetEnv(key, fallback string) string { return fallback } +// Get gets the environment variable value, or returns fallback if the environment variable does not exist +func Get(key, fallback string) string { + if value, ok := os.LookupEnv(key); ok { + return value + } + return fallback +} + func PrependEnvVarToContainer(container *corev1.Container, name, value string) { for _, e := range container.Env { if e.Name == name { From e42ac3810327d9b2f0008557fa37109de5a96030 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 8 Dec 2020 16:44:43 -0800 Subject: [PATCH 28/80] feat: re-organized data folder for migrations --- db/go/20201016170415_update_cvat.go | 5 +- ...01028145442_update_jupyter_lab_template.go | 5 +- .../20201028145443_update_vscode_template.go | 9 +- ...sorboard_env_var_to_jupyterlab_template.go | 9 +- .../20201102104048_update_cvat_reduce_vols.go | 9 +- ...20201113094916_update_cvat_onepanel_sdk.go | 9 +- db/go/20201115133046_update_cvat_env_vars.go | 9 +- .../20201115134934_add_tensorboard_to_tfod.go | 3 +- ...01115145814_add_tensorboard_to_maskrcnn.go | 3 +- db/go/20201130130433_update_tfod_path.go | 5 +- ...55115_replace_tty_with_env_var_for_tfod.go | 36 +++ ...5_replace_tty_with_env_var_for_maskrcnn.go | 36 +++ db/go/db.go | 18 +- .../cvat/20201016170415.yaml} | 0 .../cvat/20201102104048.yaml} | 0 .../cvat/20201113094916.yaml} | 0 .../cvat/20201115133046.yaml} | 0 .../jupyterlab/20200929153931.yaml} | 0 .../jupyterlab/20201028145442.yaml} | 0 .../jupyterlab/20201031165106.yaml} | 0 .../maskrcnn/20201115145814.yaml} | 0 db/yaml/maskrcnn/20201208155115.yaml | 192 +++++++++++++++ .../tfod/20201115134934.yaml} | 0 .../tfod/20201130130433.yaml} | 0 db/yaml/tfod/20201208155115.yaml | 223 ++++++++++++++++++ .../vscode}/vscode_20200929144301.yaml | 0 .../vscode}/vscode_20201028145443.yaml | 0 27 files changed, 551 insertions(+), 20 deletions(-) create mode 100644 db/go/20201208155115_replace_tty_with_env_var_for_tfod.go create mode 100644 db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go rename db/{data/20201016170415_cvat.yaml => yaml/cvat/20201016170415.yaml} (100%) rename db/{data/20201102104048_cvat.yaml => yaml/cvat/20201102104048.yaml} (100%) rename db/{data/20201113094916_cvat.yaml => yaml/cvat/20201113094916.yaml} (100%) rename db/{data/20201115133046_cvat.yaml => yaml/cvat/20201115133046.yaml} (100%) rename db/{data/jupyter_lab_20200929153931.yaml => yaml/jupyterlab/20200929153931.yaml} (100%) rename db/{data/20201028145442_jupyterlab.yaml => yaml/jupyterlab/20201028145442.yaml} (100%) rename db/{data/20201031165106_jupyterlab.yaml => yaml/jupyterlab/20201031165106.yaml} (100%) rename db/{data/20201115145814_maskrcnn.yaml => yaml/maskrcnn/20201115145814.yaml} (100%) create mode 100644 db/yaml/maskrcnn/20201208155115.yaml rename db/{data/20201115134934_tfod.yaml => yaml/tfod/20201115134934.yaml} (100%) rename db/{data/20201130130433_tfod.yaml => yaml/tfod/20201130130433.yaml} (100%) create mode 100644 db/yaml/tfod/20201208155115.yaml rename db/{data => yaml/vscode}/vscode_20200929144301.yaml (100%) rename db/{data => yaml/vscode}/vscode_20201028145443.yaml (100%) diff --git a/db/go/20201016170415_update_cvat.go b/db/go/20201016170415_update_cvat.go index 62c68a71..019da105 100644 --- a/db/go/20201016170415_update_cvat.go +++ b/db/go/20201016170415_update_cvat.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201016170415() { @@ -15,7 +16,9 @@ func initialize20201016170415() { // Up20201016170415 updates cvat to a new version func Up20201016170415(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201016170415_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201016170415.yaml"), + cvatTemplateName) } // Down20201016170415 does nothing diff --git a/db/go/20201028145442_update_jupyter_lab_template.go b/db/go/20201028145442_update_jupyter_lab_template.go index 1004d691..40e9cba0 100644 --- a/db/go/20201028145442_update_jupyter_lab_template.go +++ b/db/go/20201028145442_update_jupyter_lab_template.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201028145442() { @@ -16,7 +17,9 @@ func initialize20201028145442() { // These hooks will attempt to persist conda, pip, and jupyterlab extensions between pause and shut-down. func Up20201028145442(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201028145442_jupyterlab.yaml", jupyterLabTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("jupyterlab", "20201028145442.yaml"), + jupyterLabTemplateName) } // Down20201028145442 removes the lifecycle hooks from the template. diff --git a/db/go/20201028145443_update_vscode_template.go b/db/go/20201028145443_update_vscode_template.go index 85126fca..47ab5291 100644 --- a/db/go/20201028145443_update_vscode_template.go +++ b/db/go/20201028145443_update_vscode_template.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201028145443() { @@ -18,11 +19,15 @@ func initialize20201028145443() { // On workspace resume / start, the code then tries to install these packages. func Up20201028145443(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("vscode_20201028145443.yaml", vscodeWorkspaceTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("vscode", "20201028145443.yaml"), + vscodeWorkspaceTemplateName) } // Down20201028145443 removes the lifecycle hooks from VSCode workspace template. func Down20201028145443(tx *sql.Tx) error { // This code is executed when the migration is rolled back. - return updateWorkspaceTemplateManifest("vscode_20201028145443.yaml", vscodeWorkspaceTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("vscode", "20201028145443.yaml"), + vscodeWorkspaceTemplateName) } diff --git a/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go b/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go index 40ec2fd4..2f2ec205 100644 --- a/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go +++ b/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201031165106() { @@ -16,11 +17,15 @@ func initialize20201031165106() { // These hooks will attempt to persist conda, pip, and jupyterlab extensions between pause and shut-down. func Up20201031165106(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201031165106_jupyterlab.yaml", jupyterLabTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("jupyterlab.yaml", "20201031165106"), + jupyterLabTemplateName) } // Down20201031165106 removes the lifecycle hooks from the template. func Down20201031165106(tx *sql.Tx) error { // This code is executed when the migration is rolled back. - return updateWorkspaceTemplateManifest("20201028145442_jupyterlab.yaml", jupyterLabTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("jupyterlab", "20201028145442.yaml"), + jupyterLabTemplateName) } diff --git a/db/go/20201102104048_update_cvat_reduce_vols.go b/db/go/20201102104048_update_cvat_reduce_vols.go index ebe2b617..8e1ce255 100644 --- a/db/go/20201102104048_update_cvat_reduce_vols.go +++ b/db/go/20201102104048_update_cvat_reduce_vols.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201102104048() { @@ -17,11 +18,15 @@ func initialize20201102104048() { // are placed under one path, and that path is on one volume. func Up20201102104048(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201102104048_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201102104048.yaml"), + cvatTemplateName) } // Down20201102104048 reverts CVAT back to original amount of volumes. func Down20201102104048(tx *sql.Tx) error { // This code is executed when the migration is rolled back. - return updateWorkspaceTemplateManifest("20201016170415_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201016170415.yaml"), + cvatTemplateName) } diff --git a/db/go/20201113094916_update_cvat_onepanel_sdk.go b/db/go/20201113094916_update_cvat_onepanel_sdk.go index 60b93350..e08baa3c 100644 --- a/db/go/20201113094916_update_cvat_onepanel_sdk.go +++ b/db/go/20201113094916_update_cvat_onepanel_sdk.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201113094916() { @@ -16,11 +17,15 @@ func initialize20201113094916() { //Of note, this replaces the authentication request endpoint. func Up20201113094916(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201113094916_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201113094916.yaml"), + cvatTemplateName) } //Down20201113094916 updates CVAT back to previous python-sdk version of 0.14.0 func Down20201113094916(tx *sql.Tx) error { // This code is executed when the migration is rolled back. - return updateWorkspaceTemplateManifest("20201102104048_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201102104048.yaml"), + cvatTemplateName) } diff --git a/db/go/20201115133046_update_cvat_env_vars.go b/db/go/20201115133046_update_cvat_env_vars.go index c6f863c9..5cc5034c 100644 --- a/db/go/20201115133046_update_cvat_env_vars.go +++ b/db/go/20201115133046_update_cvat_env_vars.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201115133046() { @@ -15,11 +16,15 @@ func initialize20201115133046() { //Up20201115133046 updates CVAT environment variables func Up20201115133046(tx *sql.Tx) error { // This code is executed when the migration is applied. - return updateWorkspaceTemplateManifest("20201115133046_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201115133046.yaml"), + cvatTemplateName) } //Down20201115133046 reverts latest environment variable updates func Down20201115133046(tx *sql.Tx) error { // This code is executed when the migration is rolled back. - return updateWorkspaceTemplateManifest("20201113094916_cvat.yaml", cvatTemplateName) + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201113094916"), + cvatTemplateName) } diff --git a/db/go/20201115134934_add_tensorboard_to_tfod.go b/db/go/20201115134934_add_tensorboard_to_tfod.go index d1bd7e8c..2f29f19c 100644 --- a/db/go/20201115134934_add_tensorboard_to_tfod.go +++ b/db/go/20201115134934_add_tensorboard_to_tfod.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201115134934() { @@ -16,7 +17,7 @@ func initialize20201115134934() { func Up20201115134934(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( - "20201115134934_tfod.yaml", + filepath.Join("tfod", "20201115134934.yaml"), tensorflowObjectDetectionWorkflowTemplateName, map[string]string{ "used-by": "cvat", diff --git a/db/go/20201115145814_add_tensorboard_to_maskrcnn.go b/db/go/20201115145814_add_tensorboard_to_maskrcnn.go index 378a8de0..e39a4042 100644 --- a/db/go/20201115145814_add_tensorboard_to_maskrcnn.go +++ b/db/go/20201115145814_add_tensorboard_to_maskrcnn.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201115145814() { @@ -16,7 +17,7 @@ func initialize20201115145814() { func Up20201115145814(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( - "20201115145814_maskrcnn.yaml", + filepath.Join("maskrcnn", "20201115145814.yaml"), maskRCNNWorkflowTemplateName, map[string]string{ "used-by": "cvat", diff --git a/db/go/20201130130433_update_tfod_path.go b/db/go/20201130130433_update_tfod_path.go index f48aa13a..d609f1fe 100644 --- a/db/go/20201130130433_update_tfod_path.go +++ b/db/go/20201130130433_update_tfod_path.go @@ -3,6 +3,7 @@ package migration import ( "database/sql" "github.com/pressly/goose" + "path/filepath" ) func initialize20201130130433() { @@ -16,7 +17,7 @@ func initialize20201130130433() { func Up20201130130433(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( - "20201130130433_tfod.yaml", + filepath.Join("tfod", "20201130130433.yaml"), tensorflowObjectDetectionWorkflowTemplateName, map[string]string{ "used-by": "cvat", @@ -28,7 +29,7 @@ func Up20201130130433(tx *sql.Tx) error { func Down20201130130433(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkflowTemplateManifest( - "20201115134934_tfod.yaml", + filepath.Join("tfod", "20201115134934.yaml"), tensorflowObjectDetectionWorkflowTemplateName, map[string]string{ "used-by": "cvat", diff --git a/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go b/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go new file mode 100644 index 00000000..20bd01aa --- /dev/null +++ b/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go @@ -0,0 +1,36 @@ +package migration + +import ( + "database/sql" + "github.com/pressly/goose" + "path/filepath" +) + +func initialize20201208155115() { + if _, ok := initializedMigrations[20201208155115]; !ok { + goose.AddMigration(Up20201208155115, Down20201208155115) + initializedMigrations[20201208155115] = true + } +} + +func Up20201208155115(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkflowTemplateManifest( + filepath.Join("tfod", "20201208155115.yaml"), + tensorflowObjectDetectionWorkflowTemplateName, + map[string]string{ + "used-by": "cvat", + }, + ) +} + +func Down20201208155115(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return updateWorkflowTemplateManifest( + filepath.Join("tfod", "20201130130433.yaml"), + tensorflowObjectDetectionWorkflowTemplateName, + map[string]string{ + "used-by": "cvat", + }, + ) +} diff --git a/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go b/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go new file mode 100644 index 00000000..46f2cb78 --- /dev/null +++ b/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go @@ -0,0 +1,36 @@ +package migration + +import ( + "database/sql" + "github.com/pressly/goose" + "path/filepath" +) + +func initialize20201208155805() { + if _, ok := initializedMigrations[20201208155805]; !ok { + goose.AddMigration(Up20201208155805, Down20201208155805) + initializedMigrations[20201208155805] = true + } +} + +func Up20201208155805(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkflowTemplateManifest( + filepath.Join("maskrcnn", "20201208155115.yaml"), + maskRCNNWorkflowTemplateName, + map[string]string{ + "used-by": "cvat", + }, + ) +} + +func Down20201208155805(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return updateWorkflowTemplateManifest( + filepath.Join("maskrcnn", "20201115145814.yaml"), + maskRCNNWorkflowTemplateName, + map[string]string{ + "used-by": "cvat", + }, + ) +} diff --git a/db/go/db.go b/db/go/db.go index f1aa668d..18f21d08 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -72,7 +72,9 @@ func Initialize() { initialize20201115133046() initialize20201115134934() initialize20201115145814() - initialize20201130130433() + initialize20201130130433() + initialize20201208155115() + initialize20201208155805() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) @@ -142,13 +144,21 @@ func ReplaceArtifactRepositoryType(client *v1.Client, namespace *v1.Namespace, w return nil } -// readDataFile returns the contents of a file in the db/data/{name} directory -func readDataFile(name string) (string, error) { +// readDataFile returns the contents of a file in the db/data/{path} directory +// path can indicate subdirectories like cvat/20201016170415.yaml +func readDataFile(path string) (string, error) { curDir, err := os.Getwd() if err != nil { return "", err } - data, err := ioutil.ReadFile(filepath.Join(curDir, "db", "data", name)) + + finalPath := []string{curDir, "db", "yaml"} + + for _, pathPart := range strings.Split(path, string(os.PathSeparator)) { + finalPath = append(finalPath, pathPart) + } + + data, err := ioutil.ReadFile(filepath.Join(finalPath...)) if err != nil { return "", err } diff --git a/db/data/20201016170415_cvat.yaml b/db/yaml/cvat/20201016170415.yaml similarity index 100% rename from db/data/20201016170415_cvat.yaml rename to db/yaml/cvat/20201016170415.yaml diff --git a/db/data/20201102104048_cvat.yaml b/db/yaml/cvat/20201102104048.yaml similarity index 100% rename from db/data/20201102104048_cvat.yaml rename to db/yaml/cvat/20201102104048.yaml diff --git a/db/data/20201113094916_cvat.yaml b/db/yaml/cvat/20201113094916.yaml similarity index 100% rename from db/data/20201113094916_cvat.yaml rename to db/yaml/cvat/20201113094916.yaml diff --git a/db/data/20201115133046_cvat.yaml b/db/yaml/cvat/20201115133046.yaml similarity index 100% rename from db/data/20201115133046_cvat.yaml rename to db/yaml/cvat/20201115133046.yaml diff --git a/db/data/jupyter_lab_20200929153931.yaml b/db/yaml/jupyterlab/20200929153931.yaml similarity index 100% rename from db/data/jupyter_lab_20200929153931.yaml rename to db/yaml/jupyterlab/20200929153931.yaml diff --git a/db/data/20201028145442_jupyterlab.yaml b/db/yaml/jupyterlab/20201028145442.yaml similarity index 100% rename from db/data/20201028145442_jupyterlab.yaml rename to db/yaml/jupyterlab/20201028145442.yaml diff --git a/db/data/20201031165106_jupyterlab.yaml b/db/yaml/jupyterlab/20201031165106.yaml similarity index 100% rename from db/data/20201031165106_jupyterlab.yaml rename to db/yaml/jupyterlab/20201031165106.yaml diff --git a/db/data/20201115145814_maskrcnn.yaml b/db/yaml/maskrcnn/20201115145814.yaml similarity index 100% rename from db/data/20201115145814_maskrcnn.yaml rename to db/yaml/maskrcnn/20201115145814.yaml diff --git a/db/yaml/maskrcnn/20201208155115.yaml b/db/yaml/maskrcnn/20201208155115.yaml new file mode 100644 index 00000000..d3994c5c --- /dev/null +++ b/db/yaml/maskrcnn/20201208155115.yaml @@ -0,0 +1,192 @@ +entrypoint: main +arguments: + parameters: + - name: source + value: https://github.com/onepanelio/Mask_RCNN.git + displayName: Model source code + type: hidden + visibility: private + + - name: cvat-annotation-path + value: annotation-dump/sample_dataset + hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. + displayName: Dataset path + visibility: private + + - name: cvat-output-path + value: workflow-data/output/sample_output + hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. + displayName: Workflow output path + visibility: private + + - name: cvat-finetune-checkpoint + value: '' + hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. + displayName: Checkpoint path + visibility: public + + - name: cvat-num-classes + displayName: Number of classes + hint: Number of classes (i.e in CVAT taks) + 1 for background + value: '81' + visibility: private + + - name: hyperparameters + displayName: Hyperparameters + visibility: public + type: textarea.textarea + value: |- + stage-1-epochs=1 # Epochs for network heads + stage-2-epochs=2 # Epochs for finetune layers + stage-3-epochs=3 # Epochs for all layers + hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." + + - name: dump-format + value: cvat_coco + displayName: CVAT dump format + visibility: public + + - name: tf-image + visibility: public + value: tensorflow/tensorflow:1.13.1-py3 + type: select.select + displayName: Select TensorFlow image + hint: Select the GPU image if you are running on a GPU node pool + options: + - name: 'TensorFlow 1.13.1 CPU Image' + value: 'tensorflow/tensorflow:1.13.1-py3' + - name: 'TensorFlow 1.13.1 GPU Image' + value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + + - displayName: Node pool + hint: Name of node pool or group to run this workflow task + type: select.select + visibility: public + name: sys-node-pool + value: Standard_D4s_v3 + required: true + options: + - name: 'CPU: 2, RAM: 8GB' + value: Standard_D2s_v3 + - name: 'CPU: 4, RAM: 16GB' + value: Standard_D4s_v3 + - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' + value: Standard_NC6 +templates: + - name: main + dag: + tasks: + - name: train-model + template: tensorflow + # Uncomment the lines below if you want to send Slack notifications + # - arguments: + # artifacts: + # - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}' + # name: metrics + # parameters: + # - name: status + # value: '{{tasks.train-model.status}}' + # dependencies: + # - train-model + # name: notify-in-slack + # template: slack-notify-success + - name: tensorflow + container: + args: + - | + apt-get update \ + && apt-get install -y git wget libglib2.0-0 libsm6 libxext6 libxrender-dev \ + && pip install -r requirements.txt \ + && pip install boto3 pyyaml google-cloud-storage \ + && git clone https://github.com/waleedka/coco \ + && cd coco/PythonAPI \ + && python setup.py build_ext install \ + && rm -rf build \ + && cd ../../ \ + && wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 \ + && python setup.py install && ls \ + && python samples/coco/cvat.py train --dataset=/mnt/data/datasets \ + --model=workflow_maskrcnn \ + --extras="{{workflow.parameters.hyperparameters}}" \ + --ref_model_path="{{workflow.parameters.cvat-finetune-checkpoint}}" \ + --num_classes="{{workflow.parameters.cvat-num-classes}}" \ + && cd /mnt/src/ \ + && python prepare_dataset.py /mnt/data/datasets/annotations/instances_default.json + command: + - sh + - -c + image: '{{workflow.parameters.tf-image}}' + volumeMounts: + - mountPath: /mnt/data + name: data + - mountPath: /mnt/output + name: output + workingDir: /mnt/src + nodeSelector: + beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}' + sidecars: + - name: tensorboard + image: tensorflow/tensorflow:2.3.0 + command: [sh, -c] + env: + - name: ONEPANEL_INTERACTIVE_SIDECAR + value: true + args: ["tensorboard --logdir /mnt/output/"] + ports: + - containerPort: 6006 + name: tensorboard + inputs: + artifacts: + - name: data + path: /mnt/data/datasets/ + {{.ArtifactRepositoryType}}: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' + - git: + repo: '{{workflow.parameters.source}}' + revision: "no-boto" + name: src + path: /mnt/src + outputs: + artifacts: + - name: model + optional: true + path: /mnt/output + {{.ArtifactRepositoryType}}: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' +# Uncomment the lines below if you want to send Slack notifications +#- container: +# args: +# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}" +# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd +# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify +# command: +# - sh +# - -c +# image: technosophos/slack-notify +# inputs: +# artifacts: +# - name: metrics +# optional: true +# path: /tmp/metrics.json +# parameters: +# - name: status +# name: slack-notify-success +volumeClaimTemplates: + - metadata: + creationTimestamp: null + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi + - metadata: + creationTimestamp: null + name: output + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi \ No newline at end of file diff --git a/db/data/20201115134934_tfod.yaml b/db/yaml/tfod/20201115134934.yaml similarity index 100% rename from db/data/20201115134934_tfod.yaml rename to db/yaml/tfod/20201115134934.yaml diff --git a/db/data/20201130130433_tfod.yaml b/db/yaml/tfod/20201130130433.yaml similarity index 100% rename from db/data/20201130130433_tfod.yaml rename to db/yaml/tfod/20201130130433.yaml diff --git a/db/yaml/tfod/20201208155115.yaml b/db/yaml/tfod/20201208155115.yaml new file mode 100644 index 00000000..68eb8707 --- /dev/null +++ b/db/yaml/tfod/20201208155115.yaml @@ -0,0 +1,223 @@ +entrypoint: main +arguments: + parameters: + - name: source + value: https://github.com/tensorflow/models.git + displayName: Model source code + type: hidden + visibility: private + + - name: trainingsource + value: https://github.com/onepanelio/cvat-training.git + type: hidden + visibility: private + + - name: revision + value: v1.13.0 + type: hidden + visibility: private + + - name: cvat-annotation-path + value: annotation-dump/sample_dataset + displayName: Dataset path + hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated. + visibility: private + + - name: cvat-output-path + value: workflow-data/output/sample_output + hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated. + displayName: Workflow output path + visibility: private + + - name: cvat-model + value: frcnn-res50-coco + displayName: Model + hint: TF Detection API's model to use for training. + type: select.select + visibility: public + options: + - name: 'Faster RCNN-ResNet 101-COCO' + value: frcnn-res101-coco + - name: 'Faster RCNN-ResNet 101-Low Proposal-COCO' + value: frcnn-res101-low + - name: 'Faster RCNN-ResNet 50-COCO' + value: frcnn-res50-coco + - name: 'Faster RCNN-NAS-COCO' + value: frcnn-nas-coco + - name: 'SSD MobileNet V1-COCO' + value: ssd-mobilenet-v1-coco2 + - name: 'SSD MobileNet V2-COCO' + value: ssd-mobilenet-v2-coco + - name: 'SSDLite MobileNet-COCO' + value: ssdlite-mobilenet-coco + + - name: hyperparameters + value: |- + num-steps=10000 + displayName: Hyperparameters + visibility: public + type: textarea.textarea + hint: "Please refer to our documentation for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow." + + - name: cvat-finetune-checkpoint + value: '' + hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model. + displayName: Checkpoint path + visibility: public + + - name: cvat-num-classes + value: '81' + hint: Number of classes + displayName: Number of classes + visibility: private + + - name: tf-image + value: tensorflow/tensorflow:1.13.1-py3 + type: select.select + displayName: Select TensorFlow image + visibility: public + hint: Select the GPU image if you are running on a GPU node pool + options: + - name: 'TensorFlow 1.13.1 CPU Image' + value: 'tensorflow/tensorflow:1.13.1-py3' + - name: 'TensorFlow 1.13.1 GPU Image' + value: 'tensorflow/tensorflow:1.13.1-gpu-py3' + + - displayName: Node pool + hint: Name of node pool or group to run this workflow task + type: select.select + name: sys-node-pool + value: Standard_D4s_v3 + visibility: public + required: true + options: + - name: 'CPU: 2, RAM: 8GB' + value: Standard_D2s_v3 + - name: 'CPU: 4, RAM: 16GB' + value: Standard_D4s_v3 + - name: 'GPU: 1xK80, CPU: 6, RAM: 56GB' + value: Standard_NC6 + - name: dump-format + value: cvat_tfrecord + visibility: public +templates: + - name: main + dag: + tasks: + - name: train-model + template: tensorflow + # Uncomment the lines below if you want to send Slack notifications + # - arguments: + # artifacts: + # - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}' + # name: metrics + # parameters: + # - name: status + # value: '{{tasks.train-model.status}}' + # dependencies: + # - train-model + # name: notify-in-slack + # template: slack-notify-success + - name: tensorflow + container: + args: + - | + apt-get update && \ + apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \ + pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \ + cd /mnt/src/tf/research && \ + export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim && \ + cd /mnt/src/train && \ + python convert_workflow.py \ + --extras="{{workflow.parameters.hyperparameters}}" \ + --model="{{workflow.parameters.cvat-model}}" \ + --num_classes="{{workflow.parameters.cvat-num-classes}}" \ + --sys_finetune_checkpoint={{workflow.parameters.cvat-finetune-checkpoint}} + command: + - sh + - -c + image: '{{workflow.parameters.tf-image}}' + volumeMounts: + - mountPath: /mnt/data + name: data + - mountPath: /mnt/output + name: output + workingDir: /mnt/src + nodeSelector: + beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}' + sidecars: + - name: tensorboard + image: tensorflow/tensorflow:2.3.0 + command: [sh, -c] + env: + - name: ONEPANEL_INTERACTIVE_SIDECAR + value: true + args: ["tensorboard --logdir /mnt/output/"] + ports: + - containerPort: 6006 + name: tensorboard + inputs: + artifacts: + - name: data + path: /mnt/data/datasets/ + {{.ArtifactRepositoryType}}: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' + - name: models + path: /mnt/data/models/ + optional: true + {{.ArtifactRepositoryType}}: + key: '{{workflow.parameters.cvat-finetune-checkpoint}}' + - git: + repo: '{{workflow.parameters.source}}' + revision: '{{workflow.parameters.revision}}' + name: src + path: /mnt/src/tf + - git: + repo: '{{workflow.parameters.trainingsource}}' + revision: 'optional-artifacts' + name: tsrc + path: /mnt/src/train + outputs: + artifacts: + - name: model + optional: true + path: /mnt/output + {{.ArtifactRepositoryType}}: + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' +# Uncomment the lines below if you want to send Slack notifications +#- container: +# args: +# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}" +# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd +# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify +# command: +# - sh +# - -c +# image: technosophos/slack-notify +# inputs: +# artifacts: +# - name: metrics +# optional: true +# path: /tmp/metrics.json +# parameters: +# - name: status +# name: slack-notify-success +volumeClaimTemplates: + - metadata: + creationTimestamp: null + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi + - metadata: + creationTimestamp: null + name: output + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 200Gi \ No newline at end of file diff --git a/db/data/vscode_20200929144301.yaml b/db/yaml/vscode/vscode_20200929144301.yaml similarity index 100% rename from db/data/vscode_20200929144301.yaml rename to db/yaml/vscode/vscode_20200929144301.yaml diff --git a/db/data/vscode_20201028145443.yaml b/db/yaml/vscode/vscode_20201028145443.yaml similarity index 100% rename from db/data/vscode_20201028145443.yaml rename to db/yaml/vscode/vscode_20201028145443.yaml From b1812006f9bcc0c6be1b2953b2e2b00b176978a4 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 8 Dec 2020 16:46:13 -0800 Subject: [PATCH 29/80] update: changed tty to be under the "ONEPANEL_INTERACTIVE_SIDECAR" --- pkg/workflow_execution.go | 54 ++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index 720908d0..85ab6669 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -53,6 +53,32 @@ var ( workflowTemplateVersionLabelKey = "onepanel.io/workflow-template-version" ) +// envVarValueInSidecars returns true if any of the sidecars contain an environment variable with the input name and value +// false otherwise +func envVarValueInSidecars(sidecars []wfv1.UserContainer, name, value string) bool { + for _, s := range sidecars { + for _, e := range s.Env { + if e.Name == name && e.Value == value { + return true + } + } + } + + return false +} + +// hasEnvVarValue returns true if any of the env vars have the given name and value +// false otherwise +func hasEnvVarValue(envVars []corev1.EnvVar, name, value string) bool { + for _, e := range envVars { + if e.Name == name && e.Value == value { + return true + } + } + + return false +} + func typeWorkflow(wf *wfv1.Workflow) (workflow *WorkflowExecution) { manifest, err := json.Marshal(wf) if err != nil { @@ -280,18 +306,13 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts if template.Metadata.Annotations == nil { template.Metadata.Annotations = make(map[string]string) } - template.Metadata.Annotations["sidecar.istio.io/inject"] = "false" + //For workflows with accessible sidecars, we need istio //Istio does not prevent the main container from stopping - sidecarLoop: - for _, s := range template.Sidecars { - for _, e := range s.Env { - if e.Name == "inject-istio" && e.Value == "true" { - template.Metadata.Annotations["sidecar.istio.io/inject"] = "true" - //Only need one instance to require istio injection - break sidecarLoop - } - } + if envVarValueInSidecars(template.Sidecars, "ONEPANEL_INTERACTIVE_SIDECAR", "true") { + template.Metadata.Annotations["sidecar.istio.io/inject"] = "true" + } else { + template.Metadata.Annotations["sidecar.istio.io/inject"] = "false" } if template.Container != nil { @@ -467,20 +488,13 @@ func (c *Client) injectAccessForSidecars(namespace string, wf *wfv1.Workflow) ([ for tIdx, t := range wf.Spec.Templates { //Inject services, virtual routes for si, s := range t.Sidecars { - //If TTY is true, sidecar needs to be accessible by HTTP + //If ONEPANEL_INTERACTIVE_SIDECAR is true, sidecar needs to be accessible by HTTP //Otherwise, we skip the sidecar - - hasInjectIstio := false - for _, e := range s.Env { - if e.Name == "inject-istio" && e.Value == "true" { - hasInjectIstio = true - break - } - } - + hasInjectIstio := hasEnvVarValue(s.Env, "ONEPANEL_INTERACTIVE_SIDECAR", "true") if !hasInjectIstio { continue } + if len(s.Ports) == 0 { msg := fmt.Sprintf("sidecar %s must have at least one port.", s.Name) return nil, util.NewUserError(codes.InvalidArgument, msg) From f9373561fb90f86851f180dfbc472a7ed5a6d50a Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 8 Dec 2020 16:50:42 -0800 Subject: [PATCH 30/80] chore: added missing migration comments --- db/go/20201115134934_add_tensorboard_to_tfod.go | 4 ++-- db/go/20201115145814_add_tensorboard_to_maskrcnn.go | 4 ++-- db/go/20201130130433_update_tfod_path.go | 4 ++-- db/go/20201208155115_replace_tty_with_env_var_for_tfod.go | 2 ++ db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go | 2 ++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/db/go/20201115134934_add_tensorboard_to_tfod.go b/db/go/20201115134934_add_tensorboard_to_tfod.go index 2f29f19c..69ddcbc0 100644 --- a/db/go/20201115134934_add_tensorboard_to_tfod.go +++ b/db/go/20201115134934_add_tensorboard_to_tfod.go @@ -13,7 +13,7 @@ func initialize20201115134934() { } } -//Up20201115134934 add TensorBoard sidecar to TFODs +// Up20201115134934 add TensorBoard sidecar to TFODs func Up20201115134934(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -25,7 +25,7 @@ func Up20201115134934(tx *sql.Tx) error { ) } -//Down20201115134934 do nothing +// Down20201115134934 do nothing func Down20201115134934(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return nil diff --git a/db/go/20201115145814_add_tensorboard_to_maskrcnn.go b/db/go/20201115145814_add_tensorboard_to_maskrcnn.go index e39a4042..62b6070e 100644 --- a/db/go/20201115145814_add_tensorboard_to_maskrcnn.go +++ b/db/go/20201115145814_add_tensorboard_to_maskrcnn.go @@ -13,7 +13,7 @@ func initialize20201115145814() { } } -//Up20201115145814 add TensorBoard sidecar to TFODs +// Up20201115145814 add TensorBoard sidecar to TFODs func Up20201115145814(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -25,7 +25,7 @@ func Up20201115145814(tx *sql.Tx) error { ) } -//Down20201115145814 do nothing +// Down20201115145814 do nothing func Down20201115145814(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return nil diff --git a/db/go/20201130130433_update_tfod_path.go b/db/go/20201130130433_update_tfod_path.go index d609f1fe..2e4cad44 100644 --- a/db/go/20201130130433_update_tfod_path.go +++ b/db/go/20201130130433_update_tfod_path.go @@ -13,7 +13,7 @@ func initialize20201130130433() { } } -//Up20201130130433 remove namespace to resolve checkpoint path issue +// Up20201130130433 remove namespace to resolve checkpoint path issue func Up20201130130433(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -25,7 +25,7 @@ func Up20201130130433(tx *sql.Tx) error { ) } -//Down20201130130433 do nothing +// Down20201130130433 do nothing func Down20201130130433(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkflowTemplateManifest( diff --git a/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go b/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go index 20bd01aa..defea30f 100644 --- a/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go +++ b/db/go/20201208155115_replace_tty_with_env_var_for_tfod.go @@ -13,6 +13,7 @@ func initialize20201208155115() { } } +// Up20201208155115 update the tfod workflow template to replace tty with an environment variable func Up20201208155115(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -24,6 +25,7 @@ func Up20201208155115(tx *sql.Tx) error { ) } +// Down20201208155115 rolls back the environment variable change func Down20201208155115(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkflowTemplateManifest( diff --git a/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go b/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go index 46f2cb78..bb6f4646 100644 --- a/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go +++ b/db/go/20201208155805_replace_tty_with_env_var_for_maskrcnn.go @@ -13,6 +13,7 @@ func initialize20201208155805() { } } +// Up20201208155805 update the maskrcnn workflow template to replace tty with an environment variable func Up20201208155805(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -24,6 +25,7 @@ func Up20201208155805(tx *sql.Tx) error { ) } +// Down20201208155805 rolls back the environment variable change func Down20201208155805(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkflowTemplateManifest( From 6d165921d8232f21e26f4942a659d308a0003a0c Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Tue, 8 Dec 2020 19:46:50 -0800 Subject: [PATCH 31/80] fix: yaml errors in new migration data --- db/yaml/maskrcnn/20201208155115.yaml | 6 +++--- db/yaml/tfod/20201208155115.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/db/yaml/maskrcnn/20201208155115.yaml b/db/yaml/maskrcnn/20201208155115.yaml index d3994c5c..82a2c836 100644 --- a/db/yaml/maskrcnn/20201208155115.yaml +++ b/db/yaml/maskrcnn/20201208155115.yaml @@ -130,7 +130,7 @@ templates: command: [sh, -c] env: - name: ONEPANEL_INTERACTIVE_SIDECAR - value: true + value: "true" args: ["tensorboard --logdir /mnt/output/"] ports: - containerPort: 6006 @@ -140,7 +140,7 @@ templates: - name: data path: /mnt/data/datasets/ {{.ArtifactRepositoryType}}: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' - git: repo: '{{workflow.parameters.source}}' revision: "no-boto" @@ -152,7 +152,7 @@ templates: optional: true path: /mnt/output {{.ArtifactRepositoryType}}: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' # Uncomment the lines below if you want to send Slack notifications #- container: # args: diff --git a/db/yaml/tfod/20201208155115.yaml b/db/yaml/tfod/20201208155115.yaml index 68eb8707..39168199 100644 --- a/db/yaml/tfod/20201208155115.yaml +++ b/db/yaml/tfod/20201208155115.yaml @@ -151,7 +151,7 @@ templates: command: [sh, -c] env: - name: ONEPANEL_INTERACTIVE_SIDECAR - value: true + value: "true" args: ["tensorboard --logdir /mnt/output/"] ports: - containerPort: 6006 @@ -161,12 +161,12 @@ templates: - name: data path: /mnt/data/datasets/ {{.ArtifactRepositoryType}}: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}' - name: models path: /mnt/data/models/ optional: true {{.ArtifactRepositoryType}}: - key: '{{workflow.parameters.cvat-finetune-checkpoint}}' + key: '{{workflow.parameters.cvat-finetune-checkpoint}}' - git: repo: '{{workflow.parameters.source}}' revision: '{{workflow.parameters.revision}}' @@ -183,7 +183,7 @@ templates: optional: true path: /mnt/output {{.ArtifactRepositoryType}}: - key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' + key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}' # Uncomment the lines below if you want to send Slack notifications #- container: # args: From f8a6670f2d13291484a0050e1ea87f1614d0345a Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 09:54:41 -0800 Subject: [PATCH 32/80] chore: double quotes to single quotes in yaml --- db/yaml/maskrcnn/20201208155115.yaml | 2 +- db/yaml/tfod/20201208155115.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/yaml/maskrcnn/20201208155115.yaml b/db/yaml/maskrcnn/20201208155115.yaml index 82a2c836..053b6378 100644 --- a/db/yaml/maskrcnn/20201208155115.yaml +++ b/db/yaml/maskrcnn/20201208155115.yaml @@ -130,7 +130,7 @@ templates: command: [sh, -c] env: - name: ONEPANEL_INTERACTIVE_SIDECAR - value: "true" + value: 'true' args: ["tensorboard --logdir /mnt/output/"] ports: - containerPort: 6006 diff --git a/db/yaml/tfod/20201208155115.yaml b/db/yaml/tfod/20201208155115.yaml index 39168199..f252d6f1 100644 --- a/db/yaml/tfod/20201208155115.yaml +++ b/db/yaml/tfod/20201208155115.yaml @@ -151,7 +151,7 @@ templates: command: [sh, -c] env: - name: ONEPANEL_INTERACTIVE_SIDECAR - value: "true" + value: 'true' args: ["tensorboard --logdir /mnt/output/"] ports: - containerPort: 6006 From 24409404f8e3322ac88bc3cd47be1d38878d9947 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 10:59:28 -0800 Subject: [PATCH 33/80] fix: wrong migration file names --- .../vscode/{vscode_20200929144301.yaml => 20200929144301.yaml} | 0 .../vscode/{vscode_20201028145443.yaml => 20201028145443.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename db/yaml/vscode/{vscode_20200929144301.yaml => 20200929144301.yaml} (100%) rename db/yaml/vscode/{vscode_20201028145443.yaml => 20201028145443.yaml} (100%) diff --git a/db/yaml/vscode/vscode_20200929144301.yaml b/db/yaml/vscode/20200929144301.yaml similarity index 100% rename from db/yaml/vscode/vscode_20200929144301.yaml rename to db/yaml/vscode/20200929144301.yaml diff --git a/db/yaml/vscode/vscode_20201028145443.yaml b/db/yaml/vscode/20201028145443.yaml similarity index 100% rename from db/yaml/vscode/vscode_20201028145443.yaml rename to db/yaml/vscode/20201028145443.yaml From f58263ddb2ae377de9695a2f8361929dd5da623a Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 11:03:20 -0800 Subject: [PATCH 34/80] fix: wrong migration folder --- ...1031165106_add_tensorboard_env_var_to_jupyterlab_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go b/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go index 2f2ec205..3ce39770 100644 --- a/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go +++ b/db/go/20201031165106_add_tensorboard_env_var_to_jupyterlab_template.go @@ -18,7 +18,7 @@ func initialize20201031165106() { func Up20201031165106(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkspaceTemplateManifest( - filepath.Join("jupyterlab.yaml", "20201031165106"), + filepath.Join("jupyterlab", "20201031165106.yaml"), jupyterLabTemplateName) } From 95e2516f66784ff79d417ea40f55092ad563faf9 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 11:08:24 -0800 Subject: [PATCH 35/80] fix: adjust curl to use specific version and fail on non 200 responses --- pkg/workflow_execution.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index 85ab6669..8946e2dc 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -1949,17 +1949,18 @@ with statistics about the workflow that was just executed. func getCURLNodeTemplate(name, curlMethod, curlPath, curlBody string, inputs wfv1.Inputs) (template *wfv1.Template, err error) { host := "onepanel-core.onepanel.svc.cluster.local" endpoint := fmt.Sprintf("http://%s%s", host, curlPath) + template = &wfv1.Template{ Name: name, Inputs: inputs, Container: &corev1.Container{ Name: "curl", - Image: "curlimages/curl", + Image: "curlimages/curl:7.73.0", Command: []string{"sh", "-c"}, Args: []string{ "SERVICE_ACCOUNT_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) " + "&& curl -X " + curlMethod + " -s -o /dev/null -w '%{http_code}' " + - "--connect-timeout 10 --retry 5 --retry-delay 5 " + + "--connect-timeout 10 --retry 10 --retry-delay 5 --retry-all-errors --fail " + "'" + endpoint + "' -H \"Content-Type: application/json\" -H 'Connection: keep-alive' -H 'Accept: application/json' " + "-H 'Authorization: Bearer '\"$SERVICE_ACCOUNT_TOKEN\"'' " + "--data '" + curlBody + "' --compressed", From ae998d000a7c19bb9570aa6cd3693cf6bebf9212 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 12:58:45 -0800 Subject: [PATCH 36/80] feat: update tensorflow migration --- ...201209124226_update_tensorflow_training.go | 36 +++++++++ db/go/db.go | 1 + db/yaml/tf_training/20200605090535.yaml | 75 +++++++++++++++++++ db/yaml/tf_training/20201209124226.yaml | 74 ++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 db/go/20201209124226_update_tensorflow_training.go create mode 100644 db/yaml/tf_training/20200605090535.yaml create mode 100644 db/yaml/tf_training/20201209124226.yaml diff --git a/db/go/20201209124226_update_tensorflow_training.go b/db/go/20201209124226_update_tensorflow_training.go new file mode 100644 index 00000000..b77afd40 --- /dev/null +++ b/db/go/20201209124226_update_tensorflow_training.go @@ -0,0 +1,36 @@ +package migration + +import ( + "database/sql" + "github.com/pressly/goose" + "path/filepath" +) + +func initialize20201209124226() { + if _, ok := initializedMigrations[20201209124226]; !ok { + goose.AddMigration(Up20201209124226, Down20201209124226) + initializedMigrations[20201209124226] = true + } +} + +func Up20201209124226(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkflowTemplateManifest( + filepath.Join("tf_training", "20201209124226.yaml"), + tensorflowWorkflowTemplateName, + map[string]string{ + "framework": "tensorflow", + }, + ) +} + +func Down20201209124226(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return updateWorkflowTemplateManifest( + filepath.Join("tf_training", "20200605090535.yaml"), + tensorflowWorkflowTemplateName, + map[string]string{ + "framework": "tensorflow", + }, + ) +} diff --git a/db/go/db.go b/db/go/db.go index 18f21d08..98de142c 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -75,6 +75,7 @@ func Initialize() { initialize20201130130433() initialize20201208155115() initialize20201208155805() + initialize20201209124226() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) diff --git a/db/yaml/tf_training/20200605090535.yaml b/db/yaml/tf_training/20200605090535.yaml new file mode 100644 index 00000000..c5ea0bc8 --- /dev/null +++ b/db/yaml/tf_training/20200605090535.yaml @@ -0,0 +1,75 @@ +entrypoint: main +arguments: + parameters: + - name: source + value: https://github.com/onepanelio/tensorflow-examples.git + - name: command + value: "python mnist/main.py --epochs=5" +volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 2Gi + - metadata: + name: output + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 2Gi +templates: + - name: main + dag: + tasks: + - name: train-model + template: pytorch + # Uncomment section below to send metrics to Slack + # - name: notify-in-slack + # dependencies: [train-model] + # template: slack-notify-success + # arguments: + # parameters: + # - name: status + # value: "{{tasks.train-model.status}}" + # artifacts: + # - name: metrics + # from: "{{tasks.train-model.outputs.artifacts.sys-metrics}}" + - name: pytorch + inputs: + artifacts: + - name: src + path: /mnt/src + git: + repo: "{{workflow.parameters.source}}" + outputs: + artifacts: + - name: model + path: /mnt/output + optional: true + archive: + none: {} + container: + image: tensorflow/tensorflow:latest + command: [sh,-c] + args: ["{{workflow.parameters.command}}"] + workingDir: /mnt/src + volumeMounts: + - name: data + mountPath: /mnt/data + - name: output + mountPath: /mnt/output + - name: slack-notify-success + container: + image: technosophos/slack-notify + command: [sh,-c] + args: ['SLACK_USERNAME=Worker SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify'] + inputs: + parameters: + - name: status + artifacts: + - name: metrics + path: /tmp/metrics.json + optional: true \ No newline at end of file diff --git a/db/yaml/tf_training/20201209124226.yaml b/db/yaml/tf_training/20201209124226.yaml new file mode 100644 index 00000000..9ea19f61 --- /dev/null +++ b/db/yaml/tf_training/20201209124226.yaml @@ -0,0 +1,74 @@ +entrypoint: main +templates: + - name: main + dag: + tasks: + - name: train-model + template: tf-dense + - name: tf-dense + script: + image: tensorflow/tensorflow:2.3.0 + command: + - python + - '-u' + source: | + import tensorflow as tf + import datetime + + mnist = tf.keras.datasets.mnist + + (x_train, y_train),(x_test, y_test) = mnist.load_data() + x_train, x_test = x_train / 255.0, x_test / 255.0 + + def create_model(): + return tf.keras.models.Sequential([ + tf.keras.layers.Flatten(input_shape=(28, 28)), + tf.keras.layers.Dense(512, activation='relu'), + tf.keras.layers.Dropout(0.2), + tf.keras.layers.Dense(10, activation='softmax') + ]) + + model = create_model() + model.compile(optimizer='adam', + loss='sparse_categorical_crossentropy', + metrics=['accuracy']) + + # Write logs to /mnt/output + log_dir = "/mnt/output/logs/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") + tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1) + + history = model.fit(x=x_train, + y=y_train, + epochs=10, + validation_data=(x_test, y_test), + callbacks=[tensorboard_callback]) + volumeMounts: + # TensorBoard sidecar will automatically mount this volume + - name: output + mountPath: /mnt/output + + sidecars: + - name: tensorboard + image: 'tensorflow/tensorflow:2.3.0' + command: + - sh + - '-c' + env: + - name: ONEPANEL_INTERACTIVE_SIDECAR + value: 'true' + args: + # Read logs from /mnt/output - this directory is auto-mounted from volumeMounts + - tensorboard --logdir /mnt/output/ + ports: + - containerPort: 6006 + name: tensorboard + +volumeClaimTemplates: + # Provision a volume that can be shared between main container and TensorBoard side car + - metadata: + name: output + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 2Gi \ No newline at end of file From 7f5d52cb130bb49115f16caf85f3b91b0d819a72 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 13:03:05 -0800 Subject: [PATCH 37/80] chore: migration method comments --- db/go/20201209124226_update_tensorflow_training.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/go/20201209124226_update_tensorflow_training.go b/db/go/20201209124226_update_tensorflow_training.go index b77afd40..433b6b5a 100644 --- a/db/go/20201209124226_update_tensorflow_training.go +++ b/db/go/20201209124226_update_tensorflow_training.go @@ -13,6 +13,7 @@ func initialize20201209124226() { } } +// Up20201209124226 updates the tensorflow workflow func Up20201209124226(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkflowTemplateManifest( @@ -24,6 +25,7 @@ func Up20201209124226(tx *sql.Tx) error { ) } +// Down20201209124226 rolls back the tensorflow workflow func Down20201209124226(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkflowTemplateManifest( From 92c387a622c4b857bc59215a3553343496b02aba Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 9 Dec 2020 13:39:15 -0800 Subject: [PATCH 38/80] update: tf training with epochs --- db/yaml/tf_training/20201209124226.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/db/yaml/tf_training/20201209124226.yaml b/db/yaml/tf_training/20201209124226.yaml index 9ea19f61..6ccd88d0 100644 --- a/db/yaml/tf_training/20201209124226.yaml +++ b/db/yaml/tf_training/20201209124226.yaml @@ -1,3 +1,7 @@ +arguments: + parameters: + - name: epochs + value: '10' entrypoint: main templates: - name: main @@ -14,12 +18,9 @@ templates: source: | import tensorflow as tf import datetime - mnist = tf.keras.datasets.mnist - (x_train, y_train),(x_test, y_test) = mnist.load_data() x_train, x_test = x_train / 255.0, x_test / 255.0 - def create_model(): return tf.keras.models.Sequential([ tf.keras.layers.Flatten(input_shape=(28, 28)), @@ -27,26 +28,22 @@ templates: tf.keras.layers.Dropout(0.2), tf.keras.layers.Dense(10, activation='softmax') ]) - model = create_model() model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) - # Write logs to /mnt/output log_dir = "/mnt/output/logs/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1) - history = model.fit(x=x_train, y=y_train, - epochs=10, + epochs={{workflow.parameters.epochs}}, validation_data=(x_test, y_test), callbacks=[tensorboard_callback]) volumeMounts: # TensorBoard sidecar will automatically mount this volume - name: output mountPath: /mnt/output - sidecars: - name: tensorboard image: 'tensorflow/tensorflow:2.3.0' @@ -62,7 +59,6 @@ templates: ports: - containerPort: 6006 name: tensorboard - volumeClaimTemplates: # Provision a volume that can be shared between main container and TensorBoard side car - metadata: From 37f1c0b6eb385ff16e987f133d731ea260327034 Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Thu, 10 Dec 2020 14:15:55 -0800 Subject: [PATCH 39/80] correctly add resources to script templates --- pkg/workflow_execution.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index 5114faa8..a72be5fa 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -267,7 +267,7 @@ func (c *Client) injectHostPortAndResourcesToContainer(template *wfv1.Template, if template.Script != nil { template.Script.Container.Ports = ports if n != nil && n.Resources.Limits != nil { - template.Container.Resources = n.Resources + template.Script.Container.Resources = n.Resources } } return nil From 5d0d84c5d7987915ff41151d04cc1e690a65960c Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 10 Dec 2020 17:16:38 -0800 Subject: [PATCH 40/80] fix: issue where workspace params (like new node pool) were not updated when a workspace was upgraded. --- pkg/workspace.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index ae27fd29..2b8a2419 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -122,8 +122,8 @@ func updateWorkspaceStatusBuilder(namespace, uid string, status *WorkspaceStatus } // mergeWorkspaceParameters combines two parameter arrays. If a parameter in newParameters is not in -// the existing ones, it is added. If it is, it is ignored. -func mergeWorkspaceParameters(existingParameters, newParameters []Parameter) (parameters []Parameter) { +// the existing ones, it is added. If it is and override is true, it is replaced. Otherwise it is ignored. +func mergeWorkspaceParameters(existingParameters, newParameters []Parameter, override bool) (parameters []Parameter) { parameterMap := make(map[string]*string, 0) for _, p := range newParameters { parameterMap[p.Name] = p.Value @@ -134,12 +134,14 @@ func mergeWorkspaceParameters(existingParameters, newParameters []Parameter) (pa } for _, p := range existingParameters { - _, ok := parameterMap[p.Name] + newParam, ok := parameterMap[p.Name] if !ok { parameters = append(parameters, Parameter{ Name: p.Name, Value: p.Value, }) + } else { + p.Value = newParam } } @@ -169,7 +171,7 @@ func injectWorkspaceSystemParameters(namespace string, workspace *Workspace, wor Value: ptr.String(host), }, } - workspace.Parameters = mergeWorkspaceParameters(workspace.Parameters, systemParameters) + workspace.Parameters = mergeWorkspaceParameters(workspace.Parameters, systemParameters, false) return } @@ -742,7 +744,7 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction return } - workspace.Parameters = mergeWorkspaceParameters(workspace.Parameters, parameters) + workspace.Parameters = mergeWorkspaceParameters(workspace.Parameters, parameters, true) parametersJSON, err := json.Marshal(workspace.Parameters) if err != nil { return From 50a57f049cb549afa2146f72f7b9103904b0eb15 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 10 Dec 2020 20:26:35 -0800 Subject: [PATCH 41/80] chore: revert argo updates --- go.mod | 39 ++-- go.sum | 375 +------------------------------------- pkg/workflow_execution.go | 47 ++--- pkg/workspace_template.go | 7 +- 4 files changed, 30 insertions(+), 438 deletions(-) diff --git a/go.mod b/go.mod index 16bd4408..d32e7c90 100644 --- a/go.mod +++ b/go.mod @@ -3,23 +3,22 @@ module github.com/onepanelio/core go 1.14 require ( - cloud.google.com/go/storage v1.6.0 github.com/Azure/go-autorest v14.0.0+incompatible // indirect + cloud.google.com/go/storage v1.6.0 github.com/Azure/go-autorest/autorest/adal v0.8.2 // indirect github.com/Masterminds/squirrel v1.1.0 - github.com/argoproj/argo v0.0.0-20201001162359-6f738db0733d - github.com/argoproj/pkg v0.1.0 + github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6 + github.com/argoproj/pkg v0.0.0-20200318225345-d3be5f29b1a8 github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 - github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 // indirect github.com/evanphx/json-patch v4.5.0+incompatible // indirect github.com/ghodss/yaml v1.0.0 github.com/go-sql-driver/mysql v1.5.0 // indirect - github.com/golang/protobuf v1.4.2 - github.com/google/uuid v1.1.1 + github.com/golang/protobuf v1.4.1 + github.com/google/uuid v1.1.2 github.com/gorilla/handlers v1.4.2 github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.14.6 + github.com/grpc-ecosystem/grpc-gateway v1.14.4 github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/jmoiron/sqlx v1.2.0 @@ -28,27 +27,21 @@ require ( github.com/minio/minio-go/v6 v6.0.45 github.com/pkg/errors v0.9.1 github.com/pressly/goose v2.6.0+incompatible - github.com/sirupsen/logrus v1.6.0 - github.com/stretchr/testify v1.6.1 + github.com/sirupsen/logrus v1.4.2 + github.com/spf13/cobra v0.0.5 // indirect + github.com/stretchr/testify v1.4.0 github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc - golang.org/x/net v0.0.0-20200602114024-627f9648deb9 + golang.org/x/net v0.0.0-20200301022130-244492dfa37a golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 - google.golang.org/grpc v1.29.1 - google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc + google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 + google.golang.org/grpc v1.28.0 + google.golang.org/protobuf v1.22.0 gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 istio.io/api v0.0.0-20200107183329-ed4b507c54e1 - k8s.io/api v0.18.2 - k8s.io/apimachinery v0.18.2 - k8s.io/client-go v0.18.2 - sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e // indirect + k8s.io/api v0.16.4 + k8s.io/apimachinery v0.16.7-beta.0 + k8s.io/client-go v0.16.4 sigs.k8s.io/yaml v1.2.0 ) - -replace ( - k8s.io/api => k8s.io/api v0.17.8 - k8s.io/apimachinery => k8s.io/apimachinery v0.17.8 - k8s.io/client-go => k8s.io/client-go v0.17.8 -) diff --git a/go.sum b/go.sum index cfb2ef6d..cdced41e 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bou.ke/staticfiles v0.0.0-20190225145250-827d7f6389cd/go.mod h1:JpKWzdMX3ZBe8DYU+jWnZyYT4tJR9pMee/kPGvap41o= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -27,7 +26,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v11.1.2+incompatible h1:viZ3tV5l4gE2Sw0xrasFHytCGtzYCrT+um/rrSQ1BfA= github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.0.0+incompatible h1:r/ug62X9o8vikt53/nkAPmFmzfSrCCAplPH7wa+mK0U= @@ -51,20 +49,16 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/squirrel v1.1.0 h1:baP1qLdoQCeTw3ifCdOq2dkYc6vGcmRdaociKLbEJXs= github.com/Masterminds/squirrel v1.1.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -72,83 +66,47 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/aliyun/aliyun-oss-go-sdk v2.0.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antonmedv/expr v1.8.2/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmHhwGEk8= github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6 h1:461HWTh6d9fbXX9CWR98Nv/3z70/YgtbQCMiZPKHNa8= github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6/go.mod h1:EPALpXM4ZpKFbQmKn722bvQUiirWNIsNe1MgmTltZkI= -github.com/argoproj/argo v0.0.0-20201001162359-6f738db0733d h1:COfGhXvHFTSK4rDukuG5upwjrarf0FH4onjdyaS4wmg= -github.com/argoproj/argo v0.0.0-20201001162359-6f738db0733d/go.mod h1:w8Qx0tlO5/sQJK+KZ22i0RfhSf9MCdDX3oB11eS5/fE= github.com/argoproj/pkg v0.0.0-20200318225345-d3be5f29b1a8 h1:RMfnXz1F/mOr2bBwMpShDH+HlWf7MWisDmxNZmoWH2s= github.com/argoproj/pkg v0.0.0-20200318225345-d3be5f29b1a8/go.mod h1:2EZ44RG/CcgtPTwrRR0apOc7oU6UIw8GjCUJWZ8X3bM= -github.com/argoproj/pkg v0.1.0 h1:JRgyisq1qByfl4EEuaJgYSMxMnNENjgj/U3FEfEJxLM= -github.com/argoproj/pkg v0.1.0/go.mod h1:3mBVZkOKuRChHVdLt76H7y0MLuKJ8ag8LjLxB/evmnM= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.33.16/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/colinmarc/hdfs v1.1.4-0.20180805212432-9746310a4d31 h1:ow7T77012NSZVW0uOWoQxz3yj9fHKYeZ4QmNrMtWMbM= github.com/colinmarc/hdfs v1.1.4-0.20180805212432-9746310a4d31/go.mod h1:vSBumefK4HA5uiRSwNP+3ofgrEoScpCS2MMWcWXEuQ4= -github.com/corbym/gocrest v1.0.3/go.mod h1:maVFL5lbdS2PgfOQgGRWDYTeunSWQeiEgoNdTABShCs= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= -github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c h1:ZfSZ3P3BedhKGUhzj7BQlPSU4OvT6tfOKe3DVHzOA7s= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2 h1:dWB6v3RcOy03t/bUadywsbyrQwCqZeNIEX6M1OtSZOM= @@ -166,132 +124,42 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/gavv/httpexpect/v2 v2.0.3/go.mod h1:LAoDcy8I/EXEtKJV6wMEJvOMAZVo0MfEk5u4NfiNQa4= -github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= -github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.51.1/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-ini/ini v1.57.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.12/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.8 h1:vfK6jLhs7OI4tAXkvkooviaE1JEPcw3mutyegLHHjmk= -github.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-openapi/validate v0.19.7/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-swagger/go-swagger v0.23.0/go.mod h1:5AaV4Dx69cUjpFRTZnSHPr1Y7dKBVk6SvfIvkTEqwJs= -github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013/go.mod h1:b65mBPzqzZWxOZGxSWrqs4GInLIn+u99Q9q7p+GKni0= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -302,7 +170,6 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= @@ -329,9 +196,6 @@ github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -346,8 +210,6 @@ github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSN github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -365,8 +227,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0 h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= @@ -377,28 +237,15 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.0.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8sDVD8j3+tleDU= github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= -github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o= -github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= @@ -415,7 +262,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imkira/go-interpol v1.0.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -425,20 +271,14 @@ github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -446,21 +286,14 @@ github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7 github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= @@ -470,7 +303,6 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= @@ -478,42 +310,21 @@ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6Fm github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lucasb-eyer/go-colorful v1.0.2/go.mod h1:0MS4r+7BZKSJ5mw4/S5MPN+qHFF1fYclkSPilDOKW0s= -github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goreman v0.3.5/go.mod h1:ahZuLhEo4pfYmf56GLNu/pjTxfeE389h43IHKMXz2Ys= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/minio-go v6.0.14+incompatible h1:fnV+GD28LeqdN6vT2XdGKW8Qe/IfjJDswNVuni6km9o= github.com/minio/minio-go v6.0.14+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8= github.com/minio/minio-go/v6 v6.0.45 h1:aY4NI/DOgSbZiwGN3fEF4NAkC9An4bhaIWuJrQrRYew= github.com/minio/minio-go/v6 v6.0.45/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= -github.com/minio/minio-go/v7 v7.0.2/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns= github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -527,33 +338,22 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -562,59 +362,32 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pressly/goose v2.6.0+incompatible h1:3f8zIQ8rfgP9tyI0Hmcs2YNAqUCL1c+diLe3iU8Qd/k= github.com/pressly/goose v2.6.0+incompatible/go.mod h1:m+QHWCqxR3k8D9l7qfzuC/djtlfzxr34mozWDYEu1z8= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= -github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84= -github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sanity-io/litter v1.2.0/go.mod h1:JF6pZUFgu2Q0sBZ+HSV35P8TVPI1TTzEwyu9FXAw2W4= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -622,91 +395,56 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.4-0.20181021141114-fe5e611709b0/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/gjson v1.3.5/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls= github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc h1:yUaosFVTJwnltaHbSNC3i82I92quFs+OFPRl8kNMVwo= github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v0.0.0-20171207120941-e5f51c11919d/go.mod h1:+g/po7GqyG5E+1CNgquiIxJnsXEi5vwFn5weFujbO78= -github.com/valyala/fasthttp v1.0.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/fasttemplate v1.1.0 h1:RZqt0yGBsps8NGvLSGW804QQqCUYYLsaOjTVHy1Ocw4= github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yudai/gojsondiff v0.0.0-20170107030110-7b1b7adf999d/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.1/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -717,28 +455,18 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d h1:9FCpayM9Egr1baVnV1SX0H87m+XB0B8S0hAMi99X/3U= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= @@ -772,14 +500,10 @@ golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -789,8 +513,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -801,8 +523,6 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -814,7 +534,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= @@ -823,7 +542,6 @@ golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -831,25 +549,16 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -858,11 +567,8 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -871,7 +577,6 @@ golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5f golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= @@ -881,29 +586,21 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -920,18 +617,13 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200317043434-63da46f3035e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312 h1:2PHG+Ia3gK1K2kjxZnSylizb//eyaMG8gDFbOG7wLV8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -970,12 +662,8 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200317114155-1f3552e48f24/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -986,8 +674,6 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -996,30 +682,21 @@ google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zim google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc h1:TnonUr8u3himcMY0vSh23jFOXA+cnucl1gB6EQTReBI= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gavv/httpexpect.v2 v2.0.0/go.mod h1:uMEAayJd5rI8SqPSUiHbQFyj5OTNrBgkLUYex48OYGc= -gopkg.in/go-playground/webhooks.v5 v5.15.0/go.mod h1:LZbya/qLVdbqDR1aKrGuWV6qbia2zCYSR5dpom2SInQ= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.52.0 h1:j+Lt/M1oPPejkniCg1TkWE2J3Eh1oZTsHSXzMTzUXn4= gopkg.in/ini.v1 v1.52.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.54.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw= gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM= @@ -1031,18 +708,12 @@ gopkg.in/jcmturner/gokrb5.v5 v5.3.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfI gopkg.in/jcmturner/rpc.v0 v0.0.2 h1:wBTgrbL1qmLBUPsYVCqdJiI5aJgQhexmK+JkTHPUNJI= gopkg.in/jcmturner/rpc.v0 v0.0.2/go.mod h1:NzMq6cRzR9lipgw7WxRBHNx5N8SifBuaCQsOT1kWY/E= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.4.1 h1:H0TmLt7/KmzlrDOpa1F+zr0Tk90PbJYBfsVUmRLrf9Y= -gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1050,11 +721,8 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1070,34 +738,15 @@ k8s.io/api v0.0.0-20191004120003-3a12735a829a/go.mod h1:ceHJE/vDjU8jKnRV6Vqn/+vy k8s.io/api v0.0.0-20191219150132-17cfeff5d095/go.mod h1:VTIBWh+oVNX3+w6a85XIJE6jGsm0GCZKZmRQ6cdjfyA= k8s.io/api v0.16.4 h1:O06Ed/hgLiCrzW1SHp6HAhqcTnYHtK80bP5rXoHakpM= k8s.io/api v0.16.4/go.mod h1:AtzMnsR45tccQss5q8RnF+W8L81DH6XwXwo/joEx9u0= -k8s.io/api v0.17.8 h1:8JHlbqJ3A6sGhoacXfu/sASSD+HWWqVq67qt9lyB0kU= -k8s.io/api v0.17.8/go.mod h1:N++Llhs8kCixMUoCaXXAyMMPbo8dDVnh+IQ36xZV2/0= -k8s.io/api v0.18.2 h1:wG5g5ZmSVgm5B+eHMIbI9EGATS2L8Z72rda19RIEgY8= -k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= -k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= k8s.io/apimachinery v0.0.0-20191004115701-31ade1b30762/go.mod h1:Xc10RHc1U+F/e9GCloJ8QAeCGevSVP5xhOhqlE+e1kM= k8s.io/apimachinery v0.0.0-20191219145857-f69eda767ee8/go.mod h1:mhhO3hoLkWO+2eCvqjPtH2Ly92l9nJDwsswzWKpkN2w= k8s.io/apimachinery v0.16.4/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= k8s.io/apimachinery v0.16.7-beta.0 h1:1cNiN7ZXJzlWq7dnWojG5UcrX1AIfQqpbyuzhu7Bhsc= k8s.io/apimachinery v0.16.7-beta.0/go.mod h1:mhhO3hoLkWO+2eCvqjPtH2Ly92l9nJDwsswzWKpkN2w= -k8s.io/apimachinery v0.17.8 h1:zXvd8rYMAjRJXpILP9tdAiUnFIENM9EmHuE81apIoms= -k8s.io/apimachinery v0.17.8/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbbA= -k8s.io/apimachinery v0.18.2 h1:44CmtbmkzVDAhCpRVSiP2R5PPrC2RtlIv/MoB8xpdRA= -k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= k8s.io/client-go v0.0.0-20191225075139-73fd2ddc9180/go.mod h1:ksVkYlACXo9hR9AV+cYyCkuWL1xnWcGtAFxsfqMcozg= k8s.io/client-go v0.16.4 h1:sf+FEZXYhJNjpTZapQDLvvN+0kBeUTxCYxlXcVdhv2E= k8s.io/client-go v0.16.4/go.mod h1:ZgxhFDxSnoKY0J0U2/Y1C8obKDdlhGPZwA7oHH863Ok= -k8s.io/client-go v0.17.8 h1:cuZSfjqVrNjoZ3wViQHljFPyWMOcgxUjjmQs5Rifbxk= -k8s.io/client-go v0.17.8/go.mod h1:SJsDS64AAtt9VZyeaQMb4Ck5etCitZ/FwajWdzua5eY= -k8s.io/client-go v0.18.2 h1:aLB0iaD4nmwh7arT2wIn+lMnAq7OswjaejkQ8p9bBYE= -k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= -k8s.io/code-generator v0.17.5/go.mod h1:qdiSCSTKtS+3WtPelj2h57fylSQcPUlhMVm+TD9Dvqc= -k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1108,37 +757,15 @@ k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= -k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 h1:NeQXVJ2XFSkRoPzRo8AId01ZER+j8oV4SZADT4iBOXQ= -k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191218082557-f07c713de883 h1:TA8t8OLS8m3/0dtTckekO0pCQ7qMnD19fsZTQEgCSKQ= k8s.io/utils v0.0.0-20191218082557-f07c713de883/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200327001022-6496210b90e8 h1:6JFbaLjRyBz8K2Jvt+pcT+N3vvwMZfg8MfVENwe9aag= -k8s.io/utils v0.0.0-20200327001022-6496210b90e8/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -moul.io/http2curl v1.0.1-0.20190925090545-5cd742060b0e/go.mod h1:nejbQVfXh96n9dSF6cH3Jsk/QI1Z2oEL7sSI2ifXFNA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -upper.io/db.v3 v3.6.3+incompatible h1:SJLWd7H56Vwm4rYa+cHAQDYWcvvOt1C/5PD/IIBZPW8= -upper.io/db.v3 v3.6.3+incompatible/go.mod h1:FgTdD24eBjJAbPKsQSiHUNgXjOR4Lub3u1UMHSIh82Y= +upper.io/db.v3 v3.6.3+incompatible/go.mod h1:FgTdD24eBjJAbPKsQSiHUNgXjOR4Lub3u1UMHSIh82Y= \ No newline at end of file diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index a72be5fa..a881e92a 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -8,8 +8,6 @@ import ( "errors" "fmt" sq "github.com/Masterminds/squirrel" - "github.com/argoproj/argo/persist/sqldb" - "github.com/argoproj/argo/workflow/hydrator" "github.com/google/uuid" "github.com/onepanelio/core/pkg/util/gcs" "github.com/onepanelio/core/pkg/util/label" @@ -775,12 +773,11 @@ func (c *Client) ValidateWorkflowExecution(namespace string, manifest []byte) (e } wftmplGetter := templateresolution.WrapWorkflowTemplateInterface(c.ArgoprojV1alpha1().WorkflowTemplates(namespace)) - cwftmplGetter := templateresolution.WrapClusterWorkflowTemplateInterface(c.argoprojV1alpha1.ClusterWorkflowTemplates()) for _, wf := range workflows { if err = c.injectAutomatedFields(namespace, &wf, &WorkflowExecutionOptions{}); err != nil { return err } - _, err = validate.ValidateWorkflow(wftmplGetter, cwftmplGetter, &wf, validate.ValidateOpts{}) + _, err = validate.ValidateWorkflow(wftmplGetter, &wf, validate.ValidateOpts{}) if err != nil { return } @@ -1476,8 +1473,7 @@ func (c *Client) RetryWorkflowExecution(namespace, uid string) (workflow *Workfl return } - h := hydrator.New(sqldb.ExplosiveOffloadNodeStatusRepo) - wf, err = argoutil.RetryWorkflow(c, h, c.ArgoprojV1alpha1().Workflows(namespace), wf, true, "") + wf, err = argoutil.RetryWorkflow(c, c.ArgoprojV1alpha1().Workflows(namespace), wf) workflow = typeWorkflow(wf) @@ -1495,7 +1491,7 @@ func (c *Client) ResubmitWorkflowExecution(namespace, uid string) (workflow *Wor return } - wf, err = argoutil.SubmitWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), c, namespace, wf, &wfv1.SubmitOpts{}) + wf, err = argoutil.SubmitWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), c, namespace, wf, &argoutil.SubmitOpts{}) if err != nil { return } @@ -1506,9 +1502,7 @@ func (c *Client) ResubmitWorkflowExecution(namespace, uid string) (workflow *Wor } func (c *Client) ResumeWorkflowExecution(namespace, uid string) (workflow *WorkflowExecution, err error) { - // TODO Review hydrator - h := hydrator.New(sqldb.ExplosiveOffloadNodeStatusRepo) - err = argoutil.ResumeWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), h, uid, "") + err = argoutil.ResumeWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), uid, "") if err != nil { return } @@ -1542,8 +1536,7 @@ func (c *Client) TerminateWorkflowExecution(namespace, uid string) (err error) { return err } - h := hydrator.New(sqldb.ExplosiveOffloadNodeStatusRepo) - err = argoutil.StopWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), h, uid, "", "") + err = argoutil.StopWorkflow(c.ArgoprojV1alpha1().Workflows(namespace), uid, "", "") return } @@ -1705,22 +1698,20 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error return manifest, nil } - specMap, err := convertMapToStringKeys(spec.(map[interface{}]interface{})) - if err != nil { + specMap, ok := spec.(map[string]interface{}) + if !ok { return manifest, nil } - data["spec"] = specMap arguments, ok := specMap["arguments"] if !ok { return manifest, nil } - argumentsMap, err := convertMapToStringKeys(arguments.(map[interface{}]interface{})) - if err != nil { + argumentsMap, ok := arguments.(map[string]interface{}) + if !ok { return manifest, nil } - specMap["arguments"] = argumentsMap parameters, ok := argumentsMap["parameters"] if !ok { @@ -1736,8 +1727,8 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error parametersToKeep := make([]interface{}, 0) for _, parameter := range parametersList { - paramMap, err := convertMapToStringKeys(parameter.(map[interface{}]interface{})) - if err != nil { + paramMap, ok := parameter.(map[string]interface{}) + if !ok { continue } @@ -1746,7 +1737,7 @@ func filterOutCustomTypesFromManifest(manifest []byte) (result []byte, err error paramMap["value"] = "" } - parametersToKeep = append(parametersToKeep, paramMap) + parametersToKeep = append(parametersToKeep, parameter) keysToDelete := make([]string, 0) for key := range paramMap { @@ -2256,17 +2247,3 @@ func (c *Client) UpdateWorkflowExecutionMetrics(namespace, uid string, metrics M return } - -func convertMapToStringKeys(input map[interface{}]interface{}) (output map[string]interface{}, err error) { - output = make(map[string]interface{}) - for key, value := range input { - keyString, ok := key.(string) - if ok { - output[keyString] = value - } else { - return nil, fmt.Errorf("unable to parse key as a string") - } - } - - return output, nil -} diff --git a/pkg/workspace_template.go b/pkg/workspace_template.go index 87f48805..bcea6d78 100644 --- a/pkg/workspace_template.go +++ b/pkg/workspace_template.go @@ -528,12 +528,7 @@ func unmarshalWorkflowTemplate(spec *WorkspaceSpec, serviceManifest, virtualServ continue } - // We wrap the name in quotes as it has to be JSON friendly - item, err := wfv1.ParseItem(`"` + v.Name + `"`) - if err != nil { - return "", err - } - volumeClaimItems = append(volumeClaimItems, item) + volumeClaimItems = append(volumeClaimItems, wfv1.Item{Type: wfv1.String, StrVal: v.Name}) volumeClaimsMapped[v.Name] = true } From 6f9f8ed1644a21a813f85293ba0c5266cdbf4681 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 10 Dec 2020 21:27:34 -0800 Subject: [PATCH 42/80] fix: bug where parameters query did not actually update with the set parameters call --- pkg/workspace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index 2b8a2419..000df51f 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -798,7 +798,7 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction // Update parameters if they are passed in if len(parameters) != 0 { - sb.Set("parameters", parametersJSON) + sb = sb.Set("parameters", parametersJSON) } _, err = sb.RunWith(c.DB). From 909a728a41b3624f06f81c1517462b012132867a Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 10 Dec 2020 22:04:00 -0800 Subject: [PATCH 43/80] chore: changed newParam to be newValue to better describe the functionality --- pkg/workspace.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index 000df51f..31cb80ff 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -134,14 +134,14 @@ func mergeWorkspaceParameters(existingParameters, newParameters []Parameter, ove } for _, p := range existingParameters { - newParam, ok := parameterMap[p.Name] + newValue, ok := parameterMap[p.Name] if !ok { parameters = append(parameters, Parameter{ Name: p.Name, Value: p.Value, }) } else { - p.Value = newParam + p.Value = newValue } } From 5ce0bb1532a564f68df096c22192bf7f4f0c5665 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 11 Dec 2020 16:52:50 -0800 Subject: [PATCH 44/80] fix: add resource limits to a main container This fixes an issue with GPUs in GKE as the container that needs the GPU needs to have a resource requirement. --- db/go/20201211161117_fix_resources_gke.go | 28 ++++ db/go/db.go | 1 + db/yaml/cvat/20201211161117.yaml | 163 ++++++++++++++++++++++ pkg/workspace.go | 26 ++++ 4 files changed, 218 insertions(+) create mode 100644 db/go/20201211161117_fix_resources_gke.go create mode 100644 db/yaml/cvat/20201211161117.yaml diff --git a/db/go/20201211161117_fix_resources_gke.go b/db/go/20201211161117_fix_resources_gke.go new file mode 100644 index 00000000..7e756ee6 --- /dev/null +++ b/db/go/20201211161117_fix_resources_gke.go @@ -0,0 +1,28 @@ +package migration + +import ( + "database/sql" + "github.com/pressly/goose" + "path/filepath" +) + +func initialize20201211161117() { + if _, ok := initializedMigrations[20201211161117]; !ok { + goose.AddMigration(Up20201211161117, Down20201211161117) + initializedMigrations[20201211161117] = true + } +} + +func Up20201211161117(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201211161117.yaml"), + cvatTemplateName) +} + +func Down20201211161117(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return updateWorkspaceTemplateManifest( + filepath.Join("cvat", "20201115133046.yaml"), + cvatTemplateName) +} diff --git a/db/go/db.go b/db/go/db.go index 98de142c..9613f112 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -76,6 +76,7 @@ func Initialize() { initialize20201208155115() initialize20201208155805() initialize20201209124226() + initialize20201211161117() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) diff --git a/db/yaml/cvat/20201211161117.yaml b/db/yaml/cvat/20201211161117.yaml new file mode 100644 index 00000000..32c44c4a --- /dev/null +++ b/db/yaml/cvat/20201211161117.yaml @@ -0,0 +1,163 @@ +# Workspace arguments +arguments: + parameters: + - name: sync-directory + displayName: Directory to sync raw input and training output + value: workflow-data + hint: Location (relative to current namespace) to sync raw input, models and checkpoints from default object storage to '/share'. +containers: + - name: cvat-db + image: postgres:10-alpine + env: + - name: POSTGRES_USER + value: root + - name: POSTGRES_DB + value: cvat + - name: POSTGRES_HOST_AUTH_METHOD + value: trust + - name: PGDATA + value: /var/lib/psql/data + ports: + - containerPort: 5432 + name: tcp + volumeMounts: + - name: db + mountPath: /var/lib/psql + - name: cvat-redis + image: redis:4.0-alpine + ports: + - containerPort: 6379 + name: tcp + - name: cvat + image: onepanel/cvat:0.16.0_cvat.1.0.0 + env: + - name: DJANGO_MODWSGI_EXTRA_ARGS + value: "" + - name: ALLOWED_HOSTS + value: '*' + - name: CVAT_REDIS_HOST + value: localhost + - name: CVAT_POSTGRES_HOST + value: localhost + - name: CVAT_SHARE_URL + value: /cvat/data + - name: CVAT_SHARE_DIR + value: /share + - name: CVAT_DATA_DIR + value: /cvat/data + - name: CVAT_MEDIA_DATA_DIR + value: /cvat/data/data + - name: CVAT_KEYS_DIR + value: /cvat/data/keys + - name: CVAT_MODELS_DIR + value: /cvat/data/models + - name: CVAT_LOGS_DIR + value: /cvat/logs + - name: ONEPANEL_SYNC_DIRECTORY + value: '{{workspace.parameters.sync-directory}}' + - name: NVIDIA_VISIBLE_DEVICES + value: all + - name: NVIDIA_DRIVER_CAPABILITIES + value: compute,utility + - name: NVIDIA_REQUIRE_CUDA + value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411" + - name: ONEPANEL_MAIN_CONTAINER + value: 'true' + ports: + - containerPort: 8080 + name: http + volumeMounts: + - name: cvat-data + mountPath: /cvat + - name: share + mountPath: /share + - name: sys-namespace-config + mountPath: /etc/onepanel + readOnly: true + - name: cvat-ui + image: onepanel/cvat-ui:0.16.0_cvat.1.0.0 + ports: + - containerPort: 80 + name: http + # You can add multiple FileSyncer sidecar containers if needed + - name: filesyncer + image: onepanel/filesyncer:s3 + imagePullPolicy: Always + args: + - download + - -server-prefix=/sys/filesyncer + env: + - name: FS_PATH + value: /mnt/share + - name: FS_PREFIX + value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}' + volumeMounts: + - name: share + mountPath: /mnt/share + - name: sys-namespace-config + mountPath: /etc/onepanel + readOnly: true +ports: + - name: cvat-ui + port: 80 + protocol: TCP + targetPort: 80 + - name: cvat + port: 8080 + protocol: TCP + targetPort: 8080 + - name: fs + port: 8888 + protocol: TCP + targetPort: 8888 +routes: + - match: + - uri: + prefix: /sys/filesyncer + route: + - destination: + port: + number: 8888 + - match: + - uri: + regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.* + - queryParams: + id: + regex: \d+.* + route: + - destination: + port: + number: 8080 + - match: + - uri: + prefix: / + route: + - destination: + port: + number: 80 +volumeClaimTemplates: + - metadata: + name: db + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 20Gi +# DAG Workflow to be executed once a Workspace action completes (optional) +# Uncomment the lines below if you want to send Slack notifications +#postExecutionWorkflow: +# entrypoint: main +# templates: +# - name: main +# dag: +# tasks: +# - name: slack-notify +# template: slack-notify +# - name: slack-notify +# container: +# image: technosophos/slack-notify +# args: +# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify +# command: +# - sh +# - -c \ No newline at end of file diff --git a/pkg/workspace.go b/pkg/workspace.go index 31cb80ff..97b4ce0f 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -290,6 +290,9 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace return nil, errors.New("unable to type check statefulset manifest") } extraContainer := generateNodeCaptureContainer(workspace, config) + resourcesRaw := extraContainer["resources"] + delete(extraContainer, "resources") + if extraContainer != nil { containers, ok := templateSpec["containers"].([]interface{}) if !ok { @@ -309,8 +312,23 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace return nil, err } + mainContainerIndex := -1 + if len(containers) == 2 { + // It's 1 because we prepend the node capture container and we want the other container to be main + mainContainerIndex = 1 + } + for i := range containers { container := containers[i] + + // Main containers must have the ONEPANEL_MAIN_CONTAINER environment variable + for _, envVar := range container.Env { + if envVar.Name == "ONEPANEL_MAIN_CONTAINER" { + mainContainerIndex = i + break + } + } + env.AddDefaultEnvVarsToContainer(container) env.PrependEnvVarToContainer(container, "ONEPANEL_API_URL", config["ONEPANEL_API_URL"]) env.PrependEnvVarToContainer(container, "ONEPANEL_FQDN", config["ONEPANEL_FQDN"]) @@ -319,6 +337,14 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_NAMESPACE", "{{workflow.namespace}}") env.PrependEnvVarToContainer(container, "ONEPANEL_RESOURCE_UID", "{{workflow.parameters.sys-uid}}") } + + if mainContainerIndex != -1 { + resource, ok := resourcesRaw.(corev1.ResourceRequirements) + if ok { + containers[mainContainerIndex].Resources = resource + } + } + templateSpec["containers"] = containers resultManifest, err := yaml.Marshal(statefulSet) From 9302853820871e6ab09260d4e5a63b609c7a57bc Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 11 Dec 2020 16:57:03 -0800 Subject: [PATCH 45/80] chore: migration method documentation --- db/go/20201211161117_fix_resources_gke.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/go/20201211161117_fix_resources_gke.go b/db/go/20201211161117_fix_resources_gke.go index 7e756ee6..88da5576 100644 --- a/db/go/20201211161117_fix_resources_gke.go +++ b/db/go/20201211161117_fix_resources_gke.go @@ -13,6 +13,7 @@ func initialize20201211161117() { } } +// Up20201211161117 updated cvat workspace template with a new ONEPANEL_MAIN_CONTAINER environment variable func Up20201211161117(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkspaceTemplateManifest( @@ -20,6 +21,7 @@ func Up20201211161117(tx *sql.Tx) error { cvatTemplateName) } +// Down20201211161117 reverts the cvat workspace update func Down20201211161117(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkspaceTemplateManifest( From 172c4e6dd274956b26e3a518f3a99a5fc4fc12ab Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 11 Dec 2020 19:21:51 -0800 Subject: [PATCH 46/80] chore: clean up code for node pool resource selection --- pkg/workspace.go | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/pkg/workspace.go b/pkg/workspace.go index 97b4ce0f..b0cb6b8b 100644 --- a/pkg/workspace.go +++ b/pkg/workspace.go @@ -290,8 +290,6 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace return nil, errors.New("unable to type check statefulset manifest") } extraContainer := generateNodeCaptureContainer(workspace, config) - resourcesRaw := extraContainer["resources"] - delete(extraContainer, "resources") if extraContainer != nil { containers, ok := templateSpec["containers"].([]interface{}) @@ -339,9 +337,19 @@ func (c *Client) addRuntimeFieldsToWorkspaceTemplate(t wfv1.Template, workspace } if mainContainerIndex != -1 { - resource, ok := resourcesRaw.(corev1.ResourceRequirements) - if ok { - containers[mainContainerIndex].Resources = resource + // Add resource limits for GPUs + nodePoolVal := "" + for _, parameter := range workspace.Parameters { + if parameter.Name == "sys-node-pool" { + nodePoolVal = *parameter.Value + } + } + n, err := config.NodePoolOptionByValue(nodePoolVal) + if err != nil { + return nil, err + } + if n != nil && n.Resources.Limits != nil { + containers[mainContainerIndex].Resources = n.Resources } } @@ -373,21 +381,6 @@ func generateNodeCaptureContainer(workspace *Workspace, config SystemConfig) map }, } - // Add resource limits for GPUs - nodePoolVal := "" - for _, parameter := range workspace.Parameters { - if parameter.Name == "sys-node-pool" { - nodePoolVal = *parameter.Value - } - } - n, err := config.NodePoolOptionByValue(nodePoolVal) - if err != nil { - return nil - } - if n != nil && n.Resources.Limits != nil { - extraContainer["resources"] = n.Resources - } - return extraContainer } From 01cd321a1a74377a0f6a9090b628f85b63c75898 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Mon, 14 Dec 2020 14:03:05 -0800 Subject: [PATCH 47/80] fix: added migration to update jupyterlab workspace template to be able to use GPUs in GKE --- db/go/20201214133458_fix_jupyterlab_gpu.go | 29 ++++++++ db/go/db.go | 1 + db/yaml/jupyterlab/20201214133458.yaml | 79 ++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 db/go/20201214133458_fix_jupyterlab_gpu.go create mode 100644 db/yaml/jupyterlab/20201214133458.yaml diff --git a/db/go/20201214133458_fix_jupyterlab_gpu.go b/db/go/20201214133458_fix_jupyterlab_gpu.go new file mode 100644 index 00000000..04a67c38 --- /dev/null +++ b/db/go/20201214133458_fix_jupyterlab_gpu.go @@ -0,0 +1,29 @@ +package migration + +import ( + "database/sql" + "github.com/pressly/goose" + "path/filepath" +) + +func initialize20201214133458() { + if _, ok := initializedMigrations[20201214133458]; !ok { + goose.AddMigration(Up20201214133458, Down20201214133458) + } +} + +// Up20201214133458 fixes an issue where LD_LIBRARY_PATH is not present for JupyterLab +func Up20201214133458(tx *sql.Tx) error { + // This code is executed when the migration is applied. + return updateWorkspaceTemplateManifest( + filepath.Join("jupyterlab", "20201214133458.yaml"), + cvatTemplateName) +} + +// Down20201214133458 undoes the change +func Down20201214133458(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return updateWorkspaceTemplateManifest( + filepath.Join("jupyterlab", "20201031165106.yaml"), + cvatTemplateName) +} diff --git a/db/go/db.go b/db/go/db.go index 9613f112..570bdd97 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -77,6 +77,7 @@ func Initialize() { initialize20201208155805() initialize20201209124226() initialize20201211161117() + initialize20201214133458() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) diff --git a/db/yaml/jupyterlab/20201214133458.yaml b/db/yaml/jupyterlab/20201214133458.yaml new file mode 100644 index 00000000..44277f12 --- /dev/null +++ b/db/yaml/jupyterlab/20201214133458.yaml @@ -0,0 +1,79 @@ +# Docker containers that are part of the Workspace +containers: + - name: jupyterlab + image: onepanel/jupyterlab:1.0.1 + command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"] + env: + - name: tornado + value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'" + - name: TENSORBOARD_PROXY_URL + value: '//$(ONEPANEL_RESOURCE_UID)--$(ONEPANEL_RESOURCE_NAMESPACE).$(ONEPANEL_DOMAIN)/tensorboard' + ports: + - containerPort: 8888 + name: jupyterlab + - containerPort: 6006 + name: tensorboard + volumeMounts: + - name: data + mountPath: /data + lifecycle: + postStart: + exec: + command: + - /bin/sh + - -c + - > + condayml="/data/.environment.yml"; + jupytertxt="/data/.jupexported.txt"; + if [ -f "$condayml" ]; then conda env update -f $condayml; fi; + if [ -f "$jupytertxt" ]; then cat $jupytertxt | xargs -n 1 jupyter labextension install --no-build && jupyter lab build --minimize=False; fi; + preStop: + exec: + command: + - /bin/sh + - -c + - > + conda env export > /data/.environment.yml -n base; + jupyter labextension list 1>/dev/null 2> /data/.jup.txt; + cat /data/.jup.txt | sed -n '2,$p' | awk 'sub(/v/,"@", $2){print $1$2}' > /data/.jupexported.txt; +ports: + - name: jupyterlab + port: 80 + protocol: TCP + targetPort: 8888 + - name: tensorboard + port: 6006 + protocol: TCP + targetPort: 6006 +routes: + - match: + - uri: + prefix: /tensorboard + route: + - destination: + port: + number: 6006 + - match: + - uri: + prefix: / #jupyter runs at the default route + route: + - destination: + port: + number: 80 +# DAG Workflow to be executed once a Workspace action completes (optional) +#postExecutionWorkflow: +# entrypoint: main +# templates: +# - name: main +# dag: +# tasks: +# - name: slack-notify +# template: slack-notify +# - name: slack-notify +# container: +# image: technosophos/slack-notify +# args: +# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify +# command: +# - sh +# - -c \ No newline at end of file From 0b68e88c60637b2220c0ed3e5e1b8cc15cedbde2 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Mon, 14 Dec 2020 14:05:08 -0800 Subject: [PATCH 48/80] fix: wrong template name --- db/go/20201214133458_fix_jupyterlab_gpu.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/go/20201214133458_fix_jupyterlab_gpu.go b/db/go/20201214133458_fix_jupyterlab_gpu.go index 04a67c38..556b3a67 100644 --- a/db/go/20201214133458_fix_jupyterlab_gpu.go +++ b/db/go/20201214133458_fix_jupyterlab_gpu.go @@ -17,7 +17,7 @@ func Up20201214133458(tx *sql.Tx) error { // This code is executed when the migration is applied. return updateWorkspaceTemplateManifest( filepath.Join("jupyterlab", "20201214133458.yaml"), - cvatTemplateName) + jupyterLabTemplateName) } // Down20201214133458 undoes the change @@ -25,5 +25,5 @@ func Down20201214133458(tx *sql.Tx) error { // This code is executed when the migration is rolled back. return updateWorkspaceTemplateManifest( filepath.Join("jupyterlab", "20201031165106.yaml"), - cvatTemplateName) + jupyterLabTemplateName) } From 81bd32f8371c2769bd605a6f996964106778f273 Mon Sep 17 00:00:00 2001 From: Rush Tehrani Date: Mon, 14 Dec 2020 14:30:00 -0800 Subject: [PATCH 49/80] remove extra space --- db/yaml/jupyterlab/20201214133458.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/yaml/jupyterlab/20201214133458.yaml b/db/yaml/jupyterlab/20201214133458.yaml index 44277f12..c01ab4db 100644 --- a/db/yaml/jupyterlab/20201214133458.yaml +++ b/db/yaml/jupyterlab/20201214133458.yaml @@ -2,7 +2,7 @@ containers: - name: jupyterlab image: onepanel/jupyterlab:1.0.1 - command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"] + command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"] env: - name: tornado value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'" @@ -76,4 +76,4 @@ routes: # - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify # command: # - sh -# - -c \ No newline at end of file +# - -c From 01040a72d11d475403412111112678082b8b33b6 Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Wed, 16 Dec 2020 11:16:19 -0800 Subject: [PATCH 50/80] set jupyterlab workingDir to data --- db/yaml/jupyterlab/20201214133458.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/db/yaml/jupyterlab/20201214133458.yaml b/db/yaml/jupyterlab/20201214133458.yaml index c01ab4db..0af3dfb0 100644 --- a/db/yaml/jupyterlab/20201214133458.yaml +++ b/db/yaml/jupyterlab/20201214133458.yaml @@ -3,6 +3,7 @@ containers: - name: jupyterlab image: onepanel/jupyterlab:1.0.1 command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64 jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"] + workingDir: /data env: - name: tornado value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'" From ed545987719a7bddbad1ffca7013921b2f936a4f Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 16 Dec 2020 21:32:13 -0800 Subject: [PATCH 51/80] fix: handle case for watching workflow where a timeout occurs --- pkg/workflow_execution.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index a881e92a..d10873a7 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -1130,8 +1130,27 @@ func (c *Client) WatchWorkflowExecution(namespace, uid string) (<-chan *Workflow var next watch.Event done := false + timeouts := 0 + for !done { for next = range watcher.ResultChan() { + watchEvent, ok := next.Object.(*metav1.Status) + if ok { + // If a timeout occurred, retry. + if strings.Contains(watchEvent.Message, "Client.Timeout or context cancellation") { + if timeouts > 5 { + done = true + break + } + + timeouts += 1 + continue + } + + done = true + break + } + workflow, ok := next.Object.(*wfv1.Workflow) if !ok { done = true From ec2a0f58fffb835864b6c88dc58341ab8c5e1f44 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 16 Dec 2020 21:33:10 -0800 Subject: [PATCH 52/80] feat: increased default timeout for kubernetes to be 3 minutes as testing shows 1 minute happens fairly often --- pkg/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client.go b/pkg/client.go index 6de79587..ab411ed7 100644 --- a/pkg/client.go +++ b/pkg/client.go @@ -156,12 +156,12 @@ func (c *Client) GetWebRouter() (router.Web, error) { // It uses the KUBERNETES_TIMEOUT environment variable and defaults to 60 seconds if not found or an error occurs // parsing the set timeout. func getKubernetesTimeout() time.Duration { - timeoutSeconds := env.Get("KUBERNETES_TIMEOUT", "60") + timeoutSeconds := env.Get("KUBERNETES_TIMEOUT", "180") timeout, err := strconv.Atoi(timeoutSeconds) if err != nil { log.Warn("Unable to parse KUBERNETES_TIMEOUT environment variable. Defaulting to 60 seconds") - return 60 * time.Second + return 180 * time.Second } return time.Duration(timeout) * time.Second From 7ec209334ac3b1472e60d1b5f27e17f21207bbeb Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 16 Dec 2020 21:54:08 -0800 Subject: [PATCH 53/80] fix: missing setting the initializedMigrations variable for migration. This fixes a big where changing the configmap crashed the server. --- db/go/20201214133458_fix_jupyterlab_gpu.go | 1 + 1 file changed, 1 insertion(+) diff --git a/db/go/20201214133458_fix_jupyterlab_gpu.go b/db/go/20201214133458_fix_jupyterlab_gpu.go index 556b3a67..78535d8c 100644 --- a/db/go/20201214133458_fix_jupyterlab_gpu.go +++ b/db/go/20201214133458_fix_jupyterlab_gpu.go @@ -9,6 +9,7 @@ import ( func initialize20201214133458() { if _, ok := initializedMigrations[20201214133458]; !ok { goose.AddMigration(Up20201214133458, Down20201214133458) + initializedMigrations[20201214133458] = true } } From 45f6d4e3c668fac4344104ac911e50bb6f4c6a0b Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 16 Dec 2020 21:56:04 -0800 Subject: [PATCH 54/80] feat: updated watching configmap changes so it uses its own kubeclient. This kubeclient has no timeout as timeouts happen a lot while watching for configmap changes. --- main.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 4495761a..7241a6f4 100644 --- a/main.go +++ b/main.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/fields" k8runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" "math" "net" @@ -55,7 +56,7 @@ func main() { log.Fatalf("Failed to connect to Kubernetes cluster: %v", err) } - go watchConfigmapChanges(client, "onepanel", stopCh, func(configMap *corev1.ConfigMap) error { + go watchConfigmapChanges("onepanel", stopCh, func(configMap *corev1.ConfigMap) error { log.Printf("Configmap changed") stopCh <- struct{}{} @@ -214,7 +215,12 @@ func registerHandler(register registerFunc, ctx context.Context, mux *runtime.Se } // watchConfigmapChanges sets up a listener for configmap changes and calls the onChange function when it happens -func watchConfigmapChanges(client *v1.Client, namespace string, stopCh <-chan struct{}, onChange func(*corev1.ConfigMap) error) { +func watchConfigmapChanges(namespace string, stopCh <-chan struct{}, onChange func(*corev1.ConfigMap) error) { + client, err := kubernetes.NewForConfig(v1.NewConfig()) + if err != nil { + return + } + restClient := client.CoreV1().RESTClient() resource := "configmaps" fieldSelector := fields.ParseSelectorOrDie(fmt.Sprintf("metadata.name=%s", "onepanel")) @@ -235,6 +241,7 @@ func watchConfigmapChanges(client *v1.Client, namespace string, stopCh <-chan st VersionedParams(&options, apiv1.ParameterCodec) return req.Watch() } + source := &cache.ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} _, controller := cache.NewInformer( source, From 2a01138cf3a56b7be0861a0a824dce298a7a9dca Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 16 Dec 2020 22:03:54 -0800 Subject: [PATCH 55/80] chore: codacy --- pkg/workflow_execution.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index d10873a7..bdc25531 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -1143,7 +1143,7 @@ func (c *Client) WatchWorkflowExecution(namespace, uid string) (<-chan *Workflow break } - timeouts += 1 + timeouts++ continue } From d99189807dc57798997acb12bc45fd8b9b60616b Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 14:09:20 -0800 Subject: [PATCH 56/80] feat: updated grpc gateway related code --- Makefile | 17 +- api/api.proto | 4 +- api/auth.proto | 5 +- api/third_party/{google => }/LICENSE | 0 api/third_party/README.grpc-gateway | 23 + api/third_party/google/api/annotations.proto | 0 .../google/api/field_behavior.proto | 78 + api/third_party/google/api/http.proto | 0 api/third_party/google/api/httpbody.proto | 0 api/third_party/google/rpc/code.proto | 0 .../google/rpc/error_details.proto | 0 api/third_party/google/rpc/status.proto | 0 .../protoc-gen-openapiv2/BUILD.bazel | 30 + api/third_party/protoc-gen-openapiv2/defs.bzl | 308 ++ .../internal/genopenapi/BUILD.bazel | 57 + .../internal/genopenapi/doc.go | 2 + .../internal/genopenapi/generator.go | 241 + .../internal/genopenapi/helpers.go | 9 + .../internal/genopenapi/helpers_go111_old.go | 9 + .../internal/genopenapi/template.go | 2367 +++++++++ .../internal/genopenapi/template_test.go | 4552 +++++++++++++++++ .../internal/genopenapi/types.go | 276 + api/third_party/protoc-gen-openapiv2/main.go | 220 + .../protoc-gen-openapiv2/main_test.go | 186 + .../protoc-gen-openapiv2/options/BUILD.bazel | 38 + .../options/annotations.pb.go | 241 + .../options/annotations.proto | 16 +- .../options/openapiv2.pb.go | 2790 ++++++++++ .../options/openapiv2.proto | 645 +++ .../options/openapiv2.proto | 380 -- main.go | 25 +- server/auth_server.go | 1 + server/config_server.go | 4 +- server/cron_workflow_server.go | 4 +- server/label_server.go | 4 +- server/namespace_server.go | 4 +- server/secret_server.go | 4 +- server/service_server.go | 4 +- server/workflow_server.go | 6 +- server/workflow_template_server.go | 4 +- server/workspace_server.go | 4 +- server/workspace_template_server.go | 4 +- 42 files changed, 12143 insertions(+), 419 deletions(-) rename api/third_party/{google => }/LICENSE (100%) mode change 100755 => 100644 create mode 100644 api/third_party/README.grpc-gateway mode change 100755 => 100644 api/third_party/google/api/annotations.proto create mode 100644 api/third_party/google/api/field_behavior.proto mode change 100755 => 100644 api/third_party/google/api/http.proto mode change 100755 => 100644 api/third_party/google/api/httpbody.proto mode change 100755 => 100644 api/third_party/google/rpc/code.proto mode change 100755 => 100644 api/third_party/google/rpc/error_details.proto mode change 100755 => 100644 api/third_party/google/rpc/status.proto create mode 100644 api/third_party/protoc-gen-openapiv2/BUILD.bazel create mode 100644 api/third_party/protoc-gen-openapiv2/defs.bzl create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go create mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go create mode 100644 api/third_party/protoc-gen-openapiv2/main.go create mode 100644 api/third_party/protoc-gen-openapiv2/main_test.go create mode 100644 api/third_party/protoc-gen-openapiv2/options/BUILD.bazel create mode 100644 api/third_party/protoc-gen-openapiv2/options/annotations.pb.go rename api/third_party/{protoc-gen-swagger => protoc-gen-openapiv2}/options/annotations.proto (80%) mode change 100755 => 100644 create mode 100644 api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go create mode 100644 api/third_party/protoc-gen-openapiv2/options/openapiv2.proto delete mode 100755 api/third_party/protoc-gen-swagger/options/openapiv2.proto diff --git a/Makefile b/Makefile index 94c79210..00877e62 100644 --- a/Makefile +++ b/Makefile @@ -18,11 +18,18 @@ jq: protoc: protoc -I/usr/local/include \ -Iapi/third_party/ \ - -Iapi/ \ - api/*.proto \ - --go_out=plugins=grpc:api \ - --grpc-gateway_out=logtostderr=true,allow_delete_body=true:api \ - --swagger_out=allow_merge=true,fqn_for_swagger_name=true,allow_delete_body=true,logtostderr=true,simple_operation_ids=true:api + -Iapi/ \ + --grpc-gateway_out ./api \ + --grpc-gateway_opt logtostderr=true \ + --grpc-gateway_opt paths=source_relative \ + --grpc-gateway_opt generate_unbound_methods=true \ + --openapiv2_out ./api \ + --openapiv2_opt allow_merge=true \ + --openapiv2_opt fqn_for_openapi_name=true \ + --openapiv2_opt allow_delete_body=true \ + --openapiv2_opt logtostderr=true \ + --openapiv2_opt simple_operation_ids=true \ + api/*.proto api: init protoc jq diff --git a/api/api.proto b/api/api.proto index 61eb418c..db35db2d 100644 --- a/api/api.proto +++ b/api/api.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package api; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Onepanel"; description: "Onepanel API"; diff --git a/api/auth.proto b/api/auth.proto index 32ddd914..00f4c07b 100644 --- a/api/auth.proto +++ b/api/auth.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package api; import "google/api/annotations.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; service AuthService { rpc IsValidToken(IsValidTokenRequest) returns (IsValidTokenResponse) { @@ -19,7 +19,8 @@ service AuthService { post: "/apis/v1beta1/auth/get_access_token" body: "*" }; - option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { security: { } }; diff --git a/api/third_party/google/LICENSE b/api/third_party/LICENSE old mode 100755 new mode 100644 similarity index 100% rename from api/third_party/google/LICENSE rename to api/third_party/LICENSE diff --git a/api/third_party/README.grpc-gateway b/api/third_party/README.grpc-gateway new file mode 100644 index 00000000..b7d1bea3 --- /dev/null +++ b/api/third_party/README.grpc-gateway @@ -0,0 +1,23 @@ +Google APIs +============ + +Project: Google APIs +URL: https://github.com/google/googleapis +Revision: 3544ab16c3342d790b00764251e348705991ea4b +License: Apache License 2.0 + + +Imported Files +--------------- + +- google/api/annotations.proto +- google/api/http.proto +- google/api/httpbody.proto + + +Generated Files +---------------- + +They are generated from the .proto files by protoc-gen-go. +- google/api/annotations.pb.go +- google/api/http.pb.go diff --git a/api/third_party/google/api/annotations.proto b/api/third_party/google/api/annotations.proto old mode 100755 new mode 100644 diff --git a/api/third_party/google/api/field_behavior.proto b/api/third_party/google/api/field_behavior.proto new file mode 100644 index 00000000..aa7127bf --- /dev/null +++ b/api/third_party/google/api/field_behavior.proto @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "FieldBehaviorProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.FieldOptions { + // A designation of a specific field behavior (required, output only, etc.) + // in protobuf messages. + // + // Examples: + // + // string name = 1 [(google.api.field_behavior) = REQUIRED]; + // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // google.protobuf.Duration ttl = 1 + // [(google.api.field_behavior) = INPUT_ONLY]; + // google.protobuf.Timestamp expire_time = 1 + // [(google.api.field_behavior) = OUTPUT_ONLY, + // (google.api.field_behavior) = IMMUTABLE]; + repeated google.api.FieldBehavior field_behavior = 1052; +} + +// An indicator of the behavior of a given field (for example, that a field +// is required in requests, or given as output but ignored as input). +// This **does not** change the behavior in protocol buffers itself; it only +// denotes the behavior and may affect how API tooling handles the field. +// +// Note: This enum **may** receive new values in the future. +enum FieldBehavior { + // Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0; + + // Specifically denotes a field as optional. + // While all fields in protocol buffers are optional, this may be specified + // for emphasis if appropriate. + OPTIONAL = 1; + + // Denotes a field as required. + // This indicates that the field **must** be provided as part of the request, + // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2; + + // Denotes a field as output only. + // This indicates that the field is provided in responses, but including the + // field in a request does nothing (the server *must* ignore it and + // *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3; + + // Denotes a field as input only. + // This indicates that the field is provided in requests, and the + // corresponding field is not included in output. + INPUT_ONLY = 4; + + // Denotes a field as immutable. + // This indicates that the field may be set once in a request to create a + // resource, but may not be changed thereafter. + IMMUTABLE = 5; +} diff --git a/api/third_party/google/api/http.proto b/api/third_party/google/api/http.proto old mode 100755 new mode 100644 diff --git a/api/third_party/google/api/httpbody.proto b/api/third_party/google/api/httpbody.proto old mode 100755 new mode 100644 diff --git a/api/third_party/google/rpc/code.proto b/api/third_party/google/rpc/code.proto old mode 100755 new mode 100644 diff --git a/api/third_party/google/rpc/error_details.proto b/api/third_party/google/rpc/error_details.proto old mode 100755 new mode 100644 diff --git a/api/third_party/google/rpc/status.proto b/api/third_party/google/rpc/status.proto old mode 100755 new mode 100644 diff --git a/api/third_party/protoc-gen-openapiv2/BUILD.bazel b/api/third_party/protoc-gen-openapiv2/BUILD.bazel new file mode 100644 index 00000000..90e711b1 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/BUILD.bazel @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") + +package(default_visibility = ["//visibility:private"]) + +go_library( + name = "go_default_library", + srcs = ["main.go"], + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2", + deps = [ + "//internal/codegenerator:go_default_library", + "//internal/descriptor:go_default_library", + "//protoc-gen-openapiv2/internal/genopenapi:go_default_library", + "@com_github_golang_glog//:go_default_library", + "@org_golang_google_protobuf//proto:go_default_library", + "@org_golang_google_protobuf//types/pluginpb:go_default_library", + ], +) + +go_binary( + name = "protoc-gen-openapiv2", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + size = "small", + srcs = ["main_test.go"], + embed = [":go_default_library"], +) diff --git a/api/third_party/protoc-gen-openapiv2/defs.bzl b/api/third_party/protoc-gen-openapiv2/defs.bzl new file mode 100644 index 00000000..ea322676 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/defs.bzl @@ -0,0 +1,308 @@ +"""Generated an open-api spec for a grpc api spec. + +Reads the the api spec in protobuf format and generate an open-api spec. +Optionally applies settings from the grpc-service configuration. +""" + +load("@rules_proto//proto:defs.bzl", "ProtoInfo") + +# TODO(yannic): Replace with |proto_common.direct_source_infos| when +# https://github.com/bazelbuild/rules_proto/pull/22 lands. +def _direct_source_infos(proto_info, provided_sources = []): + """Returns sequence of `ProtoFileInfo` for `proto_info`'s direct sources. + + Files that are both in `proto_info`'s direct sources and in + `provided_sources` are skipped. This is useful, e.g., for well-known + protos that are already provided by the Protobuf runtime. + + Args: + proto_info: An instance of `ProtoInfo`. + provided_sources: Optional. A sequence of files to ignore. + Usually, these files are already provided by the + Protocol Buffer runtime (e.g. Well-Known protos). + + Returns: A sequence of `ProtoFileInfo` containing information about + `proto_info`'s direct sources. + """ + + source_root = proto_info.proto_source_root + if "." == source_root: + return [struct(file = src, import_path = src.path) for src in proto_info.direct_sources] + + offset = len(source_root) + 1 # + '/'. + + infos = [] + for src in proto_info.direct_sources: + # TODO(yannic): Remove this hack when we drop support for Bazel < 1.0. + local_offset = offset + if src.root.path and not source_root.startswith(src.root.path): + # Before Bazel 1.0, `proto_source_root` wasn't guaranteed to be a + # prefix of `src.path`. This could happend, e.g., if `file` was + # generated (https://github.com/bazelbuild/bazel/issues/9215). + local_offset += len(src.root.path) + 1 # + '/'. + infos.append(struct(file = src, import_path = src.path[local_offset:])) + + return infos + +def _run_proto_gen_openapi( + actions, + proto_info, + target_name, + transitive_proto_srcs, + protoc, + protoc_gen_openapiv2, + single_output, + allow_delete_body, + grpc_api_configuration, + json_names_for_fields, + repeated_path_param_separator, + include_package_in_tags, + fqn_for_openapi_name, + use_go_templates, + disable_default_errors, + enums_as_ints, + simple_operation_ids, + openapi_configuration, + generate_unbound_methods): + args = actions.args() + + args.add("--plugin", "protoc-gen-openapiv2=%s" % protoc_gen_openapiv2.path) + + args.add("--openapiv2_opt", "logtostderr=true") + args.add("--openapiv2_opt", "allow_repeated_fields_in_body=true") + + extra_inputs = [] + if grpc_api_configuration: + extra_inputs.append(grpc_api_configuration) + args.add("--openapiv2_opt", "grpc_api_configuration=%s" % grpc_api_configuration.path) + + if openapi_configuration: + extra_inputs.append(openapi_configuration) + args.add("--openapiv2_opt", "openapi_configuration=%s" % openapi_configuration.path) + + if not json_names_for_fields: + args.add("--openapiv2_opt", "json_names_for_fields=false") + + if fqn_for_openapi_name: + args.add("--openapiv2_opt", "fqn_for_openapi_name=true") + + if generate_unbound_methods: + args.add("--openapiv2_opt", "generate_unbound_methods=true") + + if simple_operation_ids: + args.add("--openapiv2_opt", "simple_operation_ids=true") + + if allow_delete_body: + args.add("--openapiv2_opt", "allow_delete_body=true") + + if include_package_in_tags: + args.add("--openapiv2_opt", "include_package_in_tags=true") + + if use_go_templates: + args.add("--openapiv2_opt", "use_go_templates=true") + + if disable_default_errors: + args.add("--openapiv2_opt", "disable_default_errors=true") + + if enums_as_ints: + args.add("--openapiv2_opt", "enums_as_ints=true") + + args.add("--openapiv2_opt", "repeated_path_param_separator=%s" % repeated_path_param_separator) + + proto_file_infos = _direct_source_infos(proto_info) + + # TODO(yannic): Use |proto_info.transitive_descriptor_sets| when + # https://github.com/bazelbuild/bazel/issues/9337 is fixed. + args.add_all(proto_info.transitive_proto_path, format_each = "--proto_path=%s") + + if single_output: + args.add("--openapiv2_opt", "allow_merge=true") + args.add("--openapiv2_opt", "merge_file_name=%s" % target_name) + + openapi_file = actions.declare_file("%s.swagger.json" % target_name) + args.add("--openapiv2_out", openapi_file.dirname) + + args.add_all([f.import_path for f in proto_file_infos]) + + actions.run( + executable = protoc, + tools = [protoc_gen_openapiv2], + inputs = depset( + direct = extra_inputs, + transitive = [transitive_proto_srcs], + ), + outputs = [openapi_file], + arguments = [args], + ) + + return [openapi_file] + + # TODO(yannic): We may be able to generate all files in a single action, + # but that will change at least the semantics of `use_go_template.proto`. + openapi_files = [] + for proto_file_info in proto_file_infos: + # TODO(yannic): This probably doesn't work as expected: we only add this + # option after we have seen it, so `.proto` sources that happen to be + # in the list of `.proto` files before `use_go_template.proto` will be + # compiled without this option, and all sources that get compiled after + # `use_go_template.proto` will have this option on. + if proto_file_info.file.basename == "use_go_template.proto": + args.add("--openapiv2_opt", "use_go_templates=true") + + file_name = "%s.swagger.json" % proto_file_info.import_path[:-len(".proto")] + openapi_file = actions.declare_file( + "_virtual_imports/%s/%s" % (target_name, file_name), + ) + + file_args = actions.args() + + offset = len(file_name) + 1 # + '/'. + file_args.add("--openapiv2_out", openapi_file.path[:-offset]) + + file_args.add(proto_file_info.import_path) + + actions.run( + executable = protoc, + tools = [protoc_gen_openapiv2], + inputs = depset( + direct = extra_inputs, + transitive = [transitive_proto_srcs], + ), + outputs = [openapi_file], + arguments = [args, file_args], + ) + openapi_files.append(openapi_file) + + return openapi_files + +def _proto_gen_openapi_impl(ctx): + proto = ctx.attr.proto[ProtoInfo] + return [ + DefaultInfo( + files = depset( + _run_proto_gen_openapi( + actions = ctx.actions, + proto_info = proto, + target_name = ctx.attr.name, + transitive_proto_srcs = depset( + direct = ctx.files._well_known_protos, + transitive = [proto.transitive_sources], + ), + protoc = ctx.executable._protoc, + protoc_gen_openapiv2 = ctx.executable._protoc_gen_openapi, + single_output = ctx.attr.single_output, + allow_delete_body = ctx.attr.allow_delete_body, + grpc_api_configuration = ctx.file.grpc_api_configuration, + json_names_for_fields = ctx.attr.json_names_for_fields, + repeated_path_param_separator = ctx.attr.repeated_path_param_separator, + include_package_in_tags = ctx.attr.include_package_in_tags, + fqn_for_openapi_name = ctx.attr.fqn_for_openapi_name, + use_go_templates = ctx.attr.use_go_templates, + disable_default_errors = ctx.attr.disable_default_errors, + enums_as_ints = ctx.attr.enums_as_ints, + simple_operation_ids = ctx.attr.simple_operation_ids, + openapi_configuration = ctx.file.openapi_configuration, + generate_unbound_methods = ctx.attr.generate_unbound_methods, + ), + ), + ), + ] + +protoc_gen_openapiv2 = rule( + attrs = { + "proto": attr.label( + mandatory = True, + providers = [ProtoInfo], + ), + "single_output": attr.bool( + default = False, + mandatory = False, + doc = "if set, the rule will generate a single OpenAPI file", + ), + "allow_delete_body": attr.bool( + default = False, + mandatory = False, + doc = "unless set, HTTP DELETE methods may not have a body", + ), + "grpc_api_configuration": attr.label( + allow_single_file = True, + mandatory = False, + doc = "path to file which describes the gRPC API Configuration in YAML format", + ), + "json_names_for_fields": attr.bool( + default = True, + mandatory = False, + doc = "if disabled, the original proto name will be used for generating OpenAPI definitions", + ), + "repeated_path_param_separator": attr.string( + default = "csv", + mandatory = False, + values = ["csv", "pipes", "ssv", "tsv"], + doc = "configures how repeated fields should be split." + + " Allowed values are `csv`, `pipes`, `ssv` and `tsv`", + ), + "include_package_in_tags": attr.bool( + default = False, + mandatory = False, + doc = "if unset, the gRPC service name is added to the `Tags`" + + " field of each operation. If set and the `package` directive" + + " is shown in the proto file, the package name will be " + + " prepended to the service name", + ), + "fqn_for_openapi_name": attr.bool( + default = False, + mandatory = False, + doc = "if set, the object's OpenAPI names will use the fully" + + " qualified names from the proto definition" + + " (ie my.package.MyMessage.MyInnerMessage", + ), + "use_go_templates": attr.bool( + default = False, + mandatory = False, + doc = "if set, you can use Go templates in protofile comments", + ), + "disable_default_errors": attr.bool( + default = False, + mandatory = False, + doc = "if set, disables generation of default errors." + + " This is useful if you have defined custom error handling", + ), + "enums_as_ints": attr.bool( + default = False, + mandatory = False, + doc = "whether to render enum values as integers, as opposed to string values", + ), + "simple_operation_ids": attr.bool( + default = False, + mandatory = False, + doc = "whether to remove the service prefix in the operationID" + + " generation. Can introduce duplicate operationIDs, use with caution.", + ), + "openapi_configuration": attr.label( + allow_single_file = True, + mandatory = False, + doc = "path to file which describes the OpenAPI Configuration in YAML format", + ), + "generate_unbound_methods": attr.bool( + default = False, + mandatory = False, + doc = "generate swagger metadata even for RPC methods that have" + + " no HttpRule annotation", + ), + "_protoc": attr.label( + default = "@com_google_protobuf//:protoc", + executable = True, + cfg = "host", + ), + "_well_known_protos": attr.label( + default = "@com_google_protobuf//:well_known_protos", + allow_files = True, + ), + "_protoc_gen_openapi": attr.label( + default = Label("//protoc-gen-openapiv2:protoc-gen-openapiv2"), + executable = True, + cfg = "host", + ), + }, + implementation = _proto_gen_openapi_impl, +) diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel new file mode 100644 index 00000000..5442a8d2 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel @@ -0,0 +1,57 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +package(default_visibility = ["//protoc-gen-openapiv2:__subpackages__"]) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generator.go", + "helpers.go", + "helpers_go111_old.go", + "template.go", + "types.go", + ], + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi", + deps = [ + "//internal/casing:go_default_library", + "//internal/descriptor:go_default_library", + "//internal/generator:go_default_library", + "//protoc-gen-openapiv2/options:go_default_library", + "@com_github_golang_glog//:go_default_library", + "@com_github_golang_protobuf//descriptor:go_default_library_gen", + "@go_googleapis//google/api:annotations_go_proto", + "@go_googleapis//google/rpc:status_go_proto", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + "@org_golang_google_protobuf//encoding/protojson:go_default_library", + "@org_golang_google_protobuf//proto:go_default_library", + "@org_golang_google_protobuf//types/descriptorpb:go_default_library", + "@org_golang_google_protobuf//types/pluginpb:go_default_library", + ], +) + +go_test( + name = "go_default_test", + size = "small", + srcs = ["template_test.go"], + embed = [":go_default_library"], + deps = [ + "//internal/descriptor:go_default_library", + "//internal/descriptor/openapiconfig:go_default_library", + "//internal/httprule:go_default_library", + "//protoc-gen-openapiv2/options:go_default_library", + "//runtime:go_default_library", + "@com_github_google_go_cmp//cmp:go_default_library", + "@go_googleapis//google/api:annotations_go_proto", + "@io_bazel_rules_go//proto/wkt:field_mask_go_proto", + "@org_golang_google_protobuf//proto:go_default_library", + "@org_golang_google_protobuf//reflect/protodesc:go_default_library", + "@org_golang_google_protobuf//types/descriptorpb:go_default_library", + "@org_golang_google_protobuf//types/known/durationpb:go_default_library", + "@org_golang_google_protobuf//types/known/structpb:go_default_library", + "@org_golang_google_protobuf//types/known/timestamppb:go_default_library", + "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library", + "@org_golang_google_protobuf//types/pluginpb:go_default_library", + ], +) diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go new file mode 100644 index 00000000..42f9237f --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go @@ -0,0 +1,2 @@ +// Package genopenapi provides a code generator for OpenAPI v2. +package genopenapi diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go new file mode 100644 index 00000000..65a2b6a2 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go @@ -0,0 +1,241 @@ +package genopenapi + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "path/filepath" + "reflect" + "strings" + + "github.com/golang/glog" + anypb "github.com/golang/protobuf/ptypes/any" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + gen "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator" + openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + statuspb "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/pluginpb" + + //nolint:staticcheck // Known issue, will be replaced when possible + legacydescriptor "github.com/golang/protobuf/descriptor" +) + +var ( + errNoTargetService = errors.New("no target service defined in the file") +) + +type generator struct { + reg *descriptor.Registry +} + +type wrapper struct { + fileName string + swagger *openapiSwaggerObject +} + +// New returns a new generator which generates grpc gateway files. +func New(reg *descriptor.Registry) gen.Generator { + return &generator{reg: reg} +} + +// Merge a lot of OpenAPI file (wrapper) to single one OpenAPI file +func mergeTargetFile(targets []*wrapper, mergeFileName string) *wrapper { + var mergedTarget *wrapper + for _, f := range targets { + if mergedTarget == nil { + mergedTarget = &wrapper{ + fileName: mergeFileName, + swagger: f.swagger, + } + } else { + for k, v := range f.swagger.Definitions { + mergedTarget.swagger.Definitions[k] = v + } + for k, v := range f.swagger.Paths { + mergedTarget.swagger.Paths[k] = v + } + for k, v := range f.swagger.SecurityDefinitions { + mergedTarget.swagger.SecurityDefinitions[k] = v + } + mergedTarget.swagger.Security = append(mergedTarget.swagger.Security, f.swagger.Security...) + } + } + return mergedTarget +} + +// Q: What's up with the alias types here? +// A: We don't want to completely override how these structs are marshaled into +// JSON, we only want to add fields (see below, extensionMarshalJSON). +// An infinite recursion would happen if we'd call json.Marshal on the struct +// that has swaggerObject as an embedded field. To avoid that, we'll create +// type aliases, and those don't have the custom MarshalJSON methods defined +// on them. See http://choly.ca/post/go-json-marshalling/ (or, if it ever +// goes away, use +// https://web.archive.org/web/20190806073003/http://choly.ca/post/go-json-marshalling/. +func (so openapiSwaggerObject) MarshalJSON() ([]byte, error) { + type alias openapiSwaggerObject + return extensionMarshalJSON(alias(so), so.extensions) +} + +func (so openapiInfoObject) MarshalJSON() ([]byte, error) { + type alias openapiInfoObject + return extensionMarshalJSON(alias(so), so.extensions) +} + +func (so openapiSecuritySchemeObject) MarshalJSON() ([]byte, error) { + type alias openapiSecuritySchemeObject + return extensionMarshalJSON(alias(so), so.extensions) +} + +func (so openapiOperationObject) MarshalJSON() ([]byte, error) { + type alias openapiOperationObject + return extensionMarshalJSON(alias(so), so.extensions) +} + +func (so openapiResponseObject) MarshalJSON() ([]byte, error) { + type alias openapiResponseObject + return extensionMarshalJSON(alias(so), so.extensions) +} + +func extensionMarshalJSON(so interface{}, extensions []extension) ([]byte, error) { + // To append arbitrary keys to the struct we'll render into json, + // we're creating another struct that embeds the original one, and + // its extra fields: + // + // The struct will look like + // struct { + // *openapiCore + // XGrpcGatewayFoo json.RawMessage `json:"x-grpc-gateway-foo"` + // XGrpcGatewayBar json.RawMessage `json:"x-grpc-gateway-bar"` + // } + // and thus render into what we want -- the JSON of openapiCore with the + // extensions appended. + fields := []reflect.StructField{ + { // embedded + Name: "Embedded", + Type: reflect.TypeOf(so), + Anonymous: true, + }, + } + for _, ext := range extensions { + fields = append(fields, reflect.StructField{ + Name: fieldName(ext.key), + Type: reflect.TypeOf(ext.value), + Tag: reflect.StructTag(fmt.Sprintf("json:\"%s\"", ext.key)), + }) + } + + t := reflect.StructOf(fields) + s := reflect.New(t).Elem() + s.Field(0).Set(reflect.ValueOf(so)) + for _, ext := range extensions { + s.FieldByName(fieldName(ext.key)).Set(reflect.ValueOf(ext.value)) + } + return json.Marshal(s.Interface()) +} + +// encodeOpenAPI converts OpenAPI file obj to pluginpb.CodeGeneratorResponse_File +func encodeOpenAPI(file *wrapper) (*descriptor.ResponseFile, error) { + var formatted bytes.Buffer + enc := json.NewEncoder(&formatted) + enc.SetIndent("", " ") + if err := enc.Encode(*file.swagger); err != nil { + return nil, err + } + name := file.fileName + ext := filepath.Ext(name) + base := strings.TrimSuffix(name, ext) + output := fmt.Sprintf("%s.swagger.json", base) + return &descriptor.ResponseFile{ + CodeGeneratorResponse_File: &pluginpb.CodeGeneratorResponse_File{ + Name: proto.String(output), + Content: proto.String(formatted.String()), + }, + }, nil +} + +func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.ResponseFile, error) { + var files []*descriptor.ResponseFile + if g.reg.IsAllowMerge() { + var mergedTarget *descriptor.File + // try to find proto leader + for _, f := range targets { + if proto.HasExtension(f.Options, openapi_options.E_Openapiv2Swagger) { + mergedTarget = f + break + } + } + // merge protos to leader + for _, f := range targets { + if mergedTarget == nil { + mergedTarget = f + } else if mergedTarget != f { + mergedTarget.Enums = append(mergedTarget.Enums, f.Enums...) + mergedTarget.Messages = append(mergedTarget.Messages, f.Messages...) + mergedTarget.Services = append(mergedTarget.Services, f.Services...) + } + } + + targets = nil + targets = append(targets, mergedTarget) + } + + var openapis []*wrapper + for _, file := range targets { + glog.V(1).Infof("Processing %s", file.GetName()) + swagger, err := applyTemplate(param{File: file, reg: g.reg}) + if err == errNoTargetService { + glog.V(1).Infof("%s: %v", file.GetName(), err) + continue + } + if err != nil { + return nil, err + } + openapis = append(openapis, &wrapper{ + fileName: file.GetName(), + swagger: swagger, + }) + } + + if g.reg.IsAllowMerge() { + targetOpenAPI := mergeTargetFile(openapis, g.reg.GetMergeFileName()) + f, err := encodeOpenAPI(targetOpenAPI) + if err != nil { + return nil, fmt.Errorf("failed to encode OpenAPI for %s: %s", g.reg.GetMergeFileName(), err) + } + files = append(files, f) + glog.V(1).Infof("New OpenAPI file will emit") + } else { + for _, file := range openapis { + f, err := encodeOpenAPI(file) + if err != nil { + return nil, fmt.Errorf("failed to encode OpenAPI for %s: %s", file.fileName, err) + } + files = append(files, f) + glog.V(1).Infof("New OpenAPI file will emit") + } + } + return files, nil +} + +// AddErrorDefs Adds google.rpc.Status and google.protobuf.Any +// to registry (used for error-related API responses) +func AddErrorDefs(reg *descriptor.Registry) error { + // load internal protos + any, _ := legacydescriptor.MessageDescriptorProto(&anypb.Any{}) + any.SourceCodeInfo = new(descriptorpb.SourceCodeInfo) + status, _ := legacydescriptor.MessageDescriptorProto(&statuspb.Status{}) + status.SourceCodeInfo = new(descriptorpb.SourceCodeInfo) + // TODO(johanbrandhorst): Use new conversion later when possible + // any := protodesc.ToFileDescriptorProto((&anypb.Any{}).ProtoReflect().Descriptor().ParentFile()) + // status := protodesc.ToFileDescriptorProto((&statuspb.Status{}).ProtoReflect().Descriptor().ParentFile()) + return reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{ + any, + status, + }, + }) +} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go new file mode 100644 index 00000000..c53d6802 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go @@ -0,0 +1,9 @@ +//+build go1.12 + +package genopenapi + +import "strings" + +func fieldName(k string) string { + return strings.ReplaceAll(strings.Title(k), "-", "_") +} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go new file mode 100644 index 00000000..b8db1196 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go @@ -0,0 +1,9 @@ +//+build !go1.12 + +package genopenapi + +import "strings" + +func fieldName(k string) string { + return strings.Replace(strings.Title(k), "-", "_", -1) +} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go new file mode 100644 index 00000000..1c079391 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go @@ -0,0 +1,2367 @@ +package genopenapi + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "math" + "net/textproto" + "os" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "sync" + "text/template" + "time" + + "github.com/golang/glog" + structpb "github.com/golang/protobuf/ptypes/struct" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/casing" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + "google.golang.org/genproto/googleapis/api/annotations" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" +) + +// wktSchemas are the schemas of well-known-types. +// The schemas must match with the behavior of the JSON unmarshaler in +// https://github.com/protocolbuffers/protobuf-go/blob/v1.25.0/encoding/protojson/well_known_types.go +var wktSchemas = map[string]schemaCore{ + ".google.protobuf.FieldMask": { + Type: "string", + }, + ".google.protobuf.Timestamp": { + Type: "string", + Format: "date-time", + }, + ".google.protobuf.Duration": { + Type: "string", + }, + ".google.protobuf.StringValue": { + Type: "string", + }, + ".google.protobuf.BytesValue": { + Type: "string", + Format: "byte", + }, + ".google.protobuf.Int32Value": { + Type: "integer", + Format: "int32", + }, + ".google.protobuf.UInt32Value": { + Type: "integer", + Format: "int64", + }, + ".google.protobuf.Int64Value": { + Type: "string", + Format: "int64", + }, + ".google.protobuf.UInt64Value": { + Type: "string", + Format: "uint64", + }, + ".google.protobuf.FloatValue": { + Type: "number", + Format: "float", + }, + ".google.protobuf.DoubleValue": { + Type: "number", + Format: "double", + }, + ".google.protobuf.BoolValue": { + Type: "boolean", + }, + ".google.protobuf.Empty": {}, + ".google.protobuf.Struct": { + Type: "object", + }, + ".google.protobuf.Value": { + Type: "object", + }, + ".google.protobuf.ListValue": { + Type: "array", + Items: (*openapiItemsObject)(&schemaCore{ + Type: "object", + }), + }, + ".google.protobuf.NullValue": { + Type: "string", + }, +} + +func listEnumNames(enum *descriptor.Enum) (names []string) { + for _, value := range enum.GetValue() { + names = append(names, value.GetName()) + } + return names +} + +func listEnumNumbers(enum *descriptor.Enum) (numbers []string) { + for _, value := range enum.GetValue() { + numbers = append(numbers, strconv.Itoa(int(value.GetNumber()))) + } + return +} + +func getEnumDefault(enum *descriptor.Enum) string { + for _, value := range enum.GetValue() { + if value.GetNumber() == 0 { + return value.GetName() + } + } + return "" +} + +// messageToQueryParameters converts a message to a list of OpenAPI query parameters. +func messageToQueryParameters(message *descriptor.Message, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []openapiParameterObject, err error) { + for _, field := range message.Fields { + p, err := queryParams(message, field, "", reg, pathParams, body) + if err != nil { + return nil, err + } + params = append(params, p...) + } + return params, nil +} + +// queryParams converts a field to a list of OpenAPI query parameters recursively through the use of nestedQueryParams. +func queryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []openapiParameterObject, err error) { + return nestedQueryParams(message, field, prefix, reg, pathParams, body, map[string]bool{}) +} + +// nestedQueryParams converts a field to a list of OpenAPI query parameters recursively. +// This function is a helper function for queryParams, that keeps track of cyclical message references +// through the use of +// touched map[string]bool +// If a cycle is discovered, an error is returned, as cyclical data structures aren't allowed +// in query parameters. +func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body, touchedIn map[string]bool) (params []openapiParameterObject, err error) { + // make sure the parameter is not already listed as a path parameter + for _, pathParam := range pathParams { + if pathParam.Target == field { + return nil, nil + } + } + // make sure the parameter is not already listed as a body parameter + if body != nil { + if body.FieldPath == nil { + return nil, nil + } + for _, fieldPath := range body.FieldPath { + if fieldPath.Target == field { + return nil, nil + } + } + } + schema := schemaOfField(field, reg, nil) + fieldType := field.GetTypeName() + if message.File != nil { + comments := fieldProtoComments(reg, message, field) + if err := updateOpenAPIDataFromComments(reg, &schema, message, comments, false); err != nil { + return nil, err + } + } + + isEnum := field.GetType() == descriptorpb.FieldDescriptorProto_TYPE_ENUM + items := schema.Items + if schema.Type != "" || isEnum { + if schema.Type == "object" { + return nil, nil // TODO: currently, mapping object in query parameter is not supported + } + if items != nil && (items.Type == "" || items.Type == "object") && !isEnum { + return nil, nil // TODO: currently, mapping object in query parameter is not supported + } + desc := schema.Description + if schema.Title != "" { // merge title because title of parameter object will be ignored + desc = strings.TrimSpace(schema.Title + ". " + schema.Description) + } + + // verify if the field is required + required := false + for _, fieldName := range schema.Required { + if fieldName == field.GetName() { + required = true + break + } + } + + param := openapiParameterObject{ + Description: desc, + In: "query", + Default: schema.Default, + Type: schema.Type, + Items: schema.Items, + Format: schema.Format, + Required: required, + } + if param.Type == "array" { + param.CollectionFormat = "multi" + } + + if reg.GetUseJSONNamesForFields() { + param.Name = prefix + field.GetJsonName() + } else { + param.Name = prefix + field.GetName() + } + + if isEnum { + enum, err := reg.LookupEnum("", fieldType) + if err != nil { + return nil, fmt.Errorf("unknown enum type %s", fieldType) + } + if items != nil { // array + param.Items = &openapiItemsObject{ + Type: "string", + Enum: listEnumNames(enum), + } + if reg.GetEnumsAsInts() { + param.Items.Type = "integer" + param.Items.Enum = listEnumNumbers(enum) + } + } else { + param.Type = "string" + param.Enum = listEnumNames(enum) + param.Default = getEnumDefault(enum) + if reg.GetEnumsAsInts() { + param.Type = "integer" + param.Enum = listEnumNumbers(enum) + param.Default = "0" + } + } + valueComments := enumValueProtoComments(reg, enum) + if valueComments != "" { + param.Description = strings.TrimLeft(param.Description+"\n\n "+valueComments, "\n") + } + } + return []openapiParameterObject{param}, nil + } + + // nested type, recurse + msg, err := reg.LookupMsg("", fieldType) + if err != nil { + return nil, fmt.Errorf("unknown message type %s", fieldType) + } + + // Check for cyclical message reference: + isCycle := touchedIn[*msg.Name] + if isCycle { + return nil, fmt.Errorf("recursive types are not allowed for query parameters, cycle found on %q", fieldType) + } + + // Construct a new map with the message name so a cycle further down the recursive path can be detected. + // Do not keep anything in the original touched reference and do not pass that reference along. This will + // prevent clobbering adjacent records while recursing. + touchedOut := make(map[string]bool) + for k, v := range touchedIn { + touchedOut[k] = v + } + touchedOut[*msg.Name] = true + + for _, nestedField := range msg.Fields { + var fieldName string + if reg.GetUseJSONNamesForFields() { + fieldName = field.GetJsonName() + } else { + fieldName = field.GetName() + } + p, err := nestedQueryParams(msg, nestedField, prefix+fieldName+".", reg, pathParams, body, touchedOut) + if err != nil { + return nil, err + } + params = append(params, p...) + } + return params, nil +} + +// findServicesMessagesAndEnumerations discovers all messages and enums defined in the RPC methods of the service. +func findServicesMessagesAndEnumerations(s []*descriptor.Service, reg *descriptor.Registry, m messageMap, ms messageMap, e enumMap, refs refMap) { + for _, svc := range s { + for _, meth := range svc.Methods { + // Request may be fully included in query + { + swgReqName, ok := fullyQualifiedNameToOpenAPIName(meth.RequestType.FQMN(), reg) + if !ok { + glog.Errorf("couldn't resolve OpenAPI name for FQMN '%v'", meth.RequestType.FQMN()) + continue + } + if _, ok := refs[fmt.Sprintf("#/definitions/%s", swgReqName)]; ok { + if !skipRenderingRef(meth.RequestType.FQMN()) { + m[swgReqName] = meth.RequestType + } + } + } + + swgRspName, ok := fullyQualifiedNameToOpenAPIName(meth.ResponseType.FQMN(), reg) + if !ok && !skipRenderingRef(meth.ResponseType.FQMN()) { + glog.Errorf("couldn't resolve OpenAPI name for FQMN '%v'", meth.ResponseType.FQMN()) + continue + } + + findNestedMessagesAndEnumerations(meth.RequestType, reg, m, e) + + if !skipRenderingRef(meth.ResponseType.FQMN()) { + m[swgRspName] = meth.ResponseType + } + findNestedMessagesAndEnumerations(meth.ResponseType, reg, m, e) + } + } +} + +// findNestedMessagesAndEnumerations those can be generated by the services. +func findNestedMessagesAndEnumerations(message *descriptor.Message, reg *descriptor.Registry, m messageMap, e enumMap) { + // Iterate over all the fields that + for _, t := range message.Fields { + fieldType := t.GetTypeName() + // If the type is an empty string then it is a proto primitive + if fieldType != "" { + if _, ok := m[fieldType]; !ok { + msg, err := reg.LookupMsg("", fieldType) + if err != nil { + enum, err := reg.LookupEnum("", fieldType) + if err != nil { + panic(err) + } + e[fieldType] = enum + continue + } + m[fieldType] = msg + findNestedMessagesAndEnumerations(msg, reg, m, e) + } + } + } +} + +func skipRenderingRef(refName string) bool { + _, ok := wktSchemas[refName] + return ok +} + +func renderMessagesAsDefinition(messages messageMap, d openapiDefinitionsObject, reg *descriptor.Registry, customRefs refMap) { + for name, msg := range messages { + swgName, ok := fullyQualifiedNameToOpenAPIName(msg.FQMN(), reg) + if !ok { + panic(fmt.Sprintf("can't resolve OpenAPI name from '%v'", msg.FQMN())) + } + if skipRenderingRef(name) { + continue + } + + if opt := msg.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry { + continue + } + schema := openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "object", + }, + } + msgComments := protoComments(reg, msg.File, msg.Outers, "MessageType", int32(msg.Index)) + if err := updateOpenAPIDataFromComments(reg, &schema, msg, msgComments, false); err != nil { + panic(err) + } + opts, err := getMessageOpenAPIOption(reg, msg) + if err != nil { + panic(err) + } + if opts != nil { + protoSchema := openapiSchemaFromProtoSchema(opts, reg, customRefs, msg) + + // Warning: Make sure not to overwrite any fields already set on the schema type. + schema.ExternalDocs = protoSchema.ExternalDocs + schema.ReadOnly = protoSchema.ReadOnly + schema.MultipleOf = protoSchema.MultipleOf + schema.Maximum = protoSchema.Maximum + schema.ExclusiveMaximum = protoSchema.ExclusiveMaximum + schema.Minimum = protoSchema.Minimum + schema.ExclusiveMinimum = protoSchema.ExclusiveMinimum + schema.MaxLength = protoSchema.MaxLength + schema.MinLength = protoSchema.MinLength + schema.Pattern = protoSchema.Pattern + schema.Default = protoSchema.Default + schema.MaxItems = protoSchema.MaxItems + schema.MinItems = protoSchema.MinItems + schema.UniqueItems = protoSchema.UniqueItems + schema.MaxProperties = protoSchema.MaxProperties + schema.MinProperties = protoSchema.MinProperties + schema.Required = protoSchema.Required + if protoSchema.schemaCore.Type != "" || protoSchema.schemaCore.Ref != "" { + schema.schemaCore = protoSchema.schemaCore + } + if protoSchema.Title != "" { + schema.Title = protoSchema.Title + } + if protoSchema.Description != "" { + schema.Description = protoSchema.Description + } + if protoSchema.Example != nil { + schema.Example = protoSchema.Example + } + } + + for _, f := range msg.Fields { + fieldValue := schemaOfField(f, reg, customRefs) + comments := fieldProtoComments(reg, msg, f) + if err := updateOpenAPIDataFromComments(reg, &fieldValue, f, comments, false); err != nil { + panic(err) + } + + if requiredIdx := find(schema.Required, *f.Name); requiredIdx != -1 && reg.GetUseJSONNamesForFields() { + schema.Required[requiredIdx] = f.GetJsonName() + } + + if fieldValue.Required != nil { + for _, req := range fieldValue.Required { + if reg.GetUseJSONNamesForFields() { + schema.Required = append(schema.Required, f.GetJsonName()) + } else { + schema.Required = append(schema.Required, req) + } + } + } + + kv := keyVal{Value: fieldValue} + if reg.GetUseJSONNamesForFields() { + kv.Key = f.GetJsonName() + } else { + kv.Key = f.GetName() + } + if schema.Properties == nil { + schema.Properties = &openapiSchemaObjectProperties{} + } + *schema.Properties = append(*schema.Properties, kv) + } + d[swgName] = schema + } +} + +// schemaOfField returns a OpenAPI Schema Object for a protobuf field. +func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) openapiSchemaObject { + const ( + singular = 0 + array = 1 + object = 2 + ) + var ( + core schemaCore + aggregate int + ) + + fd := f.FieldDescriptorProto + if m, err := reg.LookupMsg("", f.GetTypeName()); err == nil { + if opt := m.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry { + fd = m.GetField()[1] + aggregate = object + } + } + if fd.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED { + aggregate = array + } + + var props *openapiSchemaObjectProperties + + switch ft := fd.GetType(); ft { + case descriptorpb.FieldDescriptorProto_TYPE_ENUM, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE, descriptorpb.FieldDescriptorProto_TYPE_GROUP: + if wktSchema, ok := wktSchemas[fd.GetTypeName()]; ok { + core = wktSchema + + if fd.GetTypeName() == ".google.protobuf.Empty" { + props = &openapiSchemaObjectProperties{} + } + } else { + swgRef, ok := fullyQualifiedNameToOpenAPIName(fd.GetTypeName(), reg) + if !ok { + panic(fmt.Sprintf("can't resolve OpenAPI ref from typename '%v'", fd.GetTypeName())) + } + core = schemaCore{ + Ref: "#/definitions/" + swgRef, + } + if refs != nil { + refs[fd.GetTypeName()] = struct{}{} + } + } + default: + ftype, format, ok := primitiveSchema(ft) + if ok { + core = schemaCore{Type: ftype, Format: format} + } else { + core = schemaCore{Type: ft.String(), Format: "UNKNOWN"} + } + } + + ret := openapiSchemaObject{} + + switch aggregate { + case array: + ret = openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "array", + Items: (*openapiItemsObject)(&core), + }, + } + case object: + ret = openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "object", + }, + AdditionalProperties: &openapiSchemaObject{Properties: props, schemaCore: core}, + } + default: + ret = openapiSchemaObject{ + schemaCore: core, + Properties: props, + } + } + + if j, err := getFieldOpenAPIOption(reg, f); err == nil { + updateswaggerObjectFromJSONSchema(&ret, j, reg, f) + } + + if j, err := getFieldBehaviorOption(reg, f); err == nil { + updateSwaggerObjectFromFieldBehavior(&ret, j, f) + } + + return ret +} + +// primitiveSchema returns a pair of "Type" and "Format" in JSON Schema for +// the given primitive field type. +// The last return parameter is true iff the field type is actually primitive. +func primitiveSchema(t descriptorpb.FieldDescriptorProto_Type) (ftype, format string, ok bool) { + switch t { + case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE: + return "number", "double", true + case descriptorpb.FieldDescriptorProto_TYPE_FLOAT: + return "number", "float", true + case descriptorpb.FieldDescriptorProto_TYPE_INT64: + return "string", "int64", true + case descriptorpb.FieldDescriptorProto_TYPE_UINT64: + // 64bit integer types are marshaled as string in the default JSONPb marshaler. + // TODO(yugui) Add an option to declare 64bit integers as int64. + // + // NOTE: uint64 is not a predefined format of integer type in OpenAPI spec. + // So we cannot expect that uint64 is commonly supported by OpenAPI processor. + return "string", "uint64", true + case descriptorpb.FieldDescriptorProto_TYPE_INT32: + return "integer", "int32", true + case descriptorpb.FieldDescriptorProto_TYPE_FIXED64: + // Ditto. + return "string", "uint64", true + case descriptorpb.FieldDescriptorProto_TYPE_FIXED32: + // Ditto. + return "integer", "int64", true + case descriptorpb.FieldDescriptorProto_TYPE_BOOL: + // NOTE: in OpenAPI specification, format should be empty on boolean type + return "boolean", "", true + case descriptorpb.FieldDescriptorProto_TYPE_STRING: + // NOTE: in OpenAPI specification, format should be empty on string type + return "string", "", true + case descriptorpb.FieldDescriptorProto_TYPE_BYTES: + return "string", "byte", true + case descriptorpb.FieldDescriptorProto_TYPE_UINT32: + // Ditto. + return "integer", "int64", true + case descriptorpb.FieldDescriptorProto_TYPE_SFIXED32: + return "integer", "int32", true + case descriptorpb.FieldDescriptorProto_TYPE_SFIXED64: + return "string", "int64", true + case descriptorpb.FieldDescriptorProto_TYPE_SINT32: + return "integer", "int32", true + case descriptorpb.FieldDescriptorProto_TYPE_SINT64: + return "string", "int64", true + default: + return "", "", false + } +} + +// renderEnumerationsAsDefinition inserts enums into the definitions object. +func renderEnumerationsAsDefinition(enums enumMap, d openapiDefinitionsObject, reg *descriptor.Registry) { + for _, enum := range enums { + swgName, ok := fullyQualifiedNameToOpenAPIName(enum.FQEN(), reg) + if !ok { + panic(fmt.Sprintf("can't resolve OpenAPI name from FQEN '%v'", enum.FQEN())) + } + enumComments := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index)) + + // it may be necessary to sort the result of the GetValue function. + enumNames := listEnumNames(enum) + defaultValue := getEnumDefault(enum) + valueComments := enumValueProtoComments(reg, enum) + if valueComments != "" { + enumComments = strings.TrimLeft(enumComments+"\n\n "+valueComments, "\n") + } + enumSchemaObject := openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + Enum: enumNames, + Default: defaultValue, + }, + } + if reg.GetEnumsAsInts() { + enumSchemaObject.Type = "integer" + enumSchemaObject.Format = "int32" + enumSchemaObject.Default = "0" + enumSchemaObject.Enum = listEnumNumbers(enum) + } + if err := updateOpenAPIDataFromComments(reg, &enumSchemaObject, enum, enumComments, false); err != nil { + panic(err) + } + + d[swgName] = enumSchemaObject + } +} + +// Take in a FQMN or FQEN and return a OpenAPI safe version of the FQMN and +// a boolean indicating if FQMN was properly resolved. +func fullyQualifiedNameToOpenAPIName(fqn string, reg *descriptor.Registry) (string, bool) { + registriesSeenMutex.Lock() + defer registriesSeenMutex.Unlock() + if mapping, present := registriesSeen[reg]; present { + ret, ok := mapping[fqn] + return ret, ok + } + mapping := resolveFullyQualifiedNameToOpenAPINames(append(reg.GetAllFQMNs(), reg.GetAllFQENs()...), reg.GetUseFQNForOpenAPIName()) + registriesSeen[reg] = mapping + ret, ok := mapping[fqn] + return ret, ok +} + +// Lookup message type by location.name and return a openapiv2-safe version +// of its FQMN. +func lookupMsgAndOpenAPIName(location, name string, reg *descriptor.Registry) (*descriptor.Message, string, error) { + msg, err := reg.LookupMsg(location, name) + if err != nil { + return nil, "", err + } + swgName, ok := fullyQualifiedNameToOpenAPIName(msg.FQMN(), reg) + if !ok { + return nil, "", fmt.Errorf("can't map OpenAPI name from FQMN '%v'", msg.FQMN()) + } + return msg, swgName, nil +} + +// registriesSeen is used to memoise calls to resolveFullyQualifiedNameToOpenAPINames so +// we don't repeat it unnecessarily, since it can take some time. +var registriesSeen = map[*descriptor.Registry]map[string]string{} +var registriesSeenMutex sync.Mutex + +// Take the names of every proto and "uniq-ify" them. The idea is to produce a +// set of names that meet a couple of conditions. They must be stable, they +// must be unique, and they must be shorter than the FQN. +// +// This likely could be made better. This will always generate the same names +// but may not always produce optimal names. This is a reasonably close +// approximation of what they should look like in most cases. +func resolveFullyQualifiedNameToOpenAPINames(messages []string, useFQNForOpenAPIName bool) map[string]string { + packagesByDepth := make(map[int][][]string) + uniqueNames := make(map[string]string) + + hierarchy := func(pkg string) []string { + return strings.Split(pkg, ".") + } + + for _, p := range messages { + h := hierarchy(p) + for depth := range h { + if _, ok := packagesByDepth[depth]; !ok { + packagesByDepth[depth] = make([][]string, 0) + } + packagesByDepth[depth] = append(packagesByDepth[depth], h[len(h)-depth:]) + } + } + + count := func(list [][]string, item []string) int { + i := 0 + for _, element := range list { + if reflect.DeepEqual(element, item) { + i++ + } + } + return i + } + + for _, p := range messages { + if useFQNForOpenAPIName { + // strip leading dot from proto fqn + uniqueNames[p] = p[1:] + } else { + h := hierarchy(p) + for depth := 0; depth < len(h); depth++ { + if count(packagesByDepth[depth], h[len(h)-depth:]) == 1 { + uniqueNames[p] = strings.Join(h[len(h)-depth-1:], "") + break + } + if depth == len(h)-1 { + uniqueNames[p] = strings.Join(h, "") + } + } + } + } + return uniqueNames +} + +var canRegexp = regexp.MustCompile("{([a-zA-Z][a-zA-Z0-9_.]*).*}") + +// OpenAPI expects paths of the form /path/{string_value} but gRPC-Gateway paths are expected to be of the form /path/{string_value=strprefix/*}. This should reformat it correctly. +func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*descriptor.Field, msgs []*descriptor.Message) string { + // It seems like the right thing to do here is to just use + // strings.Split(path, "/") but that breaks badly when you hit a url like + // /{my_field=prefix/*}/ and end up with 2 sections representing my_field. + // Instead do the right thing and write a small pushdown (counter) automata + // for it. + var parts []string + depth := 0 + buffer := "" + jsonBuffer := "" + for _, char := range path { + switch char { + case '{': + // Push on the stack + depth++ + buffer += string(char) + jsonBuffer = "" + jsonBuffer += string(char) + case '}': + if depth == 0 { + panic("Encountered } without matching { before it.") + } + // Pop from the stack + depth-- + buffer += string(char) + if reg.GetUseJSONNamesForFields() && + len(jsonBuffer) > 1 { + jsonSnakeCaseName := string(jsonBuffer[1:]) + jsonCamelCaseName := string(lowerCamelCase(jsonSnakeCaseName, fields, msgs)) + prev := string(buffer[:len(buffer)-len(jsonSnakeCaseName)-2]) + buffer = strings.Join([]string{prev, "{", jsonCamelCaseName, "}"}, "") + jsonBuffer = "" + } + case '/': + if depth == 0 { + parts = append(parts, buffer) + buffer = "" + // Since the stack was empty when we hit the '/' we are done with this + // section. + continue + } + buffer += string(char) + jsonBuffer += string(char) + default: + buffer += string(char) + jsonBuffer += string(char) + } + } + + // Now append the last element to parts + parts = append(parts, buffer) + + // Parts is now an array of segments of the path. Interestingly, since the + // syntax for this subsection CAN be handled by a regexp since it has no + // memory. + for index, part := range parts { + // If part is a resource name such as "parent", "name", "user.name", the format info must be retained. + prefix := canRegexp.ReplaceAllString(part, "$1") + if isResourceName(prefix) { + continue + } + parts[index] = canRegexp.ReplaceAllString(part, "{$1}") + } + + return strings.Join(parts, "/") +} + +func isResourceName(prefix string) bool { + words := strings.Split(prefix, ".") + l := len(words) + field := words[l-1] + words = strings.Split(field, ":") + field = words[0] + return field == "parent" || field == "name" +} + +func renderServiceTags(services []*descriptor.Service) []openapiTagObject { + var tags []openapiTagObject + for _, svc := range services { + tag := openapiTagObject{ + Name: *svc.Name, + } + if proto.HasExtension(svc.Options, openapi_options.E_Openapiv2Tag) { + ext := proto.GetExtension(svc.Options, openapi_options.E_Openapiv2Tag) + opts, ok := ext.(*openapi_options.Tag) + if !ok { + glog.Errorf("extension is %T; want an OpenAPI Tag object", ext) + return nil + } + + tag.Description = opts.Description + if opts.ExternalDocs != nil { + tag.ExternalDocs = &openapiExternalDocumentationObject{ + Description: opts.ExternalDocs.Description, + URL: opts.ExternalDocs.Url, + } + } + } + tags = append(tags, tag) + } + return tags +} + +func renderServices(services []*descriptor.Service, paths openapiPathsObject, reg *descriptor.Registry, requestResponseRefs, customRefs refMap, msgs []*descriptor.Message) error { + // Correctness of svcIdx and methIdx depends on 'services' containing the services in the same order as the 'file.Service' array. + svcBaseIdx := 0 + var lastFile *descriptor.File = nil + for svcIdx, svc := range services { + if svc.File != lastFile { + lastFile = svc.File + svcBaseIdx = svcIdx + } + for methIdx, meth := range svc.Methods { + for bIdx, b := range meth.Bindings { + // Iterate over all the OpenAPI parameters + parameters := openapiParametersObject{} + for _, parameter := range b.PathParams { + + var paramType, paramFormat, desc, collectionFormat, defaultValue string + var enumNames []string + var items *openapiItemsObject + var minItems *int + switch pt := parameter.Target.GetType(); pt { + case descriptorpb.FieldDescriptorProto_TYPE_GROUP, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE: + if descriptor.IsWellKnownType(parameter.Target.GetTypeName()) { + if parameter.IsRepeated() { + return fmt.Errorf("only primitive and enum types are allowed in repeated path parameters") + } + schema := schemaOfField(parameter.Target, reg, customRefs) + paramType = schema.Type + paramFormat = schema.Format + desc = schema.Description + defaultValue = schema.Default + } else { + return fmt.Errorf("only primitive and well-known types are allowed in path parameters") + } + case descriptorpb.FieldDescriptorProto_TYPE_ENUM: + enum, err := reg.LookupEnum("", parameter.Target.GetTypeName()) + if err != nil { + return err + } + paramType = "string" + paramFormat = "" + enumNames = listEnumNames(enum) + if reg.GetEnumsAsInts() { + paramType = "integer" + paramFormat = "" + enumNames = listEnumNumbers(enum) + } + schema := schemaOfField(parameter.Target, reg, customRefs) + desc = schema.Description + defaultValue = schema.Default + default: + var ok bool + paramType, paramFormat, ok = primitiveSchema(pt) + if !ok { + return fmt.Errorf("unknown field type %v", pt) + } + + schema := schemaOfField(parameter.Target, reg, customRefs) + desc = schema.Description + defaultValue = schema.Default + } + + if parameter.IsRepeated() { + core := schemaCore{Type: paramType, Format: paramFormat} + if parameter.IsEnum() { + var s []string + core.Enum = enumNames + enumNames = s + } + items = (*openapiItemsObject)(&core) + paramType = "array" + paramFormat = "" + collectionFormat = reg.GetRepeatedPathParamSeparatorName() + minItems = new(int) + *minItems = 1 + } + + if desc == "" { + desc = fieldProtoComments(reg, parameter.Target.Message, parameter.Target) + } + parameterString := parameter.String() + if reg.GetUseJSONNamesForFields() { + parameterString = lowerCamelCase(parameterString, meth.RequestType.Fields, msgs) + } + parameters = append(parameters, openapiParameterObject{ + Name: parameterString, + Description: desc, + In: "path", + Required: true, + Default: defaultValue, + // Parameters in gRPC-Gateway can only be strings? + Type: paramType, + Format: paramFormat, + Enum: enumNames, + Items: items, + CollectionFormat: collectionFormat, + MinItems: minItems, + }) + } + // Now check if there is a body parameter + if b.Body != nil { + var schema openapiSchemaObject + desc := "" + + if len(b.Body.FieldPath) == 0 { + schema = openapiSchemaObject{ + schemaCore: schemaCore{}, + } + + wknSchemaCore, isWkn := wktSchemas[meth.RequestType.FQMN()] + if !isWkn { + err := schema.setRefFromFQN(meth.RequestType.FQMN(), reg) + if err != nil { + return err + } + } else { + schema.schemaCore = wknSchemaCore + + // Special workaround for Empty: it's well-known type but wknSchemas only returns schema.schemaCore; but we need to set schema.Properties which is a level higher. + if meth.RequestType.FQMN() == ".google.protobuf.Empty" { + schema.Properties = &openapiSchemaObjectProperties{} + } + } + } else { + lastField := b.Body.FieldPath[len(b.Body.FieldPath)-1] + schema = schemaOfField(lastField.Target, reg, customRefs) + if schema.Description != "" { + desc = schema.Description + } else { + desc = fieldProtoComments(reg, lastField.Target.Message, lastField.Target) + } + } + + if meth.GetClientStreaming() { + desc += " (streaming inputs)" + } + parameters = append(parameters, openapiParameterObject{ + Name: "body", + Description: desc, + In: "body", + Required: true, + Schema: &schema, + }) + // add the parameters to the query string + queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body) + if err != nil { + return err + } + parameters = append(parameters, queryParams...) + } else if b.HTTPMethod == "GET" || b.HTTPMethod == "DELETE" { + // add the parameters to the query string + queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body) + if err != nil { + return err + } + parameters = append(parameters, queryParams...) + } + + pathItemObject, ok := paths[templateToOpenAPIPath(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)] + if !ok { + pathItemObject = openapiPathItemObject{} + } + + methProtoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.ServiceDescriptorProto)(nil)), "Method") + desc := "A successful response." + var responseSchema openapiSchemaObject + + if b.ResponseBody == nil || len(b.ResponseBody.FieldPath) == 0 { + responseSchema = openapiSchemaObject{ + schemaCore: schemaCore{}, + } + + // Don't link to a full definition for + // empty; it's overly verbose. + // schema.Properties{} renders it as + // well, without a definition + wknSchemaCore, isWkn := wktSchemas[meth.ResponseType.FQMN()] + if !isWkn { + err := responseSchema.setRefFromFQN(meth.ResponseType.FQMN(), reg) + if err != nil { + return err + } + } else { + responseSchema.schemaCore = wknSchemaCore + + // Special workaround for Empty: it's well-known type but wknSchemas only returns schema.schemaCore; but we need to set schema.Properties which is a level higher. + if meth.ResponseType.FQMN() == ".google.protobuf.Empty" { + responseSchema.Properties = &openapiSchemaObjectProperties{} + } + } + } else { + // This is resolving the value of response_body in the google.api.HttpRule + lastField := b.ResponseBody.FieldPath[len(b.ResponseBody.FieldPath)-1] + responseSchema = schemaOfField(lastField.Target, reg, customRefs) + if responseSchema.Description != "" { + desc = responseSchema.Description + } else { + desc = fieldProtoComments(reg, lastField.Target.Message, lastField.Target) + } + } + if meth.GetServerStreaming() { + desc += "(streaming responses)" + responseSchema.Type = "object" + swgRef, _ := fullyQualifiedNameToOpenAPIName(meth.ResponseType.FQMN(), reg) + responseSchema.Title = "Stream result of " + swgRef + + props := openapiSchemaObjectProperties{ + keyVal{ + Key: "result", + Value: openapiSchemaObject{ + schemaCore: schemaCore{ + Ref: responseSchema.Ref, + }, + }, + }, + } + statusDef, hasStatus := fullyQualifiedNameToOpenAPIName(".google.rpc.Status", reg) + if hasStatus { + props = append(props, keyVal{ + Key: "error", + Value: openapiSchemaObject{ + schemaCore: schemaCore{ + Ref: fmt.Sprintf("#/definitions/%s", statusDef)}, + }, + }) + } + responseSchema.Properties = &props + responseSchema.Ref = "" + } + + tag := svc.GetName() + if pkg := svc.File.GetPackage(); pkg != "" && reg.IsIncludePackageInTags() { + tag = pkg + "." + tag + } + + operationObject := &openapiOperationObject{ + Tags: []string{tag}, + Parameters: parameters, + Responses: openapiResponsesObject{ + "200": openapiResponseObject{ + Description: desc, + Schema: responseSchema, + Headers: openapiHeadersObject{}, + }, + }, + } + if !reg.GetDisableDefaultErrors() { + errDef, hasErrDef := fullyQualifiedNameToOpenAPIName(".google.rpc.Status", reg) + if hasErrDef { + // https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responses-object + operationObject.Responses["default"] = openapiResponseObject{ + Description: "An unexpected error response.", + Schema: openapiSchemaObject{ + schemaCore: schemaCore{ + Ref: fmt.Sprintf("#/definitions/%s", errDef), + }, + }, + } + } + } + operationObject.OperationID = fmt.Sprintf("%s_%s", svc.GetName(), meth.GetName()) + if reg.GetSimpleOperationIDs() { + operationObject.OperationID = meth.GetName() + } + if bIdx != 0 { + // OperationID must be unique in an OpenAPI v2 definition. + operationObject.OperationID += strconv.Itoa(bIdx + 1) + } + + // Fill reference map with referenced request messages + for _, param := range operationObject.Parameters { + if param.Schema != nil && param.Schema.Ref != "" { + requestResponseRefs[param.Schema.Ref] = struct{}{} + } + } + + methComments := protoComments(reg, svc.File, nil, "Service", int32(svcIdx-svcBaseIdx), methProtoPath, int32(methIdx)) + if err := updateOpenAPIDataFromComments(reg, operationObject, meth, methComments, false); err != nil { + panic(err) + } + + opts, err := getMethodOpenAPIOption(reg, meth) + if opts != nil { + if err != nil { + panic(err) + } + operationObject.ExternalDocs = protoExternalDocumentationToOpenAPIExternalDocumentation(opts.ExternalDocs, reg, meth) + // TODO(ivucica): this would be better supported by looking whether the method is deprecated in the proto file + operationObject.Deprecated = opts.Deprecated + + if opts.Summary != "" { + operationObject.Summary = opts.Summary + } + if opts.Description != "" { + operationObject.Description = opts.Description + } + if len(opts.Tags) > 0 { + operationObject.Tags = make([]string, len(opts.Tags)) + copy(operationObject.Tags, opts.Tags) + } + if opts.OperationId != "" { + operationObject.OperationID = opts.OperationId + } + if opts.Security != nil { + newSecurity := []openapiSecurityRequirementObject{} + if operationObject.Security != nil { + newSecurity = *operationObject.Security + } + for _, secReq := range opts.Security { + newSecReq := openapiSecurityRequirementObject{} + for secReqKey, secReqValue := range secReq.SecurityRequirement { + if secReqValue == nil { + continue + } + + newSecReqValue := make([]string, len(secReqValue.Scope)) + copy(newSecReqValue, secReqValue.Scope) + newSecReq[secReqKey] = newSecReqValue + } + + if len(newSecReq) > 0 { + newSecurity = append(newSecurity, newSecReq) + } + } + operationObject.Security = &newSecurity + } + if opts.Responses != nil { + for name, resp := range opts.Responses { + // Merge response data into default response if available. + respObj := operationObject.Responses[name] + if resp.Description != "" { + respObj.Description = resp.Description + } + if resp.Schema != nil { + respObj.Schema = openapiSchemaFromProtoSchema(resp.Schema, reg, customRefs, meth) + } + if resp.Examples != nil { + respObj.Examples = openapiExamplesFromProtoExamples(resp.Examples) + } + if resp.Headers != nil { + hdrs, err := processHeaders(resp.Headers) + if err != nil { + return err + } + respObj.Headers = hdrs + } + if resp.Extensions != nil { + exts, err := processExtensions(resp.Extensions) + if err != nil { + return err + } + respObj.extensions = exts + } + operationObject.Responses[name] = respObj + } + } + + if opts.Extensions != nil { + exts, err := processExtensions(opts.Extensions) + if err != nil { + return err + } + operationObject.extensions = exts + } + + if len(opts.Produces) > 0 { + operationObject.Produces = make([]string, len(opts.Produces)) + copy(operationObject.Produces, opts.Produces) + } + + // TODO(ivucica): add remaining fields of operation object + } + + switch b.HTTPMethod { + case "DELETE": + pathItemObject.Delete = operationObject + case "GET": + pathItemObject.Get = operationObject + case "POST": + pathItemObject.Post = operationObject + case "PUT": + pathItemObject.Put = operationObject + case "PATCH": + pathItemObject.Patch = operationObject + } + paths[templateToOpenAPIPath(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)] = pathItemObject + } + } + } + + // Success! return nil on the error object + return nil +} + +// This function is called with a param which contains the entire definition of a method. +func applyTemplate(p param) (*openapiSwaggerObject, error) { + // Create the basic template object. This is the object that everything is + // defined off of. + s := openapiSwaggerObject{ + // OpenAPI 2.0 is the version of this document + Swagger: "2.0", + Consumes: []string{"application/json"}, + Produces: []string{"application/json"}, + Paths: make(openapiPathsObject), + Definitions: make(openapiDefinitionsObject), + Info: openapiInfoObject{ + Title: *p.File.Name, + Version: "version not set", + }, + } + + // Loops through all the services and their exposed GET/POST/PUT/DELETE definitions + // and create entries for all of them. + // Also adds custom user specified references to second map. + requestResponseRefs, customRefs := refMap{}, refMap{} + if err := renderServices(p.Services, s.Paths, p.reg, requestResponseRefs, customRefs, p.Messages); err != nil { + panic(err) + } + s.Tags = append(s.Tags, renderServiceTags(p.Services)...) + + messages := messageMap{} + streamingMessages := messageMap{} + enums := enumMap{} + + if !p.reg.GetDisableDefaultErrors() { + // Add the error type to the message map + runtimeError, swgRef, err := lookupMsgAndOpenAPIName("google.rpc", "Status", p.reg) + if err == nil { + messages[swgRef] = runtimeError + } else { + // just in case there is an error looking up runtimeError + glog.Error(err) + } + } + + // Find all the service's messages and enumerations that are defined (recursively) + // and write request, response and other custom (but referenced) types out as definition objects. + findServicesMessagesAndEnumerations(p.Services, p.reg, messages, streamingMessages, enums, requestResponseRefs) + renderMessagesAsDefinition(messages, s.Definitions, p.reg, customRefs) + renderEnumerationsAsDefinition(enums, s.Definitions, p.reg) + + // File itself might have some comments and metadata. + packageProtoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Package") + packageComments := protoComments(p.reg, p.File, nil, "Package", packageProtoPath) + if err := updateOpenAPIDataFromComments(p.reg, &s, p, packageComments, true); err != nil { + panic(err) + } + + // There may be additional options in the OpenAPI option in the proto. + spb, err := getFileOpenAPIOption(p.reg, p.File) + if err != nil { + panic(err) + } + if spb != nil { + if spb.Swagger != "" { + s.Swagger = spb.Swagger + } + if spb.Info != nil { + if spb.Info.Title != "" { + s.Info.Title = spb.Info.Title + } + if spb.Info.Description != "" { + s.Info.Description = spb.Info.Description + } + if spb.Info.TermsOfService != "" { + s.Info.TermsOfService = spb.Info.TermsOfService + } + if spb.Info.Version != "" { + s.Info.Version = spb.Info.Version + } + if spb.Info.Contact != nil { + if s.Info.Contact == nil { + s.Info.Contact = &openapiContactObject{} + } + if spb.Info.Contact.Name != "" { + s.Info.Contact.Name = spb.Info.Contact.Name + } + if spb.Info.Contact.Url != "" { + s.Info.Contact.URL = spb.Info.Contact.Url + } + if spb.Info.Contact.Email != "" { + s.Info.Contact.Email = spb.Info.Contact.Email + } + } + if spb.Info.License != nil { + if s.Info.License == nil { + s.Info.License = &openapiLicenseObject{} + } + if spb.Info.License.Name != "" { + s.Info.License.Name = spb.Info.License.Name + } + if spb.Info.License.Url != "" { + s.Info.License.URL = spb.Info.License.Url + } + } + if spb.Info.Extensions != nil { + exts, err := processExtensions(spb.Info.Extensions) + if err != nil { + return nil, err + } + s.Info.extensions = exts + } + } + if spb.Host != "" { + s.Host = spb.Host + } + if spb.BasePath != "" { + s.BasePath = spb.BasePath + } + if len(spb.Schemes) > 0 { + s.Schemes = make([]string, len(spb.Schemes)) + for i, scheme := range spb.Schemes { + s.Schemes[i] = strings.ToLower(scheme.String()) + } + } + if len(spb.Consumes) > 0 { + s.Consumes = make([]string, len(spb.Consumes)) + copy(s.Consumes, spb.Consumes) + } + if len(spb.Produces) > 0 { + s.Produces = make([]string, len(spb.Produces)) + copy(s.Produces, spb.Produces) + } + if spb.SecurityDefinitions != nil && spb.SecurityDefinitions.Security != nil { + if s.SecurityDefinitions == nil { + s.SecurityDefinitions = openapiSecurityDefinitionsObject{} + } + for secDefKey, secDefValue := range spb.SecurityDefinitions.Security { + var newSecDefValue openapiSecuritySchemeObject + if oldSecDefValue, ok := s.SecurityDefinitions[secDefKey]; !ok { + newSecDefValue = openapiSecuritySchemeObject{} + } else { + newSecDefValue = oldSecDefValue + } + if secDefValue.Type != openapi_options.SecurityScheme_TYPE_INVALID { + switch secDefValue.Type { + case openapi_options.SecurityScheme_TYPE_BASIC: + newSecDefValue.Type = "basic" + case openapi_options.SecurityScheme_TYPE_API_KEY: + newSecDefValue.Type = "apiKey" + case openapi_options.SecurityScheme_TYPE_OAUTH2: + newSecDefValue.Type = "oauth2" + } + } + if secDefValue.Description != "" { + newSecDefValue.Description = secDefValue.Description + } + if secDefValue.Name != "" { + newSecDefValue.Name = secDefValue.Name + } + if secDefValue.In != openapi_options.SecurityScheme_IN_INVALID { + switch secDefValue.In { + case openapi_options.SecurityScheme_IN_QUERY: + newSecDefValue.In = "query" + case openapi_options.SecurityScheme_IN_HEADER: + newSecDefValue.In = "header" + } + } + if secDefValue.Flow != openapi_options.SecurityScheme_FLOW_INVALID { + switch secDefValue.Flow { + case openapi_options.SecurityScheme_FLOW_IMPLICIT: + newSecDefValue.Flow = "implicit" + case openapi_options.SecurityScheme_FLOW_PASSWORD: + newSecDefValue.Flow = "password" + case openapi_options.SecurityScheme_FLOW_APPLICATION: + newSecDefValue.Flow = "application" + case openapi_options.SecurityScheme_FLOW_ACCESS_CODE: + newSecDefValue.Flow = "accessCode" + } + } + if secDefValue.AuthorizationUrl != "" { + newSecDefValue.AuthorizationURL = secDefValue.AuthorizationUrl + } + if secDefValue.TokenUrl != "" { + newSecDefValue.TokenURL = secDefValue.TokenUrl + } + if secDefValue.Scopes != nil { + if newSecDefValue.Scopes == nil { + newSecDefValue.Scopes = openapiScopesObject{} + } + for scopeKey, scopeDesc := range secDefValue.Scopes.Scope { + newSecDefValue.Scopes[scopeKey] = scopeDesc + } + } + if secDefValue.Extensions != nil { + exts, err := processExtensions(secDefValue.Extensions) + if err != nil { + return nil, err + } + newSecDefValue.extensions = exts + } + s.SecurityDefinitions[secDefKey] = newSecDefValue + } + } + if spb.Security != nil { + var newSecurity []openapiSecurityRequirementObject + if s.Security != nil { + newSecurity = s.Security + } + for _, secReq := range spb.Security { + newSecReq := openapiSecurityRequirementObject{} + for secReqKey, secReqValue := range secReq.SecurityRequirement { + if secReqValue == nil { + return nil, fmt.Errorf("malformed security requirement spec for key %q; value is required", secReqKey) + } + newSecReqValue := make([]string, len(secReqValue.Scope)) + copy(newSecReqValue, secReqValue.Scope) + newSecReq[secReqKey] = newSecReqValue + } + newSecurity = append(newSecurity, newSecReq) + } + s.Security = newSecurity + } + s.ExternalDocs = protoExternalDocumentationToOpenAPIExternalDocumentation(spb.ExternalDocs, p.reg, spb) + // Populate all Paths with Responses set at top level, + // preferring Responses already set over those at the top level. + if spb.Responses != nil { + for _, verbs := range s.Paths { + var maps []openapiResponsesObject + if verbs.Delete != nil { + maps = append(maps, verbs.Delete.Responses) + } + if verbs.Get != nil { + maps = append(maps, verbs.Get.Responses) + } + if verbs.Post != nil { + maps = append(maps, verbs.Post.Responses) + } + if verbs.Put != nil { + maps = append(maps, verbs.Put.Responses) + } + if verbs.Patch != nil { + maps = append(maps, verbs.Patch.Responses) + } + + for k, v := range spb.Responses { + for _, respMap := range maps { + if _, ok := respMap[k]; ok { + // Don't overwrite already existing Responses + continue + } + respMap[k] = openapiResponseObject{ + Description: v.Description, + Schema: openapiSchemaFromProtoSchema(v.Schema, p.reg, customRefs, nil), + Examples: openapiExamplesFromProtoExamples(v.Examples), + } + } + } + } + } + + if spb.Extensions != nil { + exts, err := processExtensions(spb.Extensions) + if err != nil { + return nil, err + } + s.extensions = exts + } + + // Additional fields on the OpenAPI v2 spec's "OpenAPI" object + // should be added here, once supported in the proto. + } + + // Finally add any references added by users that aren't + // otherwise rendered. + addCustomRefs(s.Definitions, p.reg, customRefs) + + return &s, nil +} + +func processExtensions(inputExts map[string]*structpb.Value) ([]extension, error) { + exts := []extension{} + for k, v := range inputExts { + if !strings.HasPrefix(k, "x-") { + return nil, fmt.Errorf("extension keys need to start with \"x-\": %q", k) + } + ext, err := (&protojson.MarshalOptions{Indent: " "}).Marshal(v) + if err != nil { + return nil, err + } + exts = append(exts, extension{key: k, value: json.RawMessage(ext)}) + } + sort.Slice(exts, func(i, j int) bool { return exts[i].key < exts[j].key }) + return exts, nil +} + +func validateHeaderTypeAndFormat(headerType string, format string) error { + // The type of the object. The value MUST be one of "string", "number", "integer", "boolean", or "array" + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject + // Note: currently not implementing array as we are only implementing this in the operation response context + switch headerType { + // the format property is an open string-valued property, and can have any value to support documentation needs + // primary check for format is to ensure that the number/integer formats are extensions of the specified type + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#dataTypeFormat + case "string": + return nil + case "number": + switch format { + case "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "int", + "int8", + "int16", + "int32", + "int64", + "float", + "float32", + "float64", + "complex64", + "complex128", + "double", + "byte", + "rune", + "uintptr", + "": + return nil + default: + return fmt.Errorf("the provided format %q is not a valid extension of the type %q", format, headerType) + } + case "integer": + switch format { + case "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "int", + "int8", + "int16", + "int32", + "int64", + "": + return nil + default: + return fmt.Errorf("the provided format %q is not a valid extension of the type %q", format, headerType) + } + case "boolean": + return nil + } + return fmt.Errorf("the provided header type %q is not supported", headerType) +} + +func validateDefaultValueTypeAndFormat(headerType string, defaultValue string, format string) error { + switch headerType { + case "string": + if !isQuotedString(defaultValue) { + return fmt.Errorf("the provided default value %q does not match provider type %q, or is not properly quoted with escaped quotations", defaultValue, headerType) + } + switch format { + case "date-time": + unquoteTime := strings.Trim(defaultValue, `"`) + _, err := time.Parse(time.RFC3339, unquoteTime) + if err != nil { + return fmt.Errorf("the provided default value %q is not a valid RFC3339 date-time string", defaultValue) + } + case "date": + const ( + layoutRFC3339Date = "2006-01-02" + ) + unquoteDate := strings.Trim(defaultValue, `"`) + _, err := time.Parse(layoutRFC3339Date, unquoteDate) + if err != nil { + return fmt.Errorf("the provided default value %q is not a valid RFC3339 date-time string", defaultValue) + } + } + case "number": + err := isJSONNumber(defaultValue, headerType) + if err != nil { + return err + } + case "integer": + switch format { + case "int32": + _, err := strconv.ParseInt(defaultValue, 0, 32) + if err != nil { + return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) + } + case "uint32": + _, err := strconv.ParseUint(defaultValue, 0, 32) + if err != nil { + return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) + } + case "int64": + _, err := strconv.ParseInt(defaultValue, 0, 64) + if err != nil { + return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) + } + case "uint64": + _, err := strconv.ParseUint(defaultValue, 0, 64) + if err != nil { + return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) + } + default: + _, err := strconv.ParseInt(defaultValue, 0, 64) + if err != nil { + return fmt.Errorf("the provided default value %q does not match provided type %q", defaultValue, headerType) + } + } + case "boolean": + if !isBool(defaultValue) { + return fmt.Errorf("the provided default value %q does not match provider type %q", defaultValue, headerType) + } + } + return nil +} + +func isQuotedString(s string) bool { + return len(s) >= 2 && s[0] == '"' && s[len(s)-1] == '"' +} + +func isJSONNumber(s string, t string) error { + val, err := strconv.ParseFloat(s, 64) + if err != nil { + return fmt.Errorf("the provided default value %q does not match provider type %q", s, t) + } + // Floating point values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted. + // See: https://tools.ietf.org/html/rfc4627#section-2.4 + if math.IsInf(val, 0) || math.IsNaN(val) { + return fmt.Errorf("the provided number %q is not a valid JSON number", s) + } + + return nil +} + +func isBool(s string) bool { + // Unable to use strconv.ParseBool because it returns truthy values https://golang.org/pkg/strconv/#example_ParseBool + // per https://swagger.io/specification/v2/#data-types + // type: boolean represents two values: true and false. Note that truthy and falsy values such as "true", "", 0 or null are not considered boolean values. + return s == "true" || s == "false" +} + +func processHeaders(inputHdrs map[string]*openapi_options.Header) (openapiHeadersObject, error) { + hdrs := map[string]openapiHeaderObject{} + for k, v := range inputHdrs { + header := textproto.CanonicalMIMEHeaderKey(k) + ret := openapiHeaderObject{ + Description: v.Description, + Format: v.Format, + Pattern: v.Pattern, + } + err := validateHeaderTypeAndFormat(v.Type, v.Format) + if err != nil { + return nil, err + } + ret.Type = v.Type + if v.Default != "" { + err := validateDefaultValueTypeAndFormat(v.Type, v.Default, v.Format) + if err != nil { + return nil, err + } + ret.Default = json.RawMessage(v.Default) + } + hdrs[header] = ret + } + return hdrs, nil +} + +// updateOpenAPIDataFromComments updates a OpenAPI object based on a comment +// from the proto file. +// +// First paragraph of a comment is used for summary. Remaining paragraphs of +// a comment are used for description. If 'Summary' field is not present on +// the passed swaggerObject, the summary and description are joined by \n\n. +// +// If there is a field named 'Info', its 'Summary' and 'Description' fields +// will be updated instead. +// +// If there is no 'Summary', the same behavior will be attempted on 'Title', +// but only if the last character is not a period. +func updateOpenAPIDataFromComments(reg *descriptor.Registry, swaggerObject interface{}, data interface{}, comment string, isPackageObject bool) error { + if len(comment) == 0 { + return nil + } + + // Checks whether the "use_go_templates" flag is set to true + if reg.GetUseGoTemplate() { + comment = goTemplateComments(comment, data, reg) + } + + // Figure out what to apply changes to. + swaggerObjectValue := reflect.ValueOf(swaggerObject) + infoObjectValue := swaggerObjectValue.Elem().FieldByName("Info") + if !infoObjectValue.CanSet() { + // No such field? Apply summary and description directly to + // passed object. + infoObjectValue = swaggerObjectValue.Elem() + } + + // Figure out which properties to update. + summaryValue := infoObjectValue.FieldByName("Summary") + descriptionValue := infoObjectValue.FieldByName("Description") + readOnlyValue := infoObjectValue.FieldByName("ReadOnly") + + if readOnlyValue.Kind() == reflect.Bool && readOnlyValue.CanSet() && strings.Contains(comment, "Output only.") { + readOnlyValue.Set(reflect.ValueOf(true)) + } + + usingTitle := false + if !summaryValue.CanSet() { + summaryValue = infoObjectValue.FieldByName("Title") + usingTitle = true + } + + paragraphs := strings.Split(comment, "\n\n") + + // If there is a summary (or summary-equivalent) and it's empty, use the first + // paragraph as summary, and the rest as description. + if summaryValue.CanSet() { + summary := strings.TrimSpace(paragraphs[0]) + description := strings.TrimSpace(strings.Join(paragraphs[1:], "\n\n")) + if !usingTitle || (len(summary) > 0 && summary[len(summary)-1] != '.') { + // overrides the schema value only if it's empty + // keep the comment precedence when updating the package definition + if summaryValue.Len() == 0 || isPackageObject { + summaryValue.Set(reflect.ValueOf(summary)) + } + if len(description) > 0 { + if !descriptionValue.CanSet() { + return fmt.Errorf("encountered object type with a summary, but no description") + } + // overrides the schema value only if it's empty + // keep the comment precedence when updating the package definition + if descriptionValue.Len() == 0 || isPackageObject { + descriptionValue.Set(reflect.ValueOf(description)) + } + } + return nil + } + } + + // There was no summary field on the swaggerObject. Try to apply the + // whole comment into description if the OpenAPI object description is empty. + if descriptionValue.CanSet() { + if descriptionValue.Len() == 0 || isPackageObject { + descriptionValue.Set(reflect.ValueOf(strings.Join(paragraphs, "\n\n"))) + } + return nil + } + + return fmt.Errorf("no description nor summary property") +} + +func fieldProtoComments(reg *descriptor.Registry, msg *descriptor.Message, field *descriptor.Field) string { + protoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.DescriptorProto)(nil)), "Field") + for i, f := range msg.Fields { + if f == field { + return protoComments(reg, msg.File, msg.Outers, "MessageType", int32(msg.Index), protoPath, int32(i)) + } + } + return "" +} + +func enumValueProtoComments(reg *descriptor.Registry, enum *descriptor.Enum) string { + protoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.EnumDescriptorProto)(nil)), "Value") + var comments []string + for idx, value := range enum.GetValue() { + name := value.GetName() + if reg.GetEnumsAsInts() { + name = strconv.Itoa(int(value.GetNumber())) + } + str := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index), protoPath, int32(idx)) + if str != "" { + comments = append(comments, name+": "+str) + } + } + if len(comments) > 0 { + return "- " + strings.Join(comments, "\n - ") + } + return "" +} + +func protoComments(reg *descriptor.Registry, file *descriptor.File, outers []string, typeName string, typeIndex int32, fieldPaths ...int32) string { + if file.SourceCodeInfo == nil { + fmt.Fprintln(os.Stderr, "descriptor.File should not contain nil SourceCodeInfo") + return "" + } + + outerPaths := make([]int32, len(outers)) + for i := range outers { + location := "" + if file.Package != nil { + location = file.GetPackage() + } + + msg, err := reg.LookupMsg(location, strings.Join(outers[:i+1], ".")) + if err != nil { + panic(err) + } + outerPaths[i] = int32(msg.Index) + } + + for _, loc := range file.SourceCodeInfo.Location { + if !isProtoPathMatches(loc.Path, outerPaths, typeName, typeIndex, fieldPaths) { + continue + } + comments := "" + if loc.LeadingComments != nil { + comments = strings.TrimRight(*loc.LeadingComments, "\n") + comments = strings.TrimSpace(comments) + // TODO(ivucica): this is a hack to fix "// " being interpreted as "//". + // perhaps we should: + // - split by \n + // - determine if every (but first and last) line begins with " " + // - trim every line only if that is the case + // - join by \n + comments = strings.Replace(comments, "\n ", "\n", -1) + } + return comments + } + return "" +} + +func goTemplateComments(comment string, data interface{}, reg *descriptor.Registry) string { + var temp bytes.Buffer + tpl, err := template.New("").Funcs(template.FuncMap{ + // Allows importing documentation from a file + "import": func(name string) string { + file, err := ioutil.ReadFile(name) + if err != nil { + return err.Error() + } + // Runs template over imported file + return goTemplateComments(string(file), data, reg) + }, + // Grabs title and description from a field + "fieldcomments": func(msg *descriptor.Message, field *descriptor.Field) string { + return strings.Replace(fieldProtoComments(reg, msg, field), "\n", "
", -1) + }, + }).Parse(comment) + if err != nil { + // If there is an error parsing the templating insert the error as string in the comment + // to make it easier to debug the template error + return err.Error() + } + err = tpl.Execute(&temp, data) + if err != nil { + // If there is an error executing the templating insert the error as string in the comment + // to make it easier to debug the error + return err.Error() + } + return temp.String() +} + +var messageProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "MessageType") +var nestedProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.DescriptorProto)(nil)), "NestedType") +var packageProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Package") +var serviceProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Service") +var methodProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.ServiceDescriptorProto)(nil)), "Method") + +func isProtoPathMatches(paths []int32, outerPaths []int32, typeName string, typeIndex int32, fieldPaths []int32) bool { + if typeName == "Package" && typeIndex == packageProtoPath { + // path for package comments is just [2], and all the other processing + // is too complex for it. + if len(paths) == 0 || typeIndex != paths[0] { + return false + } + return true + } + + if len(paths) != len(outerPaths)*2+2+len(fieldPaths) { + return false + } + + if typeName == "Method" { + if paths[0] != serviceProtoPath || paths[2] != methodProtoPath { + return false + } + paths = paths[2:] + } else { + typeNameDescriptor := reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)) + + if len(outerPaths) > 0 { + if paths[0] != messageProtoPath || paths[1] != outerPaths[0] { + return false + } + paths = paths[2:] + outerPaths = outerPaths[1:] + + for i, v := range outerPaths { + if paths[i*2] != nestedProtoPath || paths[i*2+1] != v { + return false + } + } + paths = paths[len(outerPaths)*2:] + + if typeName == "MessageType" { + typeName = "NestedType" + } + typeNameDescriptor = reflect.TypeOf((*descriptorpb.DescriptorProto)(nil)) + } + + if paths[0] != protoPathIndex(typeNameDescriptor, typeName) || paths[1] != typeIndex { + return false + } + paths = paths[2:] + } + + for i, v := range fieldPaths { + if paths[i] != v { + return false + } + } + return true +} + +// protoPathIndex returns a path component for google.protobuf.descriptor.SourceCode_Location. +// +// Specifically, it returns an id as generated from descriptor proto which +// can be used to determine what type the id following it in the path is. +// For example, if we are trying to locate comments related to a field named +// `Address` in a message named `Person`, the path will be: +// +// [4, a, 2, b] +// +// While `a` gets determined by the order in which the messages appear in +// the proto file, and `b` is the field index specified in the proto +// file itself, the path actually needs to specify that `a` refers to a +// message and not, say, a service; and that `b` refers to a field and not +// an option. +// +// protoPathIndex figures out the values 4 and 2 in the above example. Because +// messages are top level objects, the value of 4 comes from field id for +// `MessageType` inside `google.protobuf.descriptor.FileDescriptor` message. +// This field has a message type `google.protobuf.descriptor.DescriptorProto`. +// And inside message `DescriptorProto`, there is a field named `Field` with id +// 2. +// +// Some code generators seem to be hardcoding these values; this method instead +// interprets them from `descriptor.proto`-derived Go source as necessary. +func protoPathIndex(descriptorType reflect.Type, what string) int32 { + field, ok := descriptorType.Elem().FieldByName(what) + if !ok { + panic(fmt.Errorf("could not find protobuf descriptor type id for %s", what)) + } + pbtag := field.Tag.Get("protobuf") + if pbtag == "" { + panic(fmt.Errorf("no Go tag 'protobuf' on protobuf descriptor for %s", what)) + } + path, err := strconv.Atoi(strings.Split(pbtag, ",")[1]) + if err != nil { + panic(fmt.Errorf("protobuf descriptor id for %s cannot be converted to a number: %s", what, err.Error())) + } + + return int32(path) +} + +// extractOperationOptionFromMethodDescriptor extracts the message of type +// openapi_options.Operation from a given proto method's descriptor. +func extractOperationOptionFromMethodDescriptor(meth *descriptorpb.MethodDescriptorProto) (*openapi_options.Operation, error) { + if meth.Options == nil { + return nil, nil + } + if !proto.HasExtension(meth.Options, openapi_options.E_Openapiv2Operation) { + return nil, nil + } + ext := proto.GetExtension(meth.Options, openapi_options.E_Openapiv2Operation) + opts, ok := ext.(*openapi_options.Operation) + if !ok { + return nil, fmt.Errorf("extension is %T; want an Operation", ext) + } + return opts, nil +} + +// extractSchemaOptionFromMessageDescriptor extracts the message of type +// openapi_options.Schema from a given proto message's descriptor. +func extractSchemaOptionFromMessageDescriptor(msg *descriptorpb.DescriptorProto) (*openapi_options.Schema, error) { + if msg.Options == nil { + return nil, nil + } + if !proto.HasExtension(msg.Options, openapi_options.E_Openapiv2Schema) { + return nil, nil + } + ext := proto.GetExtension(msg.Options, openapi_options.E_Openapiv2Schema) + opts, ok := ext.(*openapi_options.Schema) + if !ok { + return nil, fmt.Errorf("extension is %T; want a Schema", ext) + } + return opts, nil +} + +// extractOpenAPIOptionFromFileDescriptor extracts the message of type +// openapi_options.OpenAPI from a given proto method's descriptor. +func extractOpenAPIOptionFromFileDescriptor(file *descriptorpb.FileDescriptorProto) (*openapi_options.Swagger, error) { + if file.Options == nil { + return nil, nil + } + if !proto.HasExtension(file.Options, openapi_options.E_Openapiv2Swagger) { + return nil, nil + } + ext := proto.GetExtension(file.Options, openapi_options.E_Openapiv2Swagger) + opts, ok := ext.(*openapi_options.Swagger) + if !ok { + return nil, fmt.Errorf("extension is %T; want a OpenAPI object", ext) + } + return opts, nil +} + +func extractJSONSchemaFromFieldDescriptor(fd *descriptorpb.FieldDescriptorProto) (*openapi_options.JSONSchema, error) { + if fd.Options == nil { + return nil, nil + } + if !proto.HasExtension(fd.Options, openapi_options.E_Openapiv2Field) { + return nil, nil + } + ext := proto.GetExtension(fd.Options, openapi_options.E_Openapiv2Field) + opts, ok := ext.(*openapi_options.JSONSchema) + if !ok { + return nil, fmt.Errorf("extension is %T; want a JSONSchema object", ext) + } + return opts, nil +} + +func extractFieldBehaviorFromFieldDescriptor(fd *descriptorpb.FieldDescriptorProto) ([]annotations.FieldBehavior, error) { + if fd.Options == nil { + return nil, nil + } + if !proto.HasExtension(fd.Options, annotations.E_FieldBehavior) { + return nil, nil + } + ext := proto.GetExtension(fd.Options, annotations.E_FieldBehavior) + opts, ok := ext.([]annotations.FieldBehavior) + if !ok { + return nil, fmt.Errorf("extension is %T; want a []FieldBehavior object", ext) + } + return opts, nil +} + +func getMethodOpenAPIOption(reg *descriptor.Registry, meth *descriptor.Method) (*openapi_options.Operation, error) { + opts, err := extractOperationOptionFromMethodDescriptor(meth.MethodDescriptorProto) + if err != nil { + return nil, err + } + if opts != nil { + return opts, nil + } + opts, ok := reg.GetOpenAPIMethodOption(meth.FQMN()) + if !ok { + return nil, nil + } + return opts, nil +} + +func getMessageOpenAPIOption(reg *descriptor.Registry, msg *descriptor.Message) (*openapi_options.Schema, error) { + opts, err := extractSchemaOptionFromMessageDescriptor(msg.DescriptorProto) + if err != nil { + return nil, err + } + if opts != nil { + return opts, nil + } + opts, ok := reg.GetOpenAPIMessageOption(msg.FQMN()) + if !ok { + return nil, nil + } + return opts, nil +} + +func getFileOpenAPIOption(reg *descriptor.Registry, file *descriptor.File) (*openapi_options.Swagger, error) { + opts, err := extractOpenAPIOptionFromFileDescriptor(file.FileDescriptorProto) + if err != nil { + return nil, err + } + if opts != nil { + return opts, nil + } + opts, ok := reg.GetOpenAPIFileOption(*file.Name) + if !ok { + return nil, nil + } + return opts, nil +} + +func getFieldOpenAPIOption(reg *descriptor.Registry, fd *descriptor.Field) (*openapi_options.JSONSchema, error) { + opts, err := extractJSONSchemaFromFieldDescriptor(fd.FieldDescriptorProto) + if err != nil { + return nil, err + } + if opts != nil { + return opts, nil + } + opts, ok := reg.GetOpenAPIFieldOption(fd.FQFN()) + if !ok { + return nil, nil + } + return opts, nil +} + +func getFieldBehaviorOption(reg *descriptor.Registry, fd *descriptor.Field) ([]annotations.FieldBehavior, error) { + opts, err := extractFieldBehaviorFromFieldDescriptor(fd.FieldDescriptorProto) + if err != nil { + return nil, err + } + if opts != nil { + return opts, nil + } + return opts, nil +} + +func protoJSONSchemaToOpenAPISchemaCore(j *openapi_options.JSONSchema, reg *descriptor.Registry, refs refMap) schemaCore { + ret := schemaCore{} + + if j.GetRef() != "" { + openapiName, ok := fullyQualifiedNameToOpenAPIName(j.GetRef(), reg) + if ok { + ret.Ref = "#/definitions/" + openapiName + if refs != nil { + refs[j.GetRef()] = struct{}{} + } + } else { + ret.Ref += j.GetRef() + } + } else { + f, t := protoJSONSchemaTypeToFormat(j.GetType()) + ret.Format = f + ret.Type = t + } + + return ret +} + +func updateswaggerObjectFromJSONSchema(s *openapiSchemaObject, j *openapi_options.JSONSchema, reg *descriptor.Registry, data interface{}) { + s.Title = j.GetTitle() + s.Description = j.GetDescription() + if reg.GetUseGoTemplate() { + s.Title = goTemplateComments(s.Title, data, reg) + s.Description = goTemplateComments(s.Description, data, reg) + } + + s.ReadOnly = j.GetReadOnly() + s.MultipleOf = j.GetMultipleOf() + s.Maximum = j.GetMaximum() + s.ExclusiveMaximum = j.GetExclusiveMaximum() + s.Minimum = j.GetMinimum() + s.ExclusiveMinimum = j.GetExclusiveMinimum() + s.MaxLength = j.GetMaxLength() + s.MinLength = j.GetMinLength() + s.Pattern = j.GetPattern() + s.Default = j.GetDefault() + s.MaxItems = j.GetMaxItems() + s.MinItems = j.GetMinItems() + s.UniqueItems = j.GetUniqueItems() + s.MaxProperties = j.GetMaxProperties() + s.MinProperties = j.GetMinProperties() + s.Required = j.GetRequired() + s.Enum = j.GetEnum() + if overrideType := j.GetType(); len(overrideType) > 0 { + s.Type = strings.ToLower(overrideType[0].String()) + } + if j != nil && j.GetExample() != "" { + s.Example = json.RawMessage(j.GetExample()) + } + if j != nil && j.GetFormat() != "" { + s.Format = j.GetFormat() + } +} + +func updateSwaggerObjectFromFieldBehavior(s *openapiSchemaObject, j []annotations.FieldBehavior, field *descriptor.Field) { + for _, fb := range j { + switch fb { + case annotations.FieldBehavior_REQUIRED: + s.Required = append(s.Required, *field.Name) + case annotations.FieldBehavior_OUTPUT_ONLY: + s.ReadOnly = true + case annotations.FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED: + case annotations.FieldBehavior_OPTIONAL: + case annotations.FieldBehavior_INPUT_ONLY: + // OpenAPI v3 supports a writeOnly property, but this is not supported in Open API v2 + case annotations.FieldBehavior_IMMUTABLE: + } + } +} + +func openapiSchemaFromProtoSchema(s *openapi_options.Schema, reg *descriptor.Registry, refs refMap, data interface{}) openapiSchemaObject { + ret := openapiSchemaObject{ + ExternalDocs: protoExternalDocumentationToOpenAPIExternalDocumentation(s.GetExternalDocs(), reg, data), + } + + ret.schemaCore = protoJSONSchemaToOpenAPISchemaCore(s.GetJsonSchema(), reg, refs) + updateswaggerObjectFromJSONSchema(&ret, s.GetJsonSchema(), reg, data) + + if s != nil && s.Example != "" { + ret.Example = json.RawMessage(s.Example) + } + + return ret +} + +func openapiExamplesFromProtoExamples(in map[string]string) map[string]interface{} { + if len(in) == 0 { + return nil + } + out := make(map[string]interface{}) + for mimeType, exampleStr := range in { + switch mimeType { + case "application/json": + // JSON example objects are rendered raw. + out[mimeType] = json.RawMessage(exampleStr) + default: + // All other mimetype examples are rendered as strings. + out[mimeType] = exampleStr + } + } + return out +} + +func protoJSONSchemaTypeToFormat(in []openapi_options.JSONSchema_JSONSchemaSimpleTypes) (string, string) { + if len(in) == 0 { + return "", "" + } + + // Can't support more than 1 type, just return the first element. + // This is due to an inconsistency in the design of the openapiv2 proto + // and that used in schemaCore. schemaCore uses the v3 definition of types, + // which only allows a single string, while the openapiv2 proto uses the OpenAPI v2 + // definition, which defers to the JSON schema definition, which allows a string or an array. + // Sources: + // https://swagger.io/specification/#itemsObject + // https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.2 + switch in[0] { + case openapi_options.JSONSchema_UNKNOWN, openapi_options.JSONSchema_NULL: + return "", "" + case openapi_options.JSONSchema_OBJECT: + return "object", "" + case openapi_options.JSONSchema_ARRAY: + return "array", "" + case openapi_options.JSONSchema_BOOLEAN: + // NOTE: in OpenAPI specification, format should be empty on boolean type + return "boolean", "" + case openapi_options.JSONSchema_INTEGER: + return "integer", "int32" + case openapi_options.JSONSchema_NUMBER: + return "number", "double" + case openapi_options.JSONSchema_STRING: + // NOTE: in OpenAPI specification, format should be empty on string type + return "string", "" + default: + // Maybe panic? + return "", "" + } +} + +func protoExternalDocumentationToOpenAPIExternalDocumentation(in *openapi_options.ExternalDocumentation, reg *descriptor.Registry, data interface{}) *openapiExternalDocumentationObject { + if in == nil { + return nil + } + + if reg.GetUseGoTemplate() { + in.Description = goTemplateComments(in.Description, data, reg) + } + + return &openapiExternalDocumentationObject{ + Description: in.Description, + URL: in.Url, + } +} + +func addCustomRefs(d openapiDefinitionsObject, reg *descriptor.Registry, refs refMap) { + if len(refs) == 0 { + return + } + msgMap := make(messageMap) + enumMap := make(enumMap) + for ref := range refs { + swgName, swgOk := fullyQualifiedNameToOpenAPIName(ref, reg) + if !swgOk { + glog.Errorf("can't resolve OpenAPI name from CustomRef '%v'", ref) + continue + } + if _, ok := d[swgName]; ok { + // Skip already existing definitions + delete(refs, ref) + continue + } + msg, err := reg.LookupMsg("", ref) + if err == nil { + msgMap[swgName] = msg + continue + } + enum, err := reg.LookupEnum("", ref) + if err == nil { + enumMap[swgName] = enum + continue + } + + // ?? Should be either enum or msg + } + renderMessagesAsDefinition(msgMap, d, reg, refs) + renderEnumerationsAsDefinition(enumMap, d, reg) + + // Run again in case any new refs were added + addCustomRefs(d, reg, refs) +} + +func lowerCamelCase(fieldName string, fields []*descriptor.Field, msgs []*descriptor.Message) string { + for _, oneField := range fields { + if oneField.GetName() == fieldName { + return oneField.GetJsonName() + } + } + messageNameToFieldsToJSONName := make(map[string]map[string]string) + fieldNameToType := make(map[string]string) + for _, msg := range msgs { + fieldNameToJSONName := make(map[string]string) + for _, oneField := range msg.GetField() { + fieldNameToJSONName[oneField.GetName()] = oneField.GetJsonName() + fieldNameToType[oneField.GetName()] = oneField.GetTypeName() + } + messageNameToFieldsToJSONName[msg.GetName()] = fieldNameToJSONName + } + if strings.Contains(fieldName, ".") { + fieldNames := strings.Split(fieldName, ".") + fieldNamesWithCamelCase := make([]string, 0) + for i := 0; i < len(fieldNames)-1; i++ { + fieldNamesWithCamelCase = append(fieldNamesWithCamelCase, doCamelCase(string(fieldNames[i]))) + } + prefix := strings.Join(fieldNamesWithCamelCase, ".") + reservedJSONName := getReservedJSONName(fieldName, messageNameToFieldsToJSONName, fieldNameToType) + if reservedJSONName != "" { + return prefix + "." + reservedJSONName + } + } + return doCamelCase(fieldName) +} + +func doCamelCase(input string) string { + parameterString := casing.Camel(input) + builder := &strings.Builder{} + builder.WriteString(strings.ToLower(string(parameterString[0]))) + builder.WriteString(parameterString[1:]) + return builder.String() +} + +func getReservedJSONName(fieldName string, messageNameToFieldsToJSONName map[string]map[string]string, fieldNameToType map[string]string) string { + if len(strings.Split(fieldName, ".")) == 2 { + fieldNames := strings.Split(fieldName, ".") + firstVariable := fieldNames[0] + firstType := fieldNameToType[firstVariable] + firstTypeShortNames := strings.Split(firstType, ".") + firstTypeShortName := firstTypeShortNames[len(firstTypeShortNames)-1] + return messageNameToFieldsToJSONName[firstTypeShortName][fieldNames[1]] + } + fieldNames := strings.Split(fieldName, ".") + return getReservedJSONName(strings.Join(fieldNames[1:], "."), messageNameToFieldsToJSONName, fieldNameToType) +} + +func find(a []string, x string) int { + // This is a linear search but we are dealing with a small number of fields + for i, n := range a { + if x == n { + return i + } + } + return -1 +} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go new file mode 100644 index 00000000..2188e739 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go @@ -0,0 +1,4552 @@ +package genopenapi + +import ( + "encoding/json" + "errors" + "fmt" + "math" + "reflect" + "strings" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" + openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/genproto/googleapis/api/annotations" + "google.golang.org/genproto/protobuf/field_mask" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/timestamppb" + "google.golang.org/protobuf/types/known/wrapperspb" + "google.golang.org/protobuf/types/pluginpb" +) + +var marshaler = &runtime.JSONPb{} + +func crossLinkFixture(f *descriptor.File) *descriptor.File { + for _, m := range f.Messages { + m.File = f + } + for _, svc := range f.Services { + svc.File = f + for _, m := range svc.Methods { + m.Service = svc + for _, b := range m.Bindings { + b.Method = m + for _, param := range b.PathParams { + param.Method = m + } + } + } + } + return f +} + +func reqFromFile(f *descriptor.File) *pluginpb.CodeGeneratorRequest { + return &pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{ + f.FileDescriptorProto, + }, + FileToGenerate: []string{f.GetName()}, + } +} + +func TestMessageToQueryParametersWithEnumAsInt(t *testing.T) { + type test struct { + MsgDescs []*descriptorpb.DescriptorProto + Message string + Params []openapiParameterObject + } + + tests := []test{ + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("a"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("b"), + Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(), + Number: proto.Int32(2), + }, + { + Name: proto.String("c"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Number: proto.Int32(3), + }, + }, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "a", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "b", + In: "query", + Required: false, + Type: "number", + Format: "double", + }, + { + Name: "c", + In: "query", + Required: false, + Type: "array", + CollectionFormat: "multi", + }, + }, + }, + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Nested"), + Number: proto.Int32(1), + }, + }, + }, + { + Name: proto.String("Nested"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("a"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("deep"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Nested.DeepNested"), + Number: proto.Int32(2), + }, + }, + NestedType: []*descriptorpb.DescriptorProto{{ + Name: proto.String("DeepNested"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("b"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("c"), + Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), + TypeName: proto.String(".example.Nested.DeepNested.DeepEnum"), + Number: proto.Int32(2), + }, + }, + EnumType: []*descriptorpb.EnumDescriptorProto{ + { + Name: proto.String("DeepEnum"), + Value: []*descriptorpb.EnumValueDescriptorProto{ + {Name: proto.String("FALSE"), Number: proto.Int32(0)}, + {Name: proto.String("TRUE"), Number: proto.Int32(1)}, + }, + }, + }, + }}, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "nested.a", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "nested.deep.b", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "nested.deep.c", + In: "query", + Required: false, + Type: "integer", + Enum: []string{"0", "1"}, + Default: "0", + }, + }, + }, + } + + for _, test := range tests { + reg := descriptor.NewRegistry() + reg.SetEnumsAsInts(true) + msgs := []*descriptor.Message{} + for _, msgdesc := range test.MsgDescs { + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.MsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + message, err := reg.LookupMsg("", ".example."+test.Message) + if err != nil { + t.Fatalf("failed to lookup message: %s", err) + } + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) + if err != nil { + t.Fatalf("failed to convert message to query parameters: %s", err) + } + // avoid checking Items for array types + for i := range params { + params[i].Items = nil + } + if !reflect.DeepEqual(params, test.Params) { + t.Errorf("expected %v, got %v", test.Params, params) + } + } +} + +func TestMessageToQueryParameters(t *testing.T) { + type test struct { + MsgDescs []*descriptorpb.DescriptorProto + Message string + Params []openapiParameterObject + } + + tests := []test{ + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("a"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("b"), + Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(), + Number: proto.Int32(2), + }, + { + Name: proto.String("c"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Number: proto.Int32(3), + }, + }, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "a", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "b", + In: "query", + Required: false, + Type: "number", + Format: "double", + }, + { + Name: "c", + In: "query", + Required: false, + Type: "array", + CollectionFormat: "multi", + }, + }, + }, + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Nested"), + Number: proto.Int32(1), + }, + }, + }, + { + Name: proto.String("Nested"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("a"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("deep"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Nested.DeepNested"), + Number: proto.Int32(2), + }, + }, + NestedType: []*descriptorpb.DescriptorProto{{ + Name: proto.String("DeepNested"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("b"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("c"), + Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), + TypeName: proto.String(".example.Nested.DeepNested.DeepEnum"), + Number: proto.Int32(2), + }, + }, + EnumType: []*descriptorpb.EnumDescriptorProto{ + { + Name: proto.String("DeepEnum"), + Value: []*descriptorpb.EnumValueDescriptorProto{ + {Name: proto.String("FALSE"), Number: proto.Int32(0)}, + {Name: proto.String("TRUE"), Number: proto.Int32(1)}, + }, + }, + }, + }}, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "nested.a", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "nested.deep.b", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "nested.deep.c", + In: "query", + Required: false, + Type: "string", + Enum: []string{"FALSE", "TRUE"}, + Default: "FALSE", + }, + }, + }, + } + + for _, test := range tests { + reg := descriptor.NewRegistry() + msgs := []*descriptor.Message{} + for _, msgdesc := range test.MsgDescs { + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.MsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + message, err := reg.LookupMsg("", ".example."+test.Message) + if err != nil { + t.Fatalf("failed to lookup message: %s", err) + } + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) + if err != nil { + t.Fatalf("failed to convert message to query parameters: %s", err) + } + // avoid checking Items for array types + for i := range params { + params[i].Items = nil + } + if !reflect.DeepEqual(params, test.Params) { + t.Errorf("expected %v, got %v", test.Params, params) + } + } +} + +// TestMessagetoQueryParametersNoRecursive, is a check that cyclical references between messages +// are not falsely detected given previous known edge-cases. +func TestMessageToQueryParametersNoRecursive(t *testing.T) { + type test struct { + MsgDescs []*descriptorpb.DescriptorProto + Message string + } + + tests := []test{ + // First test: + // Here is a message that has two of another message adjacent to one another in a nested message. + // There is no loop but this was previouly falsely flagged as a cycle. + // Example proto: + // message NonRecursiveMessage { + // string field = 1; + // } + // message BaseMessage { + // NonRecursiveMessage first = 1; + // NonRecursiveMessage second = 2; + // } + // message QueryMessage { + // BaseMessage first = 1; + // string second = 2; + // } + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("QueryMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("first"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.BaseMessage"), + Number: proto.Int32(1), + }, + { + Name: proto.String("second"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(2), + }, + }, + }, + { + Name: proto.String("BaseMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("first"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.NonRecursiveMessage"), + Number: proto.Int32(1), + }, + { + Name: proto.String("second"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.NonRecursiveMessage"), + Number: proto.Int32(2), + }, + }, + }, + // Note there is no recursive nature to this message + { + Name: proto.String("NonRecursiveMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("field"), + //Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + }, + }, + }, + Message: "QueryMessage", + }, + } + + for _, test := range tests { + reg := descriptor.NewRegistry() + msgs := []*descriptor.Message{} + for _, msgdesc := range test.MsgDescs { + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.MsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + message, err := reg.LookupMsg("", ".example."+test.Message) + if err != nil { + t.Fatalf("failed to lookup message: %s", err) + } + + _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) + if err != nil { + t.Fatalf("No recursion error should be thrown: %s", err) + } + } +} + +// TestMessagetoQueryParametersRecursive, is a check that cyclical references between messages +// are handled gracefully. The goal is to insure that attempts to add messages with cyclical +// references to query-parameters returns an error message. +func TestMessageToQueryParametersRecursive(t *testing.T) { + type test struct { + MsgDescs []*descriptorpb.DescriptorProto + Message string + } + + tests := []test{ + // First test: + // Here we test that a message that references it self through a field will return an error. + // Example proto: + // message DirectRecursiveMessage { + // DirectRecursiveMessage nested = 1; + // } + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("DirectRecursiveMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.DirectRecursiveMessage"), + Number: proto.Int32(1), + }, + }, + }, + }, + Message: "DirectRecursiveMessage", + }, + // Second test: + // Here we test that a cycle through multiple messages is detected and that an error is returned. + // Sample: + // message Root { NodeMessage nested = 1; } + // message NodeMessage { CycleMessage nested = 1; } + // message CycleMessage { Root nested = 1; } + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("RootMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.NodeMessage"), + Number: proto.Int32(1), + }, + }, + }, + { + Name: proto.String("NodeMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.CycleMessage"), + Number: proto.Int32(1), + }, + }, + }, + { + Name: proto.String("CycleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.RootMessage"), + Number: proto.Int32(1), + }, + }, + }, + }, + Message: "RootMessage", + }, + } + + for _, test := range tests { + reg := descriptor.NewRegistry() + msgs := []*descriptor.Message{} + for _, msgdesc := range test.MsgDescs { + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.MsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + message, err := reg.LookupMsg("", ".example."+test.Message) + if err != nil { + t.Fatalf("failed to lookup message: %s", err) + } + _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) + if err == nil { + t.Fatalf("It should not be allowed to have recursive query parameters") + } + } +} + +func TestMessageToQueryParametersWithJsonName(t *testing.T) { + type test struct { + MsgDescs []*descriptorpb.DescriptorProto + Message string + Params []openapiParameterObject + } + + tests := []test{ + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("test_field_a"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + JsonName: proto.String("testFieldA"), + }, + }, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "testFieldA", + In: "query", + Required: false, + Type: "string", + }, + }, + }, + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("SubMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("test_field_a"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + JsonName: proto.String("testFieldA"), + }, + }, + }, + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("sub_message"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.SubMessage"), + Number: proto.Int32(1), + JsonName: proto.String("subMessage"), + }, + }, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "subMessage.testFieldA", + In: "query", + Required: false, + Type: "string", + }, + }, + }, + } + + for _, test := range tests { + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(true) + msgs := []*descriptor.Message{} + for _, msgdesc := range test.MsgDescs { + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.MsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + message, err := reg.LookupMsg("", ".example."+test.Message) + if err != nil { + t.Fatalf("failed to lookup message: %s", err) + } + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) + if err != nil { + t.Fatalf("failed to convert message to query parameters: %s", err) + } + if !reflect.DeepEqual(params, test.Params) { + t.Errorf("expected %v, got %v", test.Params, params) + } + } +} + +func TestMessageToQueryParametersWellKnownTypes(t *testing.T) { + type test struct { + MsgDescs []*descriptorpb.DescriptorProto + WellKnownMsgDescs []*descriptorpb.DescriptorProto + Message string + Params []openapiParameterObject + } + + tests := []test{ + { + MsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("a_field_mask"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".google.protobuf.FieldMask"), + Number: proto.Int32(1), + }, + { + Name: proto.String("a_timestamp"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".google.protobuf.Timestamp"), + Number: proto.Int32(2), + }, + }, + }, + }, + WellKnownMsgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("FieldMask"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("paths"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Number: proto.Int32(1), + }, + }, + }, + { + Name: proto.String("Timestamp"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("seconds"), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("nanos"), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + Number: proto.Int32(2), + }, + }, + }, + }, + Message: "ExampleMessage", + Params: []openapiParameterObject{ + { + Name: "a_field_mask", + In: "query", + Required: false, + Type: "string", + }, + { + Name: "a_timestamp", + In: "query", + Required: false, + Type: "string", + Format: "date-time", + }, + }, + }, + } + + for _, test := range tests { + reg := descriptor.NewRegistry() + reg.SetEnumsAsInts(true) + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{ + { + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("google/well_known.proto"), + Package: proto.String("google.protobuf"), + Dependency: []string{}, + MessageType: test.WellKnownMsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String("google/well_known"), + }, + }, + { + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("acme/example.proto"), + Package: proto.String("example"), + Dependency: []string{"google/well_known.proto"}, + MessageType: test.MsgDescs, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String("acme/example"), + }, + }, + }, + }) + if err != nil { + t.Fatalf("failed to load CodeGeneratorRequest: %v", err) + } + + message, err := reg.LookupMsg("", ".example."+test.Message) + if err != nil { + t.Fatalf("failed to lookup message: %s", err) + } + params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) + if err != nil { + t.Fatalf("failed to convert message to query parameters: %s", err) + } + if !reflect.DeepEqual(params, test.Params) { + t.Errorf("expected %v, got %v", test.Params, params) + } + } +} + +func TestApplyTemplateSimple(t *testing.T) { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Example"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + Body: &descriptor.Body{FieldPath: nil}, + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", // TODO(achew22): Figure out what this should really be + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + fileCL := crossLinkFixture(&file) + err := reg.Load(reqFromFile(fileCL)) + if err != nil { + t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) + return + } + result, err := applyTemplate(param{File: fileCL, reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + if want, is, name := "2.0", result.Swagger, "Swagger"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + if want, is, name := "", result.BasePath, "BasePath"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + if want, is, name := ([]string)(nil), result.Schemes, "Schemes"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + if want, is, name := []string{"application/json"}, result.Consumes, "Consumes"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + if want, is, name := []string{"application/json"}, result.Produces, "Produces"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + +func TestApplyTemplateMultiService(t *testing.T) { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Example"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + } + + // Create two services that have the same method name. We will test that the + // operation IDs are different + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + svc2 := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("OtherService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + Body: &descriptor.Body{FieldPath: nil}, + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", + }, + }, + }, + }, + }, + }, + { + ServiceDescriptorProto: svc2, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + Body: &descriptor.Body{FieldPath: nil}, + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/ping", + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + fileCL := crossLinkFixture(&file) + err := reg.Load(reqFromFile(fileCL)) + if err != nil { + t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) + return + } + result, err := applyTemplate(param{File: fileCL, reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + + // Check that the two services have unique operation IDs even though they + // have the same method name. + if want, is := "ExampleService_Example", result.Paths["/v1/echo"].Get.OperationID; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", file, is, want) + } + if want, is := "OtherService_Example", result.Paths["/v1/ping"].Get.OperationID; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", file, is, want) + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + +func TestApplyTemplateOverrideOperationID(t *testing.T) { + newFile := func() *descriptor.File { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Example"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + Options: &descriptorpb.MethodOptions{}, + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + return &descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + Body: &descriptor.Body{FieldPath: nil}, + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", // TODO(achew22): Figure out what this should really be + }, + }, + }, + }, + }, + }, + }, + } + } + + verifyTemplateFromReq := func(t *testing.T, reg *descriptor.Registry, file *descriptor.File, opts *openapiconfig.OpenAPIOptions) { + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + fileCL := crossLinkFixture(file) + err := reg.Load(reqFromFile(fileCL)) + if err != nil { + t.Errorf("reg.Load(%#v) failed with %v; want success", *file, err) + return + } + if opts != nil { + if err := reg.RegisterOpenAPIOptions(opts); err != nil { + t.Fatalf("failed to register OpenAPI options: %s", err) + } + } + result, err := applyTemplate(param{File: fileCL, reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", *file, err) + return + } + if want, is := "MyExample", result.Paths["/v1/echo"].Get.OperationID; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", *file, is, want) + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", *file) + t.Errorf("got: %s", fmt.Sprint(result)) + } + } + + openapiOperation := openapi_options.Operation{ + OperationId: "MyExample", + } + + t.Run("verify override via method option", func(t *testing.T) { + file := newFile() + proto.SetExtension(proto.Message(file.Services[0].Methods[0].MethodDescriptorProto.Options), + openapi_options.E_Openapiv2Operation, &openapiOperation) + + reg := descriptor.NewRegistry() + verifyTemplateFromReq(t, reg, file, nil) + }) + + t.Run("verify override options annotations", func(t *testing.T) { + file := newFile() + reg := descriptor.NewRegistry() + opts := &openapiconfig.OpenAPIOptions{ + Method: []*openapiconfig.OpenAPIMethodOption{ + { + Method: "example.ExampleService.Example", + Option: &openapiOperation, + }, + }, + } + verifyTemplateFromReq(t, reg, file, opts) + }) +} + +func TestApplyTemplateExtensions(t *testing.T) { + newFile := func() *descriptor.File { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Example"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + Options: &descriptorpb.MethodOptions{}, + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + return &descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + Body: &descriptor.Body{FieldPath: nil}, + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", // TODO(achew22): Figure out what this should really be + }, + }, + }, + }, + }, + }, + }, + } + } + swagger := openapi_options.Swagger{ + Info: &openapi_options.Info{ + Title: "test", + Extensions: map[string]*structpb.Value{ + "x-info-extension": {Kind: &structpb.Value_StringValue{StringValue: "bar"}}, + }, + }, + Extensions: map[string]*structpb.Value{ + "x-foo": {Kind: &structpb.Value_StringValue{StringValue: "bar"}}, + "x-bar": {Kind: &structpb.Value_ListValue{ListValue: &structpb.ListValue{ + Values: []*structpb.Value{{Kind: &structpb.Value_StringValue{StringValue: "baz"}}}, + }}}, + }, + SecurityDefinitions: &openapi_options.SecurityDefinitions{ + Security: map[string]*openapi_options.SecurityScheme{ + "somescheme": { + Extensions: map[string]*structpb.Value{ + "x-security-baz": {Kind: &structpb.Value_BoolValue{BoolValue: true}}, + }, + }, + }, + }, + } + openapiOperation := openapi_options.Operation{ + Responses: map[string]*openapi_options.Response{ + "200": { + Extensions: map[string]*structpb.Value{ + "x-resp-id": {Kind: &structpb.Value_StringValue{StringValue: "resp1000"}}, + }, + }, + }, + Extensions: map[string]*structpb.Value{ + "x-op-foo": {Kind: &structpb.Value_StringValue{StringValue: "baz"}}, + }, + } + verifyTemplateExtensions := func(t *testing.T, reg *descriptor.Registry, file *descriptor.File, + opts *openapiconfig.OpenAPIOptions) { + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + fileCL := crossLinkFixture(file) + err := reg.Load(reqFromFile(fileCL)) + if err != nil { + t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) + return + } + if opts != nil { + if err := reg.RegisterOpenAPIOptions(opts); err != nil { + t.Fatalf("failed to register OpenAPI annotations: %s", err) + } + } + result, err := applyTemplate(param{File: fileCL, reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + if want, is, name := "2.0", result.Swagger, "Swagger"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + if got, want := len(result.extensions), 2; got != want { + t.Fatalf("len(applyTemplate(%#v).Extensions) = %d want to be %d", file, got, want) + } + if got, want := result.extensions[0].key, "x-bar"; got != want { + t.Errorf("applyTemplate(%#v).Extensions[0].key = %s want to be %s", file, got, want) + } + if got, want := result.extensions[1].key, "x-foo"; got != want { + t.Errorf("applyTemplate(%#v).Extensions[1].key = %s want to be %s", file, got, want) + } + { + var got []string + err = marshaler.Unmarshal(result.extensions[0].value, &got) + if err != nil { + t.Fatalf("marshaler.Unmarshal failed: %v", err) + } + want := []string{"baz"} + if diff := cmp.Diff(got, want); diff != "" { + t.Errorf(diff) + } + } + { + var got string + err = marshaler.Unmarshal(result.extensions[1].value, &got) + if err != nil { + t.Fatalf("marshaler.Unmarshal failed: %v", err) + } + want := "bar" + if diff := cmp.Diff(got, want); diff != "" { + t.Errorf(diff) + } + } + + var scheme openapiSecuritySchemeObject + for _, v := range result.SecurityDefinitions { + scheme = v + } + if want, is, name := []extension{ + {key: "x-security-baz", value: json.RawMessage("true")}, + }, scheme.extensions, "SecurityScheme.Extensions"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + + if want, is, name := []extension{ + {key: "x-info-extension", value: json.RawMessage("\"bar\"")}, + }, result.Info.extensions, "Info.Extensions"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + + var operation *openapiOperationObject + var response openapiResponseObject + for _, v := range result.Paths { + operation = v.Get + response = v.Get.Responses["200"] + } + if want, is, name := []extension{ + {key: "x-op-foo", value: json.RawMessage("\"baz\"")}, + }, operation.extensions, "operation.Extensions"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + if want, is, name := []extension{ + {key: "x-resp-id", value: json.RawMessage("\"resp1000\"")}, + }, response.extensions, "response.Extensions"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + } + t.Run("verify template options set via proto options", func(t *testing.T) { + file := newFile() + proto.SetExtension(proto.Message(file.FileDescriptorProto.Options), openapi_options.E_Openapiv2Swagger, &swagger) + proto.SetExtension(proto.Message(file.Services[0].Methods[0].Options), openapi_options.E_Openapiv2Operation, &openapiOperation) + reg := descriptor.NewRegistry() + verifyTemplateExtensions(t, reg, file, nil) + }) + t.Run("verify template options set via annotations", func(t *testing.T) { + file := newFile() + opts := &openapiconfig.OpenAPIOptions{ + File: []*openapiconfig.OpenAPIFileOption{ + { + File: "example.proto", + Option: &swagger, + }, + }, + Method: []*openapiconfig.OpenAPIMethodOption{ + { + Method: "example.ExampleService.Example", + Option: &openapiOperation, + }, + }, + } + reg := descriptor.NewRegistry() + verifyTemplateExtensions(t, reg, file, opts) + }) +} + +func TestApplyTemplateHeaders(t *testing.T) { + newFile := func() *descriptor.File { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Example"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + Options: &descriptorpb.MethodOptions{}, + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + return &descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + Body: &descriptor.Body{FieldPath: nil}, + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", // TODO(achew22): Figure out what this should really be + }, + }, + }, + }, + }, + }, + }, + } + } + openapiOperation := openapi_options.Operation{ + Responses: map[string]*openapi_options.Response{ + "200": &openapi_options.Response{ + Description: "Testing Headers", + Headers: map[string]*openapi_options.Header{ + "string": { + Description: "string header description", + Type: "string", + Format: "uuid", + Pattern: "", + }, + "boolean": { + Description: "boolean header description", + Type: "boolean", + Default: "true", + Pattern: "^true|false$", + }, + "integer": { + Description: "integer header description", + Type: "integer", + Default: "0", + Pattern: "^[0-9]$", + }, + "number": { + Description: "number header description", + Type: "number", + Default: "1.2", + Pattern: "^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$", + }, + }, + }, + }, + } + verifyTemplateHeaders := func(t *testing.T, reg *descriptor.Registry, file *descriptor.File, + opts *openapiconfig.OpenAPIOptions) { + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + fileCL := crossLinkFixture(file) + err := reg.Load(reqFromFile(fileCL)) + if err != nil { + t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) + return + } + if opts != nil { + if err := reg.RegisterOpenAPIOptions(opts); err != nil { + t.Fatalf("failed to register OpenAPI annotations: %s", err) + } + } + result, err := applyTemplate(param{File: fileCL, reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + if want, is, name := "2.0", result.Swagger, "Swagger"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + + var response openapiResponseObject + for _, v := range result.Paths { + response = v.Get.Responses["200"] + } + if want, is, name := []openapiHeadersObject{ + { + "String": openapiHeaderObject{ + Description: "string header description", + Type: "string", + Format: "uuid", + Pattern: "", + }, + "Boolean": openapiHeaderObject{ + Description: "boolean header description", + Type: "boolean", + Default: json.RawMessage("true"), + Pattern: "^true|false$", + }, + "Integer": openapiHeaderObject{ + Description: "integer header description", + Type: "integer", + Default: json.RawMessage("0"), + Pattern: "^[0-9]$", + }, + "Number": openapiHeaderObject{ + Description: "number header description", + Type: "number", + Default: json.RawMessage("1.2"), + Pattern: "^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$", + }, + }, + }[0], response.Headers, "response.Headers"; !reflect.DeepEqual(is, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) + } + + } + t.Run("verify template options set via proto options", func(t *testing.T) { + file := newFile() + proto.SetExtension(proto.Message(file.Services[0].Methods[0].Options), openapi_options.E_Openapiv2Operation, &openapiOperation) + reg := descriptor.NewRegistry() + verifyTemplateHeaders(t, reg, file, nil) + }) +} + +func TestValidateHeaderType(t *testing.T) { + type test struct { + Type string + Format string + expectedError error + } + tests := []test{ + { + "string", + "date-time", + nil, + }, + { + "boolean", + "", + nil, + }, + { + "integer", + "uint", + nil, + }, + { + "integer", + "uint8", + nil, + }, + { + "integer", + "uint16", + nil, + }, + { + "integer", + "uint32", + nil, + }, + { + "integer", + "uint64", + nil, + }, + { + "integer", + "int", + nil, + }, + { + "integer", + "int8", + nil, + }, + { + "integer", + "int16", + nil, + }, + { + "integer", + "int32", + nil, + }, + { + "integer", + "int64", + nil, + }, + { + "integer", + "float64", + errors.New("the provided format \"float64\" is not a valid extension of the type \"integer\""), + }, + { + "integer", + "uuid", + errors.New("the provided format \"uuid\" is not a valid extension of the type \"integer\""), + }, + { + "number", + "uint", + nil, + }, + { + "number", + "uint8", + nil, + }, + { + "number", + "uint16", + nil, + }, + { + "number", + "uint32", + nil, + }, + { + "number", + "uint64", + nil, + }, + { + "number", + "int", + nil, + }, + { + "number", + "int8", + nil, + }, + { + "number", + "int16", + nil, + }, + { + "number", + "int32", + nil, + }, + { + "number", + "int64", + nil, + }, + { + "number", + "float", + nil, + }, + { + "number", + "float32", + nil, + }, + { + "number", + "float64", + nil, + }, + { + "number", + "complex64", + nil, + }, + { + "number", + "complex128", + nil, + }, + { + "number", + "double", + nil, + }, + { + "number", + "byte", + nil, + }, + { + "number", + "rune", + nil, + }, + { + "number", + "uintptr", + nil, + }, + { + "number", + "date", + errors.New("the provided format \"date\" is not a valid extension of the type \"number\""), + }, + { + "array", + "", + errors.New("the provided header type \"array\" is not supported"), + }, + { + "foo", + "", + errors.New("the provided header type \"foo\" is not supported"), + }, + } + for _, v := range tests { + err := validateHeaderTypeAndFormat(v.Type, v.Format) + + if v.expectedError == nil { + if err != nil { + t.Errorf("unexpected error %v", err) + } + } else { + if err == nil { + t.Fatal("expected header error not returned") + } + if err.Error() != v.expectedError.Error() { + t.Errorf("expected error malformed, expected %q, got %q", v.expectedError.Error(), err.Error()) + } + } + } + +} + +func TestValidateDefaultValueType(t *testing.T) { + type test struct { + Type string + Value string + Format string + expectedError error + } + tests := []test{ + { + "string", + `"string"`, + "", + nil, + }, + { + "string", + "\"2012-11-01T22:08:41+00:00\"", + "date-time", + nil, + }, + { + "string", + "\"2012-11-01\"", + "date", + nil, + }, + { + "string", + "0", + "", + errors.New("the provided default value \"0\" does not match provider type \"string\", or is not properly quoted with escaped quotations"), + }, + { + "string", + "false", + "", + errors.New("the provided default value \"false\" does not match provider type \"string\", or is not properly quoted with escaped quotations"), + }, + { + "boolean", + "true", + "", + nil, + }, + { + "boolean", + "0", + "", + errors.New("the provided default value \"0\" does not match provider type \"boolean\""), + }, + { + "boolean", + `"string"`, + "", + errors.New("the provided default value \"\\\"string\\\"\" does not match provider type \"boolean\""), + }, + { + "number", + "1.2", + "", + nil, + }, + { + "number", + "123", + "", + nil, + }, + { + "number", + "nan", + "", + errors.New("the provided number \"nan\" is not a valid JSON number"), + }, + { + "number", + "NaN", + "", + errors.New("the provided number \"NaN\" is not a valid JSON number"), + }, + { + "number", + "-459.67", + "", + nil, + }, + { + "number", + "inf", + "", + errors.New("the provided number \"inf\" is not a valid JSON number"), + }, + { + "number", + "infinity", + "", + errors.New("the provided number \"infinity\" is not a valid JSON number"), + }, + { + "number", + "Inf", + "", + errors.New("the provided number \"Inf\" is not a valid JSON number"), + }, + { + "number", + "Infinity", + "", + errors.New("the provided number \"Infinity\" is not a valid JSON number"), + }, + { + "number", + "false", + "", + errors.New("the provided default value \"false\" does not match provider type \"number\""), + }, + { + "number", + `"string"`, + "", + errors.New("the provided default value \"\\\"string\\\"\" does not match provider type \"number\""), + }, + { + "integer", + "2", + "", + nil, + }, + { + "integer", + fmt.Sprint(math.MaxInt32), + "int32", + nil, + }, + { + "integer", + fmt.Sprint(math.MaxInt32 + 1), + "int32", + errors.New("the provided default value \"2147483648\" does not match provided format \"int32\""), + }, + { + "integer", + fmt.Sprint(math.MaxInt64), + "int64", + nil, + }, + { + "integer", + "9223372036854775808", + "int64", + errors.New("the provided default value \"9223372036854775808\" does not match provided format \"int64\""), + }, + { + "integer", + "18446744073709551615", + "uint64", + nil, + }, + { + "integer", + "false", + "", + errors.New("the provided default value \"false\" does not match provided type \"integer\""), + }, + { + "integer", + "1.2", + "", + errors.New("the provided default value \"1.2\" does not match provided type \"integer\""), + }, + { + "integer", + `"string"`, + "", + errors.New("the provided default value \"\\\"string\\\"\" does not match provided type \"integer\""), + }, + } + for _, v := range tests { + err := validateDefaultValueTypeAndFormat(v.Type, v.Value, v.Format) + + if v.expectedError == nil { + if err != nil { + t.Errorf("unexpected error '%v'", err) + } + } else { + if err == nil { + t.Error("expected update error not returned") + } + if err.Error() != v.expectedError.Error() { + t.Errorf("expected error malformed, expected %q, got %q", v.expectedError.Error(), err.Error()) + } + } + } + +} + +func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String("NestedMessage"), + Number: proto.Int32(1), + }, + }, + } + nesteddesc := &descriptorpb.DescriptorProto{ + Name: proto.String("NestedMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("int32"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("bool"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_BOOL.Enum(), + Number: proto.Int32(2), + }, + }, + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Echo"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + ClientStreaming: proto.Bool(false), + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + + meth.ServerStreaming = proto.Bool(false) + + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + nested := &descriptor.Message{ + DescriptorProto: nesteddesc, + } + + nestedField := &descriptor.Field{ + Message: msg, + FieldDescriptorProto: msg.GetField()[0], + } + intField := &descriptor.Field{ + Message: nested, + FieldDescriptorProto: nested.GetField()[0], + } + boolField := &descriptor.Field{ + Message: nested, + FieldDescriptorProto: nested.GetField()[1], + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc, nesteddesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg, nested}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "POST", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", // TODO(achew): Figure out what this hsould really be + }, + PathParams: []descriptor.Parameter{ + { + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "nested", + Target: nestedField, + }, + { + Name: "int32", + Target: intField, + }, + }), + Target: intField, + }, + }, + Body: &descriptor.Body{ + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "nested", + Target: nestedField, + }, + { + Name: "bool", + Target: boolField, + }, + }), + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + if want, got := "2.0", result.Swagger; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).Swagger = %s want to be %s", file, got, want) + } + if want, got := "", result.BasePath; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).BasePath = %s want to be %s", file, got, want) + } + if want, got := ([]string)(nil), result.Schemes; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).Schemes = %s want to be %s", file, got, want) + } + if want, got := []string{"application/json"}, result.Consumes; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).Consumes = %s want to be %s", file, got, want) + } + if want, got := []string{"application/json"}, result.Produces; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).Produces = %s want to be %s", file, got, want) + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + +func TestApplyTemplateRequestWithClientStreaming(t *testing.T) { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("nested"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String("NestedMessage"), + Number: proto.Int32(1), + }, + }, + } + nesteddesc := &descriptorpb.DescriptorProto{ + Name: proto.String("NestedMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("int32"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("bool"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_BOOL.Enum(), + Number: proto.Int32(2), + }, + }, + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Echo"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + ClientStreaming: proto.Bool(true), + ServerStreaming: proto.Bool(true), + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + nested := &descriptor.Message{ + DescriptorProto: nesteddesc, + } + + nestedField := &descriptor.Field{ + Message: msg, + FieldDescriptorProto: msg.GetField()[0], + } + intField := &descriptor.Field{ + Message: nested, + FieldDescriptorProto: nested.GetField()[0], + } + boolField := &descriptor.Field{ + Message: nested, + FieldDescriptorProto: nested.GetField()[1], + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc, nesteddesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg, nested}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "POST", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", // TODO(achew): Figure out what this hsould really be + }, + PathParams: []descriptor.Parameter{ + { + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "nested", + Target: nestedField, + }, + { + Name: "int32", + Target: intField, + }, + }), + Target: intField, + }, + }, + Body: &descriptor.Body{ + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "nested", + Target: nestedField, + }, + { + Name: "bool", + Target: boolField, + }, + }), + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + + // Only ExampleMessage must be present, not NestedMessage + if want, got, name := 3, len(result.Definitions), "len(Definitions)"; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) + } + if _, ok := result.Paths["/v1/echo"].Post.Responses["200"]; !ok { + t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", file, `result.Paths["/v1/echo"].Post.Responses["200"]`) + } else { + if want, got, name := "A successful response.(streaming responses)", result.Paths["/v1/echo"].Post.Responses["200"].Description, `result.Paths["/v1/echo"].Post.Responses["200"].Description`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + streamExampleExampleMessage := result.Paths["/v1/echo"].Post.Responses["200"].Schema + if want, got, name := "object", streamExampleExampleMessage.Type, `result.Paths["/v1/echo"].Post.Responses["200"].Schema.Type`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + if want, got, name := "Stream result of exampleExampleMessage", streamExampleExampleMessage.Title, `result.Paths["/v1/echo"].Post.Responses["200"].Schema.Title`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + streamExampleExampleMessageProperties := *(streamExampleExampleMessage.Properties) + if want, got, name := 2, len(streamExampleExampleMessageProperties), `len(StreamDefinitions["exampleExampleMessage"].Properties)`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) + } else { + resultProperty := streamExampleExampleMessageProperties[0] + if want, got, name := "result", resultProperty.Key, `(*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Key`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + result := resultProperty.Value.(openapiSchemaObject) + if want, got, name := "#/definitions/exampleExampleMessage", result.Ref, `((*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Value.(openapiSchemaObject)).Ref`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + errorProperty := streamExampleExampleMessageProperties[1] + if want, got, name := "error", errorProperty.Key, `(*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Key`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + err := errorProperty.Value.(openapiSchemaObject) + if want, got, name := "#/definitions/rpcStatus", err.Ref, `((*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Value.(openapiSchemaObject)).Ref`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) + } + } + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + +func TestApplyTemplateRequestWithUnusedReferences(t *testing.T) { + reqdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("string"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + }, + } + respdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("EmptyMessage"), + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Example"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("EmptyMessage"), + ClientStreaming: proto.Bool(false), + ServerStreaming: proto.Bool(false), + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + + req := &descriptor.Message{ + DescriptorProto: reqdesc, + } + resp := &descriptor.Message{ + DescriptorProto: respdesc, + } + stringField := &descriptor.Field{ + Message: req, + FieldDescriptorProto: req.GetField()[0], + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{reqdesc, respdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{req, resp}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: req, + ResponseType: resp, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "GET", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/example", + }, + }, + { + HTTPMethod: "POST", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/example/{string}", + }, + PathParams: []descriptor.Parameter{ + { + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "string", + Target: stringField, + }, + }), + Target: stringField, + }, + }, + Body: &descriptor.Body{ + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "string", + Target: stringField, + }, + }), + }, + }, + }, + }, + }, + }, + }, + } + + reg := descriptor.NewRegistry() + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + + // Only EmptyMessage must be present, not ExampleMessage (plus error status) + if want, got, name := 3, len(result.Definitions), "len(Definitions)"; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + +func TestApplyTemplateRequestWithBodyQueryParameters(t *testing.T) { + bookDesc := &descriptorpb.DescriptorProto{ + Name: proto.String("Book"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("name"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("id"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(2), + }, + }, + } + createDesc := &descriptorpb.DescriptorProto{ + Name: proto.String("CreateBookRequest"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("parent"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("book"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(2), + }, + { + Name: proto.String("book_id"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(3), + }, + }, + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("CreateBook"), + InputType: proto.String("CreateBookRequest"), + OutputType: proto.String("Book"), + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("BookService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + + bookMsg := &descriptor.Message{ + DescriptorProto: bookDesc, + } + createMsg := &descriptor.Message{ + DescriptorProto: createDesc, + } + + parentField := &descriptor.Field{ + Message: createMsg, + FieldDescriptorProto: createMsg.GetField()[0], + } + bookField := &descriptor.Field{ + Message: createMsg, + FieldMessage: bookMsg, + FieldDescriptorProto: createMsg.GetField()[1], + } + bookIDField := &descriptor.Field{ + Message: createMsg, + FieldDescriptorProto: createMsg.GetField()[2], + } + + createMsg.Fields = []*descriptor.Field{parentField, bookField, bookIDField} + + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("book.proto"), + MessageType: []*descriptorpb.DescriptorProto{bookDesc, createDesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/book.pb", + Name: "book_pb", + }, + Messages: []*descriptor.Message{bookMsg, createMsg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: createMsg, + ResponseType: bookMsg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "POST", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/{parent=publishers/*}/books", + }, + PathParams: []descriptor.Parameter{ + { + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "parent", + Target: parentField, + }, + }), + Target: parentField, + }, + }, + Body: &descriptor.Body{ + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ + { + Name: "book", + Target: bookField, + }, + }), + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + if err := AddErrorDefs(reg); err != nil { + t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) + return + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}}) + if err != nil { + t.Errorf("Registry.Load() failed with %v; want success", err) + return + } + result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + + if _, ok := result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]; !ok { + t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", file, `result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]`) + } else { + if want, got, name := 3, len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters), `len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters)`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) + } + + type param struct { + Name string + In string + Required bool + } + + p0 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0] + if want, got, name := (param{"parent", "path", true}), (param{p0.Name, p0.In, p0.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0]`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) + } + p1 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1] + if want, got, name := (param{"body", "body", true}), (param{p1.Name, p1.In, p1.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) + } + p2 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[2] + if want, got, name := (param{"book_id", "query", false}), (param{p2.Name, p2.In, p2.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) { + t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) + } + } + + // If there was a failure, print out the input and the json result for debugging. + if t.Failed() { + t.Errorf("had: %s", file) + t.Errorf("got: %s", fmt.Sprint(result)) + } +} + +func generateFieldsForJSONReservedName() []*descriptor.Field { + fields := make([]*descriptor.Field, 0) + fieldName := string("json_name") + fieldJSONName := string("jsonNAME") + fieldDescriptor := descriptorpb.FieldDescriptorProto{Name: &fieldName, JsonName: &fieldJSONName} + field := &descriptor.Field{FieldDescriptorProto: &fieldDescriptor} + return append(fields, field) +} + +func generateMsgsForJSONReservedName() []*descriptor.Message { + result := make([]*descriptor.Message, 0) + // The first message, its field is field_abc and its type is NewType + // NewType field_abc + fieldName := "field_abc" + fieldJSONName := "fieldAbc" + messageName1 := "message1" + messageType := "pkg.a.NewType" + pfd := descriptorpb.FieldDescriptorProto{Name: &fieldName, JsonName: &fieldJSONName, TypeName: &messageType} + result = append(result, + &descriptor.Message{ + DescriptorProto: &descriptorpb.DescriptorProto{ + Name: &messageName1, Field: []*descriptorpb.FieldDescriptorProto{&pfd}, + }, + }) + // The second message, its name is NewName, its type is string + // message NewType { + // string field_newName [json_name = RESERVEDJSONNAME] + // } + messageName := "NewType" + field := "field_newName" + fieldJSONName2 := "RESERVEDJSONNAME" + pfd2 := descriptorpb.FieldDescriptorProto{Name: &field, JsonName: &fieldJSONName2} + result = append(result, &descriptor.Message{ + DescriptorProto: &descriptorpb.DescriptorProto{ + Name: &messageName, Field: []*descriptorpb.FieldDescriptorProto{&pfd2}, + }, + }) + return result +} + +func TestTemplateWithJsonCamelCase(t *testing.T) { + var tests = []struct { + input string + expected string + }{ + {"/test/{test_id}", "/test/{testId}"}, + {"/test1/{test1_id}/test2/{test2_id}", "/test1/{test1Id}/test2/{test2Id}"}, + {"/test1/{test1_id}/{test2_id}", "/test1/{test1Id}/{test2Id}"}, + {"/test1/test2/{test1_id}/{test2_id}", "/test1/test2/{test1Id}/{test2Id}"}, + {"/test1/{test1_id1_id2}", "/test1/{test1Id1Id2}"}, + {"/test1/{test1_id1_id2}/test2/{test2_id3_id4}", "/test1/{test1Id1Id2}/test2/{test2Id3Id4}"}, + {"/test1/test2/{test1_id1_id2}/{test2_id3_id4}", "/test1/test2/{test1Id1Id2}/{test2Id3Id4}"}, + {"test/{a}", "test/{a}"}, + {"test/{ab}", "test/{ab}"}, + {"test/{a_a}", "test/{aA}"}, + {"test/{ab_c}", "test/{abC}"}, + {"test/{json_name}", "test/{jsonNAME}"}, + {"test/{field_abc.field_newName}", "test/{fieldAbc.RESERVEDJSONNAME}"}, + } + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(true) + for _, data := range tests { + actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + if data.expected != actual { + t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) + } + } +} + +func TestTemplateWithoutJsonCamelCase(t *testing.T) { + var tests = []struct { + input string + expected string + }{ + {"/test/{test_id}", "/test/{test_id}"}, + {"/test1/{test1_id}/test2/{test2_id}", "/test1/{test1_id}/test2/{test2_id}"}, + {"/test1/{test1_id}/{test2_id}", "/test1/{test1_id}/{test2_id}"}, + {"/test1/test2/{test1_id}/{test2_id}", "/test1/test2/{test1_id}/{test2_id}"}, + {"/test1/{test1_id1_id2}", "/test1/{test1_id1_id2}"}, + {"/test1/{test1_id1_id2}/test2/{test2_id3_id4}", "/test1/{test1_id1_id2}/test2/{test2_id3_id4}"}, + {"/test1/test2/{test1_id1_id2}/{test2_id3_id4}", "/test1/test2/{test1_id1_id2}/{test2_id3_id4}"}, + {"test/{a}", "test/{a}"}, + {"test/{ab}", "test/{ab}"}, + {"test/{a_a}", "test/{a_a}"}, + {"test/{json_name}", "test/{json_name}"}, + {"test/{field_abc.field_newName}", "test/{field_abc.field_newName}"}, + } + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(false) + for _, data := range tests { + actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + if data.expected != actual { + t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) + } + } +} + +func TestTemplateToOpenAPIPath(t *testing.T) { + var tests = []struct { + input string + expected string + }{ + {"/test", "/test"}, + {"/{test}", "/{test}"}, + {"/{test=prefix/*}", "/{test}"}, + {"/{test=prefix/that/has/multiple/parts/to/it/*}", "/{test}"}, + {"/{test1}/{test2}", "/{test1}/{test2}"}, + {"/{test1}/{test2}/", "/{test1}/{test2}/"}, + {"/{name=prefix/*}", "/{name=prefix/*}"}, + {"/{name=prefix1/*/prefix2/*}", "/{name=prefix1/*/prefix2/*}"}, + {"/{user.name=prefix/*}", "/{user.name=prefix/*}"}, + {"/{user.name=prefix1/*/prefix2/*}", "/{user.name=prefix1/*/prefix2/*}"}, + {"/{parent=prefix/*}/children", "/{parent=prefix/*}/children"}, + {"/{name=prefix/*}:customMethod", "/{name=prefix/*}:customMethod"}, + {"/{name=prefix1/*/prefix2/*}:customMethod", "/{name=prefix1/*/prefix2/*}:customMethod"}, + {"/{user.name=prefix/*}:customMethod", "/{user.name=prefix/*}:customMethod"}, + {"/{user.name=prefix1/*/prefix2/*}:customMethod", "/{user.name=prefix1/*/prefix2/*}:customMethod"}, + {"/{parent=prefix/*}/children:customMethod", "/{parent=prefix/*}/children:customMethod"}, + } + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(false) + for _, data := range tests { + actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + if data.expected != actual { + t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) + } + } + reg.SetUseJSONNamesForFields(true) + for _, data := range tests { + actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + if data.expected != actual { + t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) + } + } +} + +func BenchmarkTemplateToOpenAPIPath(b *testing.B) { + const input = "/{user.name=prefix1/*/prefix2/*}:customMethod" + + b.Run("with JSON names", func(b *testing.B) { + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(false) + + for i := 0; i < b.N; i++ { + _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + } + }) + + b.Run("without JSON names", func(b *testing.B) { + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(true) + + for i := 0; i < b.N; i++ { + _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + } + }) +} + +func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) { + var tests = []struct { + input string + output string + listOfFQMNs []string + useFQNForOpenAPIName bool + }{ + { + ".a.b.C", + "C", + []string{ + ".a.b.C", + }, + false, + }, + { + ".a.b.C", + "abC", + []string{ + ".a.C", + ".a.b.C", + }, + false, + }, + { + ".a.b.C", + "abC", + []string{ + ".C", + ".a.C", + ".a.b.C", + }, + false, + }, + { + ".a.b.C", + "a.b.C", + []string{ + ".C", + ".a.C", + ".a.b.C", + }, + true, + }, + } + + for _, data := range tests { + names := resolveFullyQualifiedNameToOpenAPINames(data.listOfFQMNs, data.useFQNForOpenAPIName) + output := names[data.input] + if output != data.output { + t.Errorf("Expected fullyQualifiedNameToOpenAPIName(%v) to be %s but got %s", + data.input, data.output, output) + } + } +} + +func TestFQMNtoOpenAPIName(t *testing.T) { + var tests = []struct { + input string + expected string + }{ + {"/test", "/test"}, + {"/{test}", "/{test}"}, + {"/{test=prefix/*}", "/{test}"}, + {"/{test=prefix/that/has/multiple/parts/to/it/*}", "/{test}"}, + {"/{test1}/{test2}", "/{test1}/{test2}"}, + {"/{test1}/{test2}/", "/{test1}/{test2}/"}, + } + reg := descriptor.NewRegistry() + reg.SetUseJSONNamesForFields(false) + for _, data := range tests { + actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + if data.expected != actual { + t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) + } + } + reg.SetUseJSONNamesForFields(true) + for _, data := range tests { + actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) + if data.expected != actual { + t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) + } + } +} + +func TestSchemaOfField(t *testing.T) { + type test struct { + field *descriptor.Field + refs refMap + expected openapiSchemaObject + openAPIOptions *openapiconfig.OpenAPIOptions + } + + jsonSchema := &openapi_options.JSONSchema{ + Title: "field title", + Description: "field description", + } + + var fieldOptions = new(descriptorpb.FieldOptions) + proto.SetExtension(fieldOptions, openapi_options.E_Openapiv2Field, jsonSchema) + + var requiredField = []annotations.FieldBehavior{annotations.FieldBehavior_REQUIRED} + var requiredFieldOptions = new(descriptorpb.FieldOptions) + proto.SetExtension(requiredFieldOptions, annotations.E_FieldBehavior, requiredField) + + var outputOnlyField = []annotations.FieldBehavior{annotations.FieldBehavior_OUTPUT_ONLY} + var outputOnlyOptions = new(descriptorpb.FieldOptions) + proto.SetExtension(outputOnlyOptions, annotations.E_FieldBehavior, outputOnlyField) + + tests := []test{ + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("primitive_field"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("repeated_primitive_field"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "array", + Items: &openapiItemsObject{ + Type: "string", + }, + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.FieldMask"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.Timestamp"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + Format: "date-time", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.Duration"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.StringValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("repeated_wrapped_field"), + TypeName: proto.String(".google.protobuf.StringValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "array", + Items: &openapiItemsObject{ + Type: "string", + }, + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.BytesValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + Format: "byte", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.Int32Value"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "integer", + Format: "int32", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.UInt32Value"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "integer", + Format: "int64", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.Int64Value"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + Format: "int64", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.UInt64Value"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + Format: "uint64", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.FloatValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "number", + Format: "float", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.DoubleValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "number", + Format: "double", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.BoolValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "boolean", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.Struct"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "object", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.Value"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "object", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.ListValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "array", + Items: (*openapiItemsObject)(&schemaCore{ + Type: "object", + }), + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("wrapped_field"), + TypeName: proto.String(".google.protobuf.NullValue"), + Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("message_field"), + TypeName: proto.String(".example.Message"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + }, + }, + refs: refMap{".example.Message": struct{}{}}, + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Ref: "#/definitions/exampleMessage", + }, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("map_field"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Message.MapFieldEntry"), + Options: fieldOptions, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "object", + }, + AdditionalProperties: &openapiSchemaObject{ + schemaCore: schemaCore{Type: "string"}, + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("array_field"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Options: fieldOptions, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "array", + Items: (*openapiItemsObject)(&schemaCore{Type: "string"}), + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("primitive_field"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + Options: fieldOptions, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "integer", + Format: "int32", + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("message_field"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Empty"), + Options: fieldOptions, + }, + }, + refs: refMap{".example.Empty": struct{}{}}, + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Ref: "#/definitions/exampleEmpty", + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("map_field"), // should be called map_field_option but it's not valid map field name + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Message.MapFieldEntry"), + }, + }, + openAPIOptions: &openapiconfig.OpenAPIOptions{ + Field: []*openapiconfig.OpenAPIFieldOption{ + { + Field: "example.Message.map_field", + Option: jsonSchema, + }, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "object", + }, + AdditionalProperties: &openapiSchemaObject{ + schemaCore: schemaCore{Type: "string"}, + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("array_field_option"), + Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + }, + }, + openAPIOptions: &openapiconfig.OpenAPIOptions{ + Field: []*openapiconfig.OpenAPIFieldOption{ + { + Field: "example.Message.array_field_option", + Option: jsonSchema, + }, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "array", + Items: (*openapiItemsObject)(&schemaCore{Type: "string"}), + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("primitive_field_option"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), + }, + }, + openAPIOptions: &openapiconfig.OpenAPIOptions{ + Field: []*openapiconfig.OpenAPIFieldOption{ + { + Field: "example.Message.primitive_field_option", + Option: jsonSchema, + }, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "integer", + Format: "int32", + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("message_field_option"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + TypeName: proto.String(".example.Empty"), + }, + }, + openAPIOptions: &openapiconfig.OpenAPIOptions{ + Field: []*openapiconfig.OpenAPIFieldOption{ + { + Field: "example.Message.message_field_option", + Option: jsonSchema, + }, + }, + }, + refs: refMap{".example.Empty": struct{}{}}, + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Ref: "#/definitions/exampleEmpty", + }, + Title: "field title", + Description: "field description", + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("required_via_field_behavior_field"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Options: requiredFieldOptions, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + Required: []string{"required_via_field_behavior_field"}, + }, + }, + { + field: &descriptor.Field{ + FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ + Name: proto.String("readonly_via_field_behavior_field"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Options: outputOnlyOptions, + }, + }, + refs: make(refMap), + expected: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + ReadOnly: true, + }, + }, + } + for _, test := range tests { + reg := descriptor.NewRegistry() + req := &pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{ + { + Name: proto.String("third_party/google.proto"), + Package: proto.String("google.protobuf"), + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String("third_party/google"), + }, + MessageType: []*descriptorpb.DescriptorProto{ + protodesc.ToDescriptorProto((&structpb.Struct{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&structpb.Value{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&structpb.ListValue{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&field_mask.FieldMask{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((×tamppb.Timestamp{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&durationpb.Duration{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.StringValue{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.BytesValue{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.Int32Value{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.UInt32Value{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.Int64Value{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.UInt64Value{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.FloatValue{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.DoubleValue{}).ProtoReflect().Descriptor()), + protodesc.ToDescriptorProto((&wrapperspb.BoolValue{}).ProtoReflect().Descriptor()), + }, + EnumType: []*descriptorpb.EnumDescriptorProto{ + protodesc.ToEnumDescriptorProto(structpb.NullValue(0).Descriptor()), + }, + }, + { + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{"third_party/google.proto"}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + MessageType: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("Message"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("value"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + func() *descriptorpb.FieldDescriptorProto { + fd := test.field.FieldDescriptorProto + fd.Number = proto.Int32(2) + return fd + }(), + }, + NestedType: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("MapFieldEntry"), + Options: &descriptorpb.MessageOptions{MapEntry: proto.Bool(true)}, + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("key"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + }, + { + Name: proto.String("value"), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(2), + }, + }, + }, + }, + }, + { + Name: proto.String("Empty"), + }, + }, + EnumType: []*descriptorpb.EnumDescriptorProto{ + { + Name: proto.String("MessageType"), + Value: []*descriptorpb.EnumValueDescriptorProto{ + { + Name: proto.String("MESSAGE_TYPE_1"), + Number: proto.Int32(0), + }, + }, + }, + }, + Service: []*descriptorpb.ServiceDescriptorProto{}, + }, + }, + } + err := reg.Load(req) + if err != nil { + t.Errorf("failed to reg.Load(req): %v", err) + } + + // set field's parent message pointer to message so field can resolve its FQFN + test.field.Message = &descriptor.Message{ + DescriptorProto: req.ProtoFile[1].MessageType[0], + File: &descriptor.File{ + FileDescriptorProto: req.ProtoFile[1], + }, + } + + if test.openAPIOptions != nil { + if err := reg.RegisterOpenAPIOptions(test.openAPIOptions); err != nil { + t.Fatalf("failed to register OpenAPI options: %s", err) + } + } + + refs := make(refMap) + actual := schemaOfField(test.field, reg, refs) + expectedSchemaObject := test.expected + if e, a := expectedSchemaObject, actual; !reflect.DeepEqual(a, e) { + t.Errorf("Expected schemaOfField(%v) = \n%#+v, actual: \n%#+v", test.field, e, a) + } + if !reflect.DeepEqual(refs, test.refs) { + t.Errorf("Expected schemaOfField(%v) to add refs %v, not %v", test.field, test.refs, refs) + } + } +} + +func TestRenderMessagesAsDefinition(t *testing.T) { + jsonSchema := &openapi_options.JSONSchema{ + Title: "field title", + Description: "field description", + Required: []string{"aRequiredField"}, + } + + var requiredField = new(descriptorpb.FieldOptions) + proto.SetExtension(requiredField, openapi_options.E_Openapiv2Field, jsonSchema) + + var fieldBehaviorRequired = []annotations.FieldBehavior{annotations.FieldBehavior_REQUIRED} + var requiredFieldOptions = new(descriptorpb.FieldOptions) + proto.SetExtension(requiredFieldOptions, annotations.E_FieldBehavior, fieldBehaviorRequired) + + var fieldBehaviorOutputOnlyField = []annotations.FieldBehavior{annotations.FieldBehavior_OUTPUT_ONLY} + var fieldBehaviorOutputOnlyOptions = new(descriptorpb.FieldOptions) + proto.SetExtension(fieldBehaviorOutputOnlyOptions, annotations.E_FieldBehavior, fieldBehaviorOutputOnlyField) + + tests := []struct { + descr string + msgDescs []*descriptorpb.DescriptorProto + schema map[string]openapi_options.Schema // per-message schema to add + defs openapiDefinitionsObject + openAPIOptions *openapiconfig.OpenAPIOptions + }{ + { + descr: "no OpenAPI options", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{}, + defs: map[string]openapiSchemaObject{ + "Message": {schemaCore: schemaCore{Type: "object"}}, + }, + }, + { + descr: "example option", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + Example: `{"foo":"bar"}`, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": {schemaCore: schemaCore{ + Type: "object", + Example: json.RawMessage(`{"foo":"bar"}`), + }}, + }, + }, + { + descr: "example option with something non-json", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + Example: `XXXX anything goes XXXX`, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": {schemaCore: schemaCore{ + Type: "object", + Example: json.RawMessage(`XXXX anything goes XXXX`), + }}, + }, + }, + { + descr: "external docs option", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + ExternalDocs: &openapi_options.ExternalDocumentation{ + Description: "glorious docs", + Url: "https://nada", + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + ExternalDocs: &openapiExternalDocumentationObject{ + Description: "glorious docs", + URL: "https://nada", + }, + }, + }, + }, + { + descr: "JSONSchema options", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + JsonSchema: &openapi_options.JSONSchema{ + Title: "title", + Description: "desc", + MultipleOf: 100, + Maximum: 101, + ExclusiveMaximum: true, + Minimum: 1, + ExclusiveMinimum: true, + MaxLength: 10, + MinLength: 3, + Pattern: "[a-z]+", + MaxItems: 20, + MinItems: 2, + UniqueItems: true, + MaxProperties: 33, + MinProperties: 22, + Required: []string{"req"}, + ReadOnly: true, + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "title", + Description: "desc", + MultipleOf: 100, + Maximum: 101, + ExclusiveMaximum: true, + Minimum: 1, + ExclusiveMinimum: true, + MaxLength: 10, + MinLength: 3, + Pattern: "[a-z]+", + MaxItems: 20, + MinItems: 2, + UniqueItems: true, + MaxProperties: 33, + MinProperties: 22, + Required: []string{"req"}, + ReadOnly: true, + }, + }, + }, + { + descr: "JSONSchema options from registry", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + openAPIOptions: &openapiconfig.OpenAPIOptions{ + Message: []*openapiconfig.OpenAPIMessageOption{ + { + Message: "example.Message", + Option: &openapi_options.Schema{ + JsonSchema: &openapi_options.JSONSchema{ + Title: "title", + Description: "desc", + MultipleOf: 100, + Maximum: 101, + ExclusiveMaximum: true, + Minimum: 1, + ExclusiveMinimum: true, + MaxLength: 10, + MinLength: 3, + Pattern: "[a-z]+", + MaxItems: 20, + MinItems: 2, + UniqueItems: true, + MaxProperties: 33, + MinProperties: 22, + Required: []string{"req"}, + ReadOnly: true, + }, + }, + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "title", + Description: "desc", + MultipleOf: 100, + Maximum: 101, + ExclusiveMaximum: true, + Minimum: 1, + ExclusiveMinimum: true, + MaxLength: 10, + MinLength: 3, + Pattern: "[a-z]+", + MaxItems: 20, + MinItems: 2, + UniqueItems: true, + MaxProperties: 33, + MinProperties: 22, + Required: []string{"req"}, + ReadOnly: true, + }, + }, + }, + { + descr: "JSONSchema with required properties", + msgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("Message"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("aRequiredField"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + Options: requiredField, + }, + }, + }, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + JsonSchema: &openapi_options.JSONSchema{ + Title: "title", + Description: "desc", + Required: []string{"req"}, + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "title", + Description: "desc", + Required: []string{"req", "aRequiredField"}, + Properties: &openapiSchemaObjectProperties{ + { + Key: "aRequiredField", + Value: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + Description: "field description", + Title: "field title", + Required: []string{"aRequiredField"}, + }, + }, + }, + }, + }, + }, + { + descr: "JSONSchema with required properties via field_behavior", + msgDescs: []*descriptorpb.DescriptorProto{ + { + Name: proto.String("Message"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("aRequiredField"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(1), + Options: requiredFieldOptions, + }, + { + Name: proto.String("aOutputOnlyField"), + Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), + Number: proto.Int32(2), + Options: fieldBehaviorOutputOnlyOptions, + }, + }, + }, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + JsonSchema: &openapi_options.JSONSchema{ + Title: "title", + Description: "desc", + Required: []string{"req"}, + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "title", + Description: "desc", + Required: []string{"req", "aRequiredField"}, + Properties: &openapiSchemaObjectProperties{ + { + Key: "aRequiredField", + Value: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + Required: []string{"aRequiredField"}, + }, + }, + { + Key: "aOutputOnlyField", + Value: openapiSchemaObject{ + schemaCore: schemaCore{ + Type: "string", + }, + ReadOnly: true, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.descr, func(t *testing.T) { + + msgs := []*descriptor.Message{} + for _, msgdesc := range test.msgDescs { + msgdesc.Options = &descriptorpb.MessageOptions{} + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + + reg := descriptor.NewRegistry() + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.msgDescs, + EnumType: []*descriptorpb.EnumDescriptorProto{}, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + msgMap := map[string]*descriptor.Message{} + for _, d := range test.msgDescs { + name := d.GetName() + msg, err := reg.LookupMsg("example", name) + if err != nil { + t.Fatalf("lookup message %v: %v", name, err) + } + msgMap[msg.FQMN()] = msg + + if schema, ok := test.schema[name]; ok { + proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, &schema) + } + } + + if test.openAPIOptions != nil { + if err := reg.RegisterOpenAPIOptions(test.openAPIOptions); err != nil { + t.Fatalf("failed to register OpenAPI options: %s", err) + } + } + + refs := make(refMap) + actual := make(openapiDefinitionsObject) + renderMessagesAsDefinition(msgMap, actual, reg, refs) + + if !reflect.DeepEqual(actual, test.defs) { + t.Errorf("Expected renderMessagesAsDefinition() to add defs %+v, not %+v", test.defs, actual) + } + }) + } +} + +func TestUpdateOpenAPIDataFromComments(t *testing.T) { + + tests := []struct { + descr string + openapiSwaggerObject interface{} + comments string + expectedError error + expectedOpenAPIObject interface{} + useGoTemplate bool + }{ + { + descr: "empty comments", + openapiSwaggerObject: nil, + expectedOpenAPIObject: nil, + comments: "", + expectedError: nil, + }, + { + descr: "set field to read only", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + ReadOnly: true, + Description: "... Output only. ...", + }, + comments: "... Output only. ...", + expectedError: nil, + }, + { + descr: "set title", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Title: "Comment with no trailing dot", + }, + comments: "Comment with no trailing dot", + expectedError: nil, + }, + { + descr: "set description", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Description: "Comment with trailing dot.", + }, + comments: "Comment with trailing dot.", + expectedError: nil, + }, + { + descr: "use info object", + openapiSwaggerObject: &openapiSwaggerObject{ + Info: openapiInfoObject{}, + }, + expectedOpenAPIObject: &openapiSwaggerObject{ + Info: openapiInfoObject{ + Description: "Comment with trailing dot.", + }, + }, + comments: "Comment with trailing dot.", + expectedError: nil, + }, + { + descr: "multi line comment with title", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Title: "First line", + Description: "Second line", + }, + comments: "First line\n\nSecond line", + expectedError: nil, + }, + { + descr: "multi line comment no title", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Description: "First line.\n\nSecond line", + }, + comments: "First line.\n\nSecond line", + expectedError: nil, + }, + { + descr: "multi line comment with summary with dot", + openapiSwaggerObject: &openapiOperationObject{}, + expectedOpenAPIObject: &openapiOperationObject{ + Summary: "First line.", + Description: "Second line", + }, + comments: "First line.\n\nSecond line", + expectedError: nil, + }, + { + descr: "multi line comment with summary no dot", + openapiSwaggerObject: &openapiOperationObject{}, + expectedOpenAPIObject: &openapiOperationObject{ + Summary: "First line", + Description: "Second line", + }, + comments: "First line\n\nSecond line", + expectedError: nil, + }, + { + descr: "multi line comment with summary no dot", + openapiSwaggerObject: &schemaCore{}, + expectedOpenAPIObject: &schemaCore{}, + comments: "Any comment", + expectedError: errors.New("no description nor summary property"), + }, + { + descr: "without use_go_template", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Title: "First line", + Description: "{{import \"documentation.md\"}}", + }, + comments: "First line\n\n{{import \"documentation.md\"}}", + expectedError: nil, + }, + { + descr: "error with use_go_template", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Title: "First line", + Description: "open noneexistingfile.txt: no such file or directory", + }, + comments: "First line\n\n{{import \"noneexistingfile.txt\"}}", + expectedError: nil, + useGoTemplate: true, + }, + { + descr: "template with use_go_template", + openapiSwaggerObject: &openapiSchemaObject{}, + expectedOpenAPIObject: &openapiSchemaObject{ + Title: "Template", + Description: `Description "which means nothing"`, + }, + comments: "Template\n\nDescription {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + expectedError: nil, + useGoTemplate: true, + }, + } + + for _, test := range tests { + t.Run(test.descr, func(t *testing.T) { + reg := descriptor.NewRegistry() + if test.useGoTemplate { + reg.SetUseGoTemplate(true) + } + err := updateOpenAPIDataFromComments(reg, test.openapiSwaggerObject, nil, test.comments, false) + if test.expectedError == nil { + if err != nil { + t.Errorf("unexpected error '%v'", err) + } + if !reflect.DeepEqual(test.openapiSwaggerObject, test.expectedOpenAPIObject) { + t.Errorf("openapiSwaggerObject was not updated correctly, expected '%+v', got '%+v'", test.expectedOpenAPIObject, test.openapiSwaggerObject) + } + } else { + if err == nil { + t.Error("expected update error not returned") + } + if !reflect.DeepEqual(test.openapiSwaggerObject, test.expectedOpenAPIObject) { + t.Errorf("openapiSwaggerObject was not updated correctly, expected '%+v', got '%+v'", test.expectedOpenAPIObject, test.openapiSwaggerObject) + } + if err.Error() != test.expectedError.Error() { + t.Errorf("expected error malformed, expected %q, got %q", test.expectedError.Error(), err.Error()) + } + } + }) + } +} + +func TestMessageOptionsWithGoTemplate(t *testing.T) { + tests := []struct { + descr string + msgDescs []*descriptorpb.DescriptorProto + schema map[string]openapi_options.Schema // per-message schema to add + defs openapiDefinitionsObject + openAPIOptions *openapiconfig.OpenAPIOptions + useGoTemplate bool + }{ + { + descr: "external docs option", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + JsonSchema: &openapi_options.JSONSchema{ + Title: "{{.Name}}", + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + ExternalDocs: &openapi_options.ExternalDocumentation{ + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "Message", + Description: `Description "which means nothing"`, + ExternalDocs: &openapiExternalDocumentationObject{ + Description: `Description "which means nothing"`, + }, + }, + }, + useGoTemplate: true, + }, + { + descr: "external docs option", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + schema: map[string]openapi_options.Schema{ + "Message": { + JsonSchema: &openapi_options.JSONSchema{ + Title: "{{.Name}}", + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + ExternalDocs: &openapi_options.ExternalDocumentation{ + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "{{.Name}}", + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + ExternalDocs: &openapiExternalDocumentationObject{ + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + }, + }, + useGoTemplate: false, + }, + { + descr: "registered OpenAPIOption", + msgDescs: []*descriptorpb.DescriptorProto{ + {Name: proto.String("Message")}, + }, + openAPIOptions: &openapiconfig.OpenAPIOptions{ + Message: []*openapiconfig.OpenAPIMessageOption{ + { + Message: "example.Message", + Option: &openapi_options.Schema{ + JsonSchema: &openapi_options.JSONSchema{ + Title: "{{.Name}}", + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + ExternalDocs: &openapi_options.ExternalDocumentation{ + Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", + }, + }, + }, + }, + }, + defs: map[string]openapiSchemaObject{ + "Message": { + schemaCore: schemaCore{ + Type: "object", + }, + Title: "Message", + Description: `Description "which means nothing"`, + ExternalDocs: &openapiExternalDocumentationObject{ + Description: `Description "which means nothing"`, + }, + }, + }, + useGoTemplate: true, + }, + } + + for _, test := range tests { + t.Run(test.descr, func(t *testing.T) { + + msgs := []*descriptor.Message{} + for _, msgdesc := range test.msgDescs { + msgdesc.Options = &descriptorpb.MessageOptions{} + msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) + } + + reg := descriptor.NewRegistry() + reg.SetUseGoTemplate(test.useGoTemplate) + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Dependency: []string{}, + MessageType: test.msgDescs, + EnumType: []*descriptorpb.EnumDescriptorProto{}, + Service: []*descriptorpb.ServiceDescriptorProto{}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + Messages: msgs, + } + err := reg.Load(&pluginpb.CodeGeneratorRequest{ + ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, + }) + if err != nil { + t.Fatalf("failed to load code generator request: %v", err) + } + + msgMap := map[string]*descriptor.Message{} + for _, d := range test.msgDescs { + name := d.GetName() + msg, err := reg.LookupMsg("example", name) + if err != nil { + t.Fatalf("lookup message %v: %v", name, err) + } + msgMap[msg.FQMN()] = msg + + if schema, ok := test.schema[name]; ok { + proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, &schema) + } + } + + if test.openAPIOptions != nil { + if err := reg.RegisterOpenAPIOptions(test.openAPIOptions); err != nil { + t.Fatalf("failed to register OpenAPI options: %s", err) + } + } + + refs := make(refMap) + actual := make(openapiDefinitionsObject) + renderMessagesAsDefinition(msgMap, actual, reg, refs) + + if !reflect.DeepEqual(actual, test.defs) { + t.Errorf("Expected renderMessagesAsDefinition() to add defs %+v, not %+v", test.defs, actual) + } + }) + } +} + +func TestTemplateWithoutErrorDefinition(t *testing.T) { + msgdesc := &descriptorpb.DescriptorProto{ + Name: proto.String("ExampleMessage"), + Field: []*descriptorpb.FieldDescriptorProto{}, + } + meth := &descriptorpb.MethodDescriptorProto{ + Name: proto.String("Echo"), + InputType: proto.String("ExampleMessage"), + OutputType: proto.String("ExampleMessage"), + } + svc := &descriptorpb.ServiceDescriptorProto{ + Name: proto.String("ExampleService"), + Method: []*descriptorpb.MethodDescriptorProto{meth}, + } + + msg := &descriptor.Message{ + DescriptorProto: msgdesc, + } + + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + MessageType: []*descriptorpb.DescriptorProto{msgdesc}, + Service: []*descriptorpb.ServiceDescriptorProto{svc}, + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + GoPkg: descriptor.GoPackage{ + Path: "example.com/path/to/example/example.pb", + Name: "example_pb", + }, + Messages: []*descriptor.Message{msg}, + Services: []*descriptor.Service{ + { + ServiceDescriptorProto: svc, + Methods: []*descriptor.Method{ + { + MethodDescriptorProto: meth, + RequestType: msg, + ResponseType: msg, + Bindings: []*descriptor.Binding{ + { + HTTPMethod: "POST", + PathTmpl: httprule.Template{ + Version: 1, + OpCodes: []int{0, 0}, + Template: "/v1/echo", + }, + Body: &descriptor.Body{ + FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}), + }, + }, + }, + }, + }, + }, + }, + } + reg := descriptor.NewRegistry() + err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}}) + if err != nil { + t.Errorf("failed to reg.Load(): %v", err) + return + } + result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err != nil { + t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) + return + } + + defRsp, ok := result.Paths["/v1/echo"].Post.Responses["default"] + if !ok { + return + } + + ref := defRsp.Schema.schemaCore.Ref + refName := strings.TrimPrefix(ref, "#/definitions/") + if refName == "" { + t.Fatal("created default Error response with empty reflink") + } + + if _, ok := result.Definitions[refName]; !ok { + t.Errorf("default Error response with reflink '%v', but its definition was not found", refName) + } +} + +func Test_getReservedJsonName(t *testing.T) { + type args struct { + fieldName string + messageNameToFieldsToJSONName map[string]map[string]string + fieldNameToType map[string]string + } + tests := []struct { + name string + args args + want string + }{ + { + "test case 1: single dot use case", + args{ + fieldName: "abc.a_1", + messageNameToFieldsToJSONName: map[string]map[string]string{ + "Msg": { + "a_1": "a1JSONNAME", + "b_1": "b1JSONNAME", + }, + }, + fieldNameToType: map[string]string{ + "abc": "pkg1.test.Msg", + "bcd": "pkg1.test.Msg", + }, + }, + "a1JSONNAME", + }, + { + "test case 2: single dot use case with no existing field", + args{ + fieldName: "abc.d_1", + messageNameToFieldsToJSONName: map[string]map[string]string{ + "Msg": { + "a_1": "a1JSONNAME", + "b_1": "b1JSONNAME", + }, + }, + fieldNameToType: map[string]string{ + "abc": "pkg1.test.Msg", + "bcd": "pkg1.test.Msg", + }, + }, + "", + }, + { + "test case 3: double dot use case", + args{ + fieldName: "pkg.abc.a_1", + messageNameToFieldsToJSONName: map[string]map[string]string{ + "Msg": { + "a_1": "a1JSONNAME", + "b_1": "b1JSONNAME", + }, + }, + fieldNameToType: map[string]string{ + "abc": "pkg1.test.Msg", + "bcd": "pkg1.test.Msg", + }, + }, + "a1JSONNAME", + }, + { + "test case 4: double dot use case with a not existed field", + args{ + fieldName: "pkg.abc.c_1", + messageNameToFieldsToJSONName: map[string]map[string]string{ + "Msg": { + "a_1": "a1JSONNAME", + "b_1": "b1JSONNAME", + }, + }, + fieldNameToType: map[string]string{ + "abc": "pkg1.test.Msg", + "bcd": "pkg1.test.Msg", + }, + }, + "", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := getReservedJSONName(tt.args.fieldName, tt.args.messageNameToFieldsToJSONName, tt.args.fieldNameToType); got != tt.want { + t.Errorf("getReservedJSONName() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestParseIncompleteSecurityRequirement(t *testing.T) { + swagger := openapi_options.Swagger{ + Security: []*openapi_options.SecurityRequirement{ + { + SecurityRequirement: map[string]*openapi_options.SecurityRequirement_SecurityRequirementValue{ + "key": nil, + }, + }, + }, + } + file := descriptor.File{ + FileDescriptorProto: &descriptorpb.FileDescriptorProto{ + SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, + Name: proto.String("example.proto"), + Package: proto.String("example"), + Options: &descriptorpb.FileOptions{ + GoPackage: proto.String(".;example"), + }, + }, + } + proto.SetExtension(proto.Message(file.FileDescriptorProto.Options), openapi_options.E_Openapiv2Swagger, &swagger) + reg := descriptor.NewRegistry() + err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}}) + if err != nil { + t.Errorf("failed to reg.Load(): %v", err) + return + } + _, err = applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) + if err == nil { + t.Errorf("applyTemplate(%#v) did not error as expected", file) + return + } +} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go new file mode 100644 index 00000000..505cfc68 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go @@ -0,0 +1,276 @@ +package genopenapi + +import ( + "bytes" + "encoding/json" + "fmt" + + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" +) + +type param struct { + *descriptor.File + reg *descriptor.Registry +} + +// http://swagger.io/specification/#infoObject +type openapiInfoObject struct { + Title string `json:"title"` + Description string `json:"description,omitempty"` + TermsOfService string `json:"termsOfService,omitempty"` + Version string `json:"version"` + + Contact *openapiContactObject `json:"contact,omitempty"` + License *openapiLicenseObject `json:"license,omitempty"` + + extensions []extension +} + +// https://swagger.io/specification/#tagObject +type openapiTagObject struct { + Name string `json:"name"` + Description string `json:"description,omitempty"` + ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` +} + +// http://swagger.io/specification/#contactObject +type openapiContactObject struct { + Name string `json:"name,omitempty"` + URL string `json:"url,omitempty"` + Email string `json:"email,omitempty"` +} + +// http://swagger.io/specification/#licenseObject +type openapiLicenseObject struct { + Name string `json:"name,omitempty"` + URL string `json:"url,omitempty"` +} + +// http://swagger.io/specification/#externalDocumentationObject +type openapiExternalDocumentationObject struct { + Description string `json:"description,omitempty"` + URL string `json:"url,omitempty"` +} + +type extension struct { + key string + value json.RawMessage +} + +// http://swagger.io/specification/#swaggerObject +type openapiSwaggerObject struct { + Swagger string `json:"swagger"` + Info openapiInfoObject `json:"info"` + Tags []openapiTagObject `json:"tags,omitempty"` + Host string `json:"host,omitempty"` + BasePath string `json:"basePath,omitempty"` + Schemes []string `json:"schemes,omitempty"` + Consumes []string `json:"consumes"` + Produces []string `json:"produces"` + Paths openapiPathsObject `json:"paths"` + Definitions openapiDefinitionsObject `json:"definitions"` + SecurityDefinitions openapiSecurityDefinitionsObject `json:"securityDefinitions,omitempty"` + Security []openapiSecurityRequirementObject `json:"security,omitempty"` + ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` + + extensions []extension +} + +// http://swagger.io/specification/#securityDefinitionsObject +type openapiSecurityDefinitionsObject map[string]openapiSecuritySchemeObject + +// http://swagger.io/specification/#securitySchemeObject +type openapiSecuritySchemeObject struct { + Type string `json:"type"` + Description string `json:"description,omitempty"` + Name string `json:"name,omitempty"` + In string `json:"in,omitempty"` + Flow string `json:"flow,omitempty"` + AuthorizationURL string `json:"authorizationUrl,omitempty"` + TokenURL string `json:"tokenUrl,omitempty"` + Scopes openapiScopesObject `json:"scopes,omitempty"` + + extensions []extension +} + +// http://swagger.io/specification/#scopesObject +type openapiScopesObject map[string]string + +// http://swagger.io/specification/#securityRequirementObject +type openapiSecurityRequirementObject map[string][]string + +// http://swagger.io/specification/#pathsObject +type openapiPathsObject map[string]openapiPathItemObject + +// http://swagger.io/specification/#pathItemObject +type openapiPathItemObject struct { + Get *openapiOperationObject `json:"get,omitempty"` + Delete *openapiOperationObject `json:"delete,omitempty"` + Post *openapiOperationObject `json:"post,omitempty"` + Put *openapiOperationObject `json:"put,omitempty"` + Patch *openapiOperationObject `json:"patch,omitempty"` +} + +// http://swagger.io/specification/#operationObject +type openapiOperationObject struct { + Summary string `json:"summary,omitempty"` + Description string `json:"description,omitempty"` + OperationID string `json:"operationId"` + Responses openapiResponsesObject `json:"responses"` + Parameters openapiParametersObject `json:"parameters,omitempty"` + Tags []string `json:"tags,omitempty"` + Deprecated bool `json:"deprecated,omitempty"` + Produces []string `json:"produces,omitempty"` + + Security *[]openapiSecurityRequirementObject `json:"security,omitempty"` + ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` + + extensions []extension +} + +type openapiParametersObject []openapiParameterObject + +// http://swagger.io/specification/#parameterObject +type openapiParameterObject struct { + Name string `json:"name"` + Description string `json:"description,omitempty"` + In string `json:"in,omitempty"` + Required bool `json:"required"` + Type string `json:"type,omitempty"` + Format string `json:"format,omitempty"` + Items *openapiItemsObject `json:"items,omitempty"` + Enum []string `json:"enum,omitempty"` + CollectionFormat string `json:"collectionFormat,omitempty"` + Default string `json:"default,omitempty"` + MinItems *int `json:"minItems,omitempty"` + + // Or you can explicitly refer to another type. If this is defined all + // other fields should be empty + Schema *openapiSchemaObject `json:"schema,omitempty"` +} + +// core part of schema, which is common to itemsObject and schemaObject. +// http://swagger.io/specification/#itemsObject +type schemaCore struct { + Type string `json:"type,omitempty"` + Format string `json:"format,omitempty"` + Ref string `json:"$ref,omitempty"` + Example json.RawMessage `json:"example,omitempty"` + + Items *openapiItemsObject `json:"items,omitempty"` + + // If the item is an enumeration include a list of all the *NAMES* of the + // enum values. I'm not sure how well this will work but assuming all enums + // start from 0 index it will be great. I don't think that is a good assumption. + Enum []string `json:"enum,omitempty"` + Default string `json:"default,omitempty"` +} + +func (s *schemaCore) setRefFromFQN(ref string, reg *descriptor.Registry) error { + name, ok := fullyQualifiedNameToOpenAPIName(ref, reg) + if !ok { + return fmt.Errorf("setRefFromFQN: can't resolve OpenAPI name from '%v'", ref) + } + s.Ref = fmt.Sprintf("#/definitions/%s", name) + return nil +} + +type openapiItemsObject schemaCore + +// http://swagger.io/specification/#responsesObject +type openapiResponsesObject map[string]openapiResponseObject + +// http://swagger.io/specification/#responseObject +type openapiResponseObject struct { + Description string `json:"description"` + Schema openapiSchemaObject `json:"schema"` + Examples map[string]interface{} `json:"examples,omitempty"` + Headers openapiHeadersObject `json:"headers,omitempty"` + + extensions []extension +} + +type openapiHeadersObject map[string]openapiHeaderObject + +// http://swagger.io/specification/#headerObject +type openapiHeaderObject struct { + Description string `json:"description,omitempty"` + Type string `json:"type,omitempty"` + Format string `json:"format,omitempty"` + Default json.RawMessage `json:"default,omitempty"` + Pattern string `json:"pattern,omitempty"` +} + +type keyVal struct { + Key string + Value interface{} +} + +type openapiSchemaObjectProperties []keyVal + +func (op openapiSchemaObjectProperties) MarshalJSON() ([]byte, error) { + var buf bytes.Buffer + buf.WriteString("{") + for i, kv := range op { + if i != 0 { + buf.WriteString(",") + } + key, err := json.Marshal(kv.Key) + if err != nil { + return nil, err + } + buf.Write(key) + buf.WriteString(":") + val, err := json.Marshal(kv.Value) + if err != nil { + return nil, err + } + buf.Write(val) + } + + buf.WriteString("}") + return buf.Bytes(), nil +} + +// http://swagger.io/specification/#schemaObject +type openapiSchemaObject struct { + schemaCore + // Properties can be recursively defined + Properties *openapiSchemaObjectProperties `json:"properties,omitempty"` + AdditionalProperties *openapiSchemaObject `json:"additionalProperties,omitempty"` + + Description string `json:"description,omitempty"` + Title string `json:"title,omitempty"` + + ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` + + ReadOnly bool `json:"readOnly,omitempty"` + MultipleOf float64 `json:"multipleOf,omitempty"` + Maximum float64 `json:"maximum,omitempty"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` + Minimum float64 `json:"minimum,omitempty"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` + MaxLength uint64 `json:"maxLength,omitempty"` + MinLength uint64 `json:"minLength,omitempty"` + Pattern string `json:"pattern,omitempty"` + MaxItems uint64 `json:"maxItems,omitempty"` + MinItems uint64 `json:"minItems,omitempty"` + UniqueItems bool `json:"uniqueItems,omitempty"` + MaxProperties uint64 `json:"maxProperties,omitempty"` + MinProperties uint64 `json:"minProperties,omitempty"` + Required []string `json:"required,omitempty"` +} + +// http://swagger.io/specification/#definitionsObject +type openapiDefinitionsObject map[string]openapiSchemaObject + +// Internal type mapping from FQMN to descriptor.Message. Used as a set by the +// findServiceMessages function. +type messageMap map[string]*descriptor.Message + +// Internal type mapping from FQEN to descriptor.Enum. Used as a set by the +// findServiceMessages function. +type enumMap map[string]*descriptor.Enum + +// Internal type to store used references. +type refMap map[string]struct{} diff --git a/api/third_party/protoc-gen-openapiv2/main.go b/api/third_party/protoc-gen-openapiv2/main.go new file mode 100644 index 00000000..ea3d82a7 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/main.go @@ -0,0 +1,220 @@ +package main + +import ( + "flag" + "fmt" + "os" + "strings" + + "github.com/golang/glog" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator" + "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" + "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/pluginpb" +) + +var ( + importPrefix = flag.String("import_prefix", "", "prefix to be added to go package paths for imported proto files") + file = flag.String("file", "-", "where to load data from") + allowDeleteBody = flag.Bool("allow_delete_body", false, "unless set, HTTP DELETE methods may not have a body") + grpcAPIConfiguration = flag.String("grpc_api_configuration", "", "path to file which describes the gRPC API Configuration in YAML format") + allowMerge = flag.Bool("allow_merge", false, "if set, generation one OpenAPI file out of multiple protos") + mergeFileName = flag.String("merge_file_name", "apidocs", "target OpenAPI file name prefix after merge") + useJSONNamesForFields = flag.Bool("json_names_for_fields", true, "if disabled, the original proto name will be used for generating OpenAPI definitions") + repeatedPathParamSeparator = flag.String("repeated_path_param_separator", "csv", "configures how repeated fields should be split. Allowed values are `csv`, `pipes`, `ssv` and `tsv`") + versionFlag = flag.Bool("version", false, "print the current version") + allowRepeatedFieldsInBody = flag.Bool("allow_repeated_fields_in_body", false, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option") + includePackageInTags = flag.Bool("include_package_in_tags", false, "if unset, the gRPC service name is added to the `Tags` field of each operation. If set and the `package` directive is shown in the proto file, the package name will be prepended to the service name") + useFQNForOpenAPIName = flag.Bool("fqn_for_openapi_name", false, "if set, the object's OpenAPI names will use the fully qualified names from the proto definition (ie my.package.MyMessage.MyInnerMessage") + useGoTemplate = flag.Bool("use_go_templates", false, "if set, you can use Go templates in protofile comments") + disableDefaultErrors = flag.Bool("disable_default_errors", false, "if set, disables generation of default errors. This is useful if you have defined custom error handling") + enumsAsInts = flag.Bool("enums_as_ints", false, "whether to render enum values as integers, as opposed to string values") + simpleOperationIDs = flag.Bool("simple_operation_ids", false, "whether to remove the service prefix in the operationID generation. Can introduce duplicate operationIDs, use with caution.") + openAPIConfiguration = flag.String("openapi_configuration", "", "path to file which describes the OpenAPI Configuration in YAML format") + generateUnboundMethods = flag.Bool("generate_unbound_methods", false, "generate swagger metadata even for RPC methods that have no HttpRule annotation") +) + +// Variables set by goreleaser at build time +var ( + version = "dev" + commit = "unknown" + date = "unknown" +) + +func main() { + flag.Parse() + defer glog.Flush() + + if *versionFlag { + fmt.Printf("Version %v, commit %v, built at %v\n", version, commit, date) + os.Exit(0) + } + + reg := descriptor.NewRegistry() + + glog.V(1).Info("Processing code generator request") + f := os.Stdin + if *file != "-" { + var err error + f, err = os.Open(*file) + if err != nil { + glog.Fatal(err) + } + } + glog.V(1).Info("Parsing code generator request") + req, err := codegenerator.ParseRequest(f) + if err != nil { + glog.Fatal(err) + } + glog.V(1).Info("Parsed code generator request") + pkgMap := make(map[string]string) + if req.Parameter != nil { + err := parseReqParam(req.GetParameter(), flag.CommandLine, pkgMap) + if err != nil { + glog.Fatalf("Error parsing flags: %v", err) + } + } + + reg.SetPrefix(*importPrefix) + reg.SetAllowDeleteBody(*allowDeleteBody) + reg.SetAllowMerge(*allowMerge) + reg.SetMergeFileName(*mergeFileName) + reg.SetUseJSONNamesForFields(*useJSONNamesForFields) + reg.SetAllowRepeatedFieldsInBody(*allowRepeatedFieldsInBody) + reg.SetIncludePackageInTags(*includePackageInTags) + reg.SetUseFQNForOpenAPIName(*useFQNForOpenAPIName) + reg.SetUseGoTemplate(*useGoTemplate) + reg.SetEnumsAsInts(*enumsAsInts) + reg.SetDisableDefaultErrors(*disableDefaultErrors) + reg.SetSimpleOperationIDs(*simpleOperationIDs) + reg.SetGenerateUnboundMethods(*generateUnboundMethods) + if err := reg.SetRepeatedPathParamSeparator(*repeatedPathParamSeparator); err != nil { + emitError(err) + return + } + for k, v := range pkgMap { + reg.AddPkgMap(k, v) + } + + if *grpcAPIConfiguration != "" { + if err := reg.LoadGrpcAPIServiceFromYAML(*grpcAPIConfiguration); err != nil { + emitError(err) + return + } + } + + g := genopenapi.New(reg) + + if err := genopenapi.AddErrorDefs(reg); err != nil { + emitError(err) + return + } + + if err := reg.Load(req); err != nil { + emitError(err) + return + } + + if *openAPIConfiguration != "" { + if err := reg.LoadOpenAPIConfigFromYAML(*openAPIConfiguration); err != nil { + emitError(err) + return + } + } + + var targets []*descriptor.File + for _, target := range req.FileToGenerate { + f, err := reg.LookupFile(target) + if err != nil { + glog.Fatal(err) + } + targets = append(targets, f) + } + + out, err := g.Generate(targets) + glog.V(1).Info("Processed code generator request") + if err != nil { + emitError(err) + return + } + emitFiles(out) +} + +func emitFiles(out []*descriptor.ResponseFile) { + files := make([]*pluginpb.CodeGeneratorResponse_File, len(out)) + for idx, item := range out { + files[idx] = item.CodeGeneratorResponse_File + } + emitResp(&pluginpb.CodeGeneratorResponse{File: files}) +} + +func emitError(err error) { + emitResp(&pluginpb.CodeGeneratorResponse{Error: proto.String(err.Error())}) +} + +func emitResp(resp *pluginpb.CodeGeneratorResponse) { + buf, err := proto.Marshal(resp) + if err != nil { + glog.Fatal(err) + } + if _, err := os.Stdout.Write(buf); err != nil { + glog.Fatal(err) + } +} + +// parseReqParam parses a CodeGeneratorRequest parameter and adds the +// extracted values to the given FlagSet and pkgMap. Returns a non-nil +// error if setting a flag failed. +func parseReqParam(param string, f *flag.FlagSet, pkgMap map[string]string) error { + if param == "" { + return nil + } + for _, p := range strings.Split(param, ",") { + spec := strings.SplitN(p, "=", 2) + if len(spec) == 1 { + if spec[0] == "allow_delete_body" { + err := f.Set(spec[0], "true") + if err != nil { + return fmt.Errorf("cannot set flag %s: %v", p, err) + } + continue + } + if spec[0] == "allow_merge" { + err := f.Set(spec[0], "true") + if err != nil { + return fmt.Errorf("cannot set flag %s: %v", p, err) + } + continue + } + if spec[0] == "allow_repeated_fields_in_body" { + err := f.Set(spec[0], "true") + if err != nil { + return fmt.Errorf("cannot set flag %s: %v", p, err) + } + continue + } + if spec[0] == "include_package_in_tags" { + err := f.Set(spec[0], "true") + if err != nil { + return fmt.Errorf("cannot set flag %s: %v", p, err) + } + continue + } + err := f.Set(spec[0], "") + if err != nil { + return fmt.Errorf("cannot set flag %s: %v", p, err) + } + continue + } + name, value := spec[0], spec[1] + if strings.HasPrefix(name, "M") { + pkgMap[name[1:]] = value + continue + } + if err := f.Set(name, value); err != nil { + return fmt.Errorf("cannot set flag %s: %v", p, err) + } + } + return nil +} diff --git a/api/third_party/protoc-gen-openapiv2/main_test.go b/api/third_party/protoc-gen-openapiv2/main_test.go new file mode 100644 index 00000000..514840a2 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/main_test.go @@ -0,0 +1,186 @@ +package main + +import ( + "errors" + "flag" + "reflect" + "testing" +) + +func TestParseReqParam(t *testing.T) { + + testcases := []struct { + name string + expected map[string]string + request string + expectedError error + allowDeleteBodyV bool + allowMergeV bool + allowRepeatedFieldsInBodyV bool + includePackageInTagsV bool + fileV string + importPathV string + mergeFileNameV string + useFQNForOpenAPINameV bool + }{ + { + // this one must be first - with no leading clearFlags call it + // verifies our expectation of default values as we reset by + // clearFlags + name: "Test 0", + expected: map[string]string{}, + request: "", + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "-", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 1", + expected: map[string]string{"google/api/annotations.proto": "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"}, + request: "allow_delete_body,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api", + allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true, + fileV: "./foo.pb", importPathV: "/bar/baz", mergeFileNameV: "apidocs", + }, + { + name: "Test 2", + expected: map[string]string{"google/api/annotations.proto": "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"}, + request: "allow_delete_body=true,allow_merge=true,allow_repeated_fields_in_body=true,include_package_in_tags=true,merge_file_name=test_name,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api", + allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true, + fileV: "./foo.pb", importPathV: "/bar/baz", mergeFileNameV: "test_name", + }, + { + name: "Test 3", + expected: map[string]string{"a/b/c.proto": "github.com/x/y/z", "f/g/h.proto": "github.com/1/2/3/"}, + request: "allow_delete_body=false,allow_merge=false,Ma/b/c.proto=github.com/x/y/z,Mf/g/h.proto=github.com/1/2/3/", + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 4", + expected: map[string]string{}, + request: "", + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 5", + expected: map[string]string{}, + request: "unknown_param=17", + expectedError: errors.New("cannot set flag unknown_param=17: no such flag -unknown_param"), + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 6", + expected: map[string]string{}, + request: "Mfoo", + expectedError: errors.New("cannot set flag Mfoo: no such flag -Mfoo"), + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 7", + expected: map[string]string{}, + request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,merge_file_name", + allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true, + fileV: "", importPathV: "", mergeFileNameV: "", + }, + { + name: "Test 8", + expected: map[string]string{}, + request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body=3,merge_file_name", + expectedError: errors.New(`cannot set flag allow_repeated_fields_in_body=3: parse error`), + allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 9", + expected: map[string]string{}, + request: "include_package_in_tags=3", + expectedError: errors.New(`cannot set flag include_package_in_tags=3: parse error`), + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 10", + expected: map[string]string{}, + request: "fqn_for_openapi_name=3", + expectedError: errors.New(`cannot set flag fqn_for_openapi_name=3: parse error`), + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForOpenAPINameV: false, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + { + name: "Test 11", + expected: map[string]string{}, + request: "fqn_for_openapi_name=true", + allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForOpenAPINameV: true, + fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", + }, + } + + for i, tc := range testcases { + t.Run(tc.name, func(tt *testing.T) { + f := flag.CommandLine + pkgMap := make(map[string]string) + err := parseReqParam(tc.request, f, pkgMap) + if tc.expectedError == nil { + if err != nil { + tt.Errorf("unexpected parse error '%v'", err) + } + if !reflect.DeepEqual(pkgMap, tc.expected) { + tt.Errorf("pkgMap parse error, expected '%v', got '%v'", tc.expected, pkgMap) + } + } else { + if err == nil { + tt.Error("expected parse error not returned") + } + if !reflect.DeepEqual(pkgMap, tc.expected) { + tt.Errorf("pkgMap parse error, expected '%v', got '%v'", tc.expected, pkgMap) + } + if err.Error() != tc.expectedError.Error() { + tt.Errorf("expected error malformed, expected %q, got %q", tc.expectedError.Error(), err.Error()) + } + } + checkFlags(tc.allowDeleteBodyV, tc.allowMergeV, tc.allowRepeatedFieldsInBodyV, tc.includePackageInTagsV, tc.useFQNForOpenAPINameV, tc.fileV, tc.importPathV, tc.mergeFileNameV, tt, i) + + clearFlags() + }) + } + +} + +func checkFlags(allowDeleteV, allowMergeV, allowRepeatedFieldsInBodyV, includePackageInTagsV bool, useFQNForOpenAPINameV bool, fileV, importPathV, mergeFileNameV string, t *testing.T, tid int) { + if *importPrefix != importPathV { + t.Errorf("Test %v: import_prefix misparsed, expected '%v', got '%v'", tid, importPathV, *importPrefix) + } + if *file != fileV { + t.Errorf("Test %v: file misparsed, expected '%v', got '%v'", tid, fileV, *file) + } + if *allowDeleteBody != allowDeleteV { + t.Errorf("Test %v: allow_delete_body misparsed, expected '%v', got '%v'", tid, allowDeleteV, *allowDeleteBody) + } + if *allowMerge != allowMergeV { + t.Errorf("Test %v: allow_merge misparsed, expected '%v', got '%v'", tid, allowMergeV, *allowMerge) + } + if *mergeFileName != mergeFileNameV { + t.Errorf("Test %v: merge_file_name misparsed, expected '%v', got '%v'", tid, mergeFileNameV, *mergeFileName) + } + if *allowRepeatedFieldsInBody != allowRepeatedFieldsInBodyV { + t.Errorf("Test %v: allow_repeated_fields_in_body misparsed, expected '%v', got '%v'", tid, allowRepeatedFieldsInBodyV, *allowRepeatedFieldsInBody) + } + if *includePackageInTags != includePackageInTagsV { + t.Errorf("Test %v: include_package_in_tags misparsed, expected '%v', got '%v'", tid, includePackageInTagsV, *includePackageInTags) + } + if *useFQNForOpenAPIName != useFQNForOpenAPINameV { + t.Errorf("Test %v: fqn_for_openapi_name misparsed, expected '%v', got '%v'", tid, useFQNForOpenAPINameV, *useFQNForOpenAPIName) + } +} + +func clearFlags() { + *importPrefix = "" + *file = "stdin" + *allowDeleteBody = false + *allowMerge = false + *allowRepeatedFieldsInBody = false + *includePackageInTags = false + *mergeFileName = "apidocs" +} diff --git a/api/third_party/protoc-gen-openapiv2/options/BUILD.bazel b/api/third_party/protoc-gen-openapiv2/options/BUILD.bazel new file mode 100644 index 00000000..36369994 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/options/BUILD.bazel @@ -0,0 +1,38 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") + +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "options_proto_files", + srcs = [ + "annotations.proto", + "openapiv2.proto", + ], +) + +go_library( + name = "go_default_library", + embed = [":options_go_proto"], + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", +) + +proto_library( + name = "options_proto", + srcs = [ + "annotations.proto", + "openapiv2.proto", + ], + deps = [ + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:struct_proto", + ], +) + +go_proto_library( + name = "options_go_proto", + compilers = ["//:go_apiv2"], + importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", + proto = ":options_proto", +) diff --git a/api/third_party/protoc-gen-openapiv2/options/annotations.pb.go b/api/third_party/protoc-gen-openapiv2/options/annotations.pb.go new file mode 100644 index 00000000..dbe53516 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/options/annotations.pb.go @@ -0,0 +1,241 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.0 +// source: protoc-gen-openapiv2/options/annotations.proto + +package options + +import ( + proto "github.com/golang/protobuf/proto" + descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*Swagger)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", + Tag: "bytes,1042,opt,name=openapiv2_swagger", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptor.MethodOptions)(nil), + ExtensionType: (*Operation)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", + Tag: "bytes,1042,opt,name=openapiv2_operation", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*Schema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", + Tag: "bytes,1042,opt,name=openapiv2_schema", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptor.ServiceOptions)(nil), + ExtensionType: (*Tag)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", + Tag: "bytes,1042,opt,name=openapiv2_tag", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*JSONSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", + Tag: "bytes,1042,opt,name=openapiv2_field", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, +} + +// Extension fields to descriptor.FileOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; + E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] +) + +// Extension fields to descriptor.MethodOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; + E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] +) + +// Extension fields to descriptor.MessageOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; + E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] +) + +// Extension fields to descriptor.ServiceOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; + E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] +) + +// Extension fields to descriptor.FieldOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; + E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] +) + +var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x2c, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, + 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, + 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []interface{}{ + (*descriptor.FileOptions)(nil), // 0: google.protobuf.FileOptions + (*descriptor.MethodOptions)(nil), // 1: google.protobuf.MethodOptions + (*descriptor.MessageOptions)(nil), // 2: google.protobuf.MessageOptions + (*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions + (*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions + (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Schema)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*Tag)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*JSONSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema +} +var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ + 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions + 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions + 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions + 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions + 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions + 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger + 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation + 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 5, // [5:10] is the sub-list for extension type_name + 0, // [0:5] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } +func file_protoc_gen_openapiv2_options_annotations_proto_init() { + if File_protoc_gen_openapiv2_options_annotations_proto != nil { + return + } + file_protoc_gen_openapiv2_options_openapiv2_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 5, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, + ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, + }.Build() + File_protoc_gen_openapiv2_options_annotations_proto = out.File + file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil + file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil +} diff --git a/api/third_party/protoc-gen-swagger/options/annotations.proto b/api/third_party/protoc-gen-openapiv2/options/annotations.proto old mode 100755 new mode 100644 similarity index 80% rename from api/third_party/protoc-gen-swagger/options/annotations.proto rename to api/third_party/protoc-gen-openapiv2/options/annotations.proto index 5151fd5a..1c189e20 --- a/api/third_party/protoc-gen-swagger/options/annotations.proto +++ b/api/third_party/protoc-gen-openapiv2/options/annotations.proto @@ -1,42 +1,42 @@ syntax = "proto3"; -package grpc.gateway.protoc_gen_swagger.options; +package grpc.gateway.protoc_gen_openapiv2.options; -option go_package = "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"; +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; import "google/protobuf/descriptor.proto"; -import "protoc-gen-swagger/options/openapiv2.proto"; +import "protoc-gen-openapiv2/options/openapiv2.proto"; extend google.protobuf.FileOptions { - // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project. + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. // // All IDs are the same, as assigned. It is okay that they are the same, as they extend // different descriptor messages. Swagger openapiv2_swagger = 1042; } extend google.protobuf.MethodOptions { - // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project. + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. // // All IDs are the same, as assigned. It is okay that they are the same, as they extend // different descriptor messages. Operation openapiv2_operation = 1042; } extend google.protobuf.MessageOptions { - // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project. + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. // // All IDs are the same, as assigned. It is okay that they are the same, as they extend // different descriptor messages. Schema openapiv2_schema = 1042; } extend google.protobuf.ServiceOptions { - // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project. + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. // // All IDs are the same, as assigned. It is okay that they are the same, as they extend // different descriptor messages. Tag openapiv2_tag = 1042; } extend google.protobuf.FieldOptions { - // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project. + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. // // All IDs are the same, as assigned. It is okay that they are the same, as they extend // different descriptor messages. diff --git a/api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go b/api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go new file mode 100644 index 00000000..e3ef175d --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go @@ -0,0 +1,2790 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.12.0 +// source: protoc-gen-openapiv2/options/openapiv2.proto + +package options + +import ( + proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +type Scheme int32 + +const ( + Scheme_UNKNOWN Scheme = 0 + Scheme_HTTP Scheme = 1 + Scheme_HTTPS Scheme = 2 + Scheme_WS Scheme = 3 + Scheme_WSS Scheme = 4 +) + +// Enum value maps for Scheme. +var ( + Scheme_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP", + 2: "HTTPS", + 3: "WS", + 4: "WSS", + } + Scheme_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP": 1, + "HTTPS": 2, + "WS": 3, + "WSS": 4, + } +) + +func (x Scheme) Enum() *Scheme { + p := new(Scheme) + *p = x + return p +} + +func (x Scheme) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scheme) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() +} + +func (Scheme) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] +} + +func (x Scheme) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Scheme.Descriptor instead. +func (Scheme) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} +} + +type JSONSchema_JSONSchemaSimpleTypes int32 + +const ( + JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 + JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 + JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 + JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 + JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 + JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 + JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 + JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 +) + +// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. +var ( + JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARRAY", + 2: "BOOLEAN", + 3: "INTEGER", + 4: "NULL", + 5: "NUMBER", + 6: "OBJECT", + 7: "STRING", + } + JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ + "UNKNOWN": 0, + "ARRAY": 1, + "BOOLEAN": 2, + "INTEGER": 3, + "NULL": 4, + "NUMBER": 5, + "OBJECT": 6, + "STRING": 7, + } +) + +func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { + p := new(JSONSchema_JSONSchemaSimpleTypes) + *p = x + return p +} + +func (x JSONSchema_JSONSchemaSimpleTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() +} + +func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] +} + +func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead. +func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9, 0} +} + +// The type of the security scheme. Valid values are "basic", +// "apiKey" or "oauth2". +type SecurityScheme_Type int32 + +const ( + SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 + SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 + SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 + SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 +) + +// Enum value maps for SecurityScheme_Type. +var ( + SecurityScheme_Type_name = map[int32]string{ + 0: "TYPE_INVALID", + 1: "TYPE_BASIC", + 2: "TYPE_API_KEY", + 3: "TYPE_OAUTH2", + } + SecurityScheme_Type_value = map[string]int32{ + "TYPE_INVALID": 0, + "TYPE_BASIC": 1, + "TYPE_API_KEY": 2, + "TYPE_OAUTH2": 3, + } +) + +func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { + p := new(SecurityScheme_Type) + *p = x + return p +} + +func (x SecurityScheme_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() +} + +func (SecurityScheme_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] +} + +func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_Type.Descriptor instead. +func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0} +} + +// The location of the API key. Valid values are "query" or "header". +type SecurityScheme_In int32 + +const ( + SecurityScheme_IN_INVALID SecurityScheme_In = 0 + SecurityScheme_IN_QUERY SecurityScheme_In = 1 + SecurityScheme_IN_HEADER SecurityScheme_In = 2 +) + +// Enum value maps for SecurityScheme_In. +var ( + SecurityScheme_In_name = map[int32]string{ + 0: "IN_INVALID", + 1: "IN_QUERY", + 2: "IN_HEADER", + } + SecurityScheme_In_value = map[string]int32{ + "IN_INVALID": 0, + "IN_QUERY": 1, + "IN_HEADER": 2, + } +) + +func (x SecurityScheme_In) Enum() *SecurityScheme_In { + p := new(SecurityScheme_In) + *p = x + return p +} + +func (x SecurityScheme_In) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() +} + +func (SecurityScheme_In) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] +} + +func (x SecurityScheme_In) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_In.Descriptor instead. +func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 1} +} + +// The flow used by the OAuth2 security scheme. Valid values are +// "implicit", "password", "application" or "accessCode". +type SecurityScheme_Flow int32 + +const ( + SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 + SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 + SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 + SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 + SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 +) + +// Enum value maps for SecurityScheme_Flow. +var ( + SecurityScheme_Flow_name = map[int32]string{ + 0: "FLOW_INVALID", + 1: "FLOW_IMPLICIT", + 2: "FLOW_PASSWORD", + 3: "FLOW_APPLICATION", + 4: "FLOW_ACCESS_CODE", + } + SecurityScheme_Flow_value = map[string]int32{ + "FLOW_INVALID": 0, + "FLOW_IMPLICIT": 1, + "FLOW_PASSWORD": 2, + "FLOW_APPLICATION": 3, + "FLOW_ACCESS_CODE": 4, + } +) + +func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { + p := new(SecurityScheme_Flow) + *p = x + return p +} + +func (x SecurityScheme_Flow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() +} + +func (SecurityScheme_Flow) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] +} + +func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_Flow.Descriptor instead. +func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 2} +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: "; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +// +type Swagger struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Security scheme definitions that can be used across the specification. + SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // Additional external documentation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + Extensions map[string]*_struct.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Swagger) Reset() { + *x = Swagger{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Swagger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Swagger) ProtoMessage() {} + +func (x *Swagger) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Swagger.ProtoReflect.Descriptor instead. +func (*Swagger) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} +} + +func (x *Swagger) GetSwagger() string { + if x != nil { + return x.Swagger + } + return "" +} + +func (x *Swagger) GetInfo() *Info { + if x != nil { + return x.Info + } + return nil +} + +func (x *Swagger) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Swagger) GetBasePath() string { + if x != nil { + return x.BasePath + } + return "" +} + +func (x *Swagger) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Swagger) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Swagger) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Swagger) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { + if x != nil { + return x.SecurityDefinitions + } + return nil +} + +func (x *Swagger) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Swagger) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Swagger) GetExtensions() map[string]*_struct.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this operation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // The list of possible responses as they are returned from executing this + // operation. + Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + Extensions map[string]*_struct.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{1} +} + +func (x *Operation) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Operation) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Operation) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Operation) GetOperationId() string { + if x != nil { + return x.OperationId + } + return "" +} + +func (x *Operation) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Operation) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Operation) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Operation) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Operation) GetDeprecated() bool { + if x != nil { + return x.Deprecated + } + return false +} + +func (x *Operation) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Operation) GetExtensions() map[string]*_struct.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +// +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // `Description` is a short description of the header. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + 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_protoc_gen_openapiv2_options_openapiv2_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 Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2} +} + +func (x *Header) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Header) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Header) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *Header) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *Header) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +// +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + Headers map[string]*Header `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"` + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Extensions map[string]*_struct.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + 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_protoc_gen_openapiv2_options_openapiv2_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 Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3} +} + +func (x *Response) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Response) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Response) GetExamples() map[string]string { + if x != nil { + return x.Examples + } + return nil +} + +func (x *Response) GetExtensions() map[string]*_struct.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: "; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// }; +// ... +// }; +// +type Info struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The title of the application. + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the application. GFM syntax can be used for rich + // text representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The Terms of Service for the API. + TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + // The contact information for the exposed API. + Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` + // The license information for the exposed API. + License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` + // Provides the version of the application API (not to be confused + // with the specification version). + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + Extensions map[string]*_struct.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Info) Reset() { + *x = Info{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Info.ProtoReflect.Descriptor instead. +func (*Info) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4} +} + +func (x *Info) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Info) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Info) GetTermsOfService() string { + if x != nil { + return x.TermsOfService + } + return "" +} + +func (x *Info) GetContact() *Contact { + if x != nil { + return x.Contact + } + return nil +} + +func (x *Info) GetLicense() *License { + if x != nil { + return x.License + } + return nil +} + +func (x *Info) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Info) GetExtensions() map[string]*_struct.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +// +type Contact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The identifying name of the contact person/organization. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The URL pointing to the contact information. MUST be in the format of a + // URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // The email address of the contact person/organization. MUST be in the format + // of an email address. + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` +} + +func (x *Contact) Reset() { + *x = Contact{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Contact.ProtoReflect.Descriptor instead. +func (*Contact) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5} +} + +func (x *Contact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Contact) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Contact) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// ... +// }; +// ... +// }; +// +type License struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The license name used for the API. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL to the license used for the API. MUST be in the format of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *License) Reset() { + *x = License{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *License) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*License) ProtoMessage() {} + +func (x *License) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 License.ProtoReflect.Descriptor instead. +func (*License) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6} +} + +func (x *License) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *License) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +// +type ExternalDocumentation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The URL for the target documentation. Value MUST be in the format + // of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *ExternalDocumentation) Reset() { + *x = ExternalDocumentation{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExternalDocumentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 ExternalDocumentation.ProtoReflect.Descriptor instead. +func (*ExternalDocumentation) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7} +} + +func (x *ExternalDocumentation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ExternalDocumentation) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +type Schema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` +} + +func (x *Schema) Reset() { + *x = Schema{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Schema.ProtoReflect.Descriptor instead. +func (*Schema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8} +} + +func (x *Schema) GetJsonSchema() *JSONSchema { + if x != nil { + return x.JsonSchema + } + return nil +} + +func (x *Schema) GetDiscriminator() string { + if x != nil { + return x.Discriminator + } + return "" +} + +func (x *Schema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *Schema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Schema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// {description: "The unique identifier of the simple message." +// }]; +// } +// +type JSONSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // `ref: ".google.protobuf.Timestamp"`. + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + // The title of the schema. + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the schema. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` + ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` + MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` + MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` + Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` + // Items in 'array' must be unique. + Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` + Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` + // `Format` + Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` +} + +func (x *JSONSchema) Reset() { + *x = JSONSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JSONSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema) ProtoMessage() {} + +func (x *JSONSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 JSONSchema.ProtoReflect.Descriptor instead. +func (*JSONSchema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9} +} + +func (x *JSONSchema) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *JSONSchema) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *JSONSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *JSONSchema) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *JSONSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *JSONSchema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *JSONSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf + } + return 0 +} + +func (x *JSONSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum + } + return false +} + +func (x *JSONSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum + } + return false +} + +func (x *JSONSchema) GetMaxLength() uint64 { + if x != nil { + return x.MaxLength + } + return 0 +} + +func (x *JSONSchema) GetMinLength() uint64 { + if x != nil { + return x.MinLength + } + return 0 +} + +func (x *JSONSchema) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *JSONSchema) GetMaxItems() uint64 { + if x != nil { + return x.MaxItems + } + return 0 +} + +func (x *JSONSchema) GetMinItems() uint64 { + if x != nil { + return x.MinItems + } + return 0 +} + +func (x *JSONSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems + } + return false +} + +func (x *JSONSchema) GetMaxProperties() uint64 { + if x != nil { + return x.MaxProperties + } + return 0 +} + +func (x *JSONSchema) GetMinProperties() uint64 { + if x != nil { + return x.MinProperties + } + return 0 +} + +func (x *JSONSchema) GetRequired() []string { + if x != nil { + return x.Required + } + return nil +} + +func (x *JSONSchema) GetArray() []string { + if x != nil { + return x.Array + } + return nil +} + +func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { + if x != nil { + return x.Type + } + return nil +} + +func (x *JSONSchema) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *JSONSchema) GetEnum() []string { + if x != nil { + return x.Enum + } + return nil +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +// +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A short description for the tag. GFM syntax can be used for rich text + // representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this tag. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` +} + +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10} +} + +func (x *Tag) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Tag) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +type SecurityDefinitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SecurityDefinitions) Reset() { + *x = SecurityDefinitions{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityDefinitions) ProtoMessage() {} + +func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityDefinitions.ProtoReflect.Descriptor instead. +func (*SecurityDefinitions) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11} +} + +func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { + if x != nil { + return x.Security + } + return nil +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +type SecurityScheme struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` + // A short description for security scheme. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The name of the header or query parameter to be used. + // Valid for apiKey. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` + Extensions map[string]*_struct.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SecurityScheme) Reset() { + *x = SecurityScheme{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityScheme) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityScheme) ProtoMessage() {} + +func (x *SecurityScheme) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityScheme.ProtoReflect.Descriptor instead. +func (*SecurityScheme) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12} +} + +func (x *SecurityScheme) GetType() SecurityScheme_Type { + if x != nil { + return x.Type + } + return SecurityScheme_TYPE_INVALID +} + +func (x *SecurityScheme) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SecurityScheme) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecurityScheme) GetIn() SecurityScheme_In { + if x != nil { + return x.In + } + return SecurityScheme_IN_INVALID +} + +func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { + if x != nil { + return x.Flow + } + return SecurityScheme_FLOW_INVALID +} + +func (x *SecurityScheme) GetAuthorizationUrl() string { + if x != nil { + return x.AuthorizationUrl + } + return "" +} + +func (x *SecurityScheme) GetTokenUrl() string { + if x != nil { + return x.TokenUrl + } + return "" +} + +func (x *SecurityScheme) GetScopes() *Scopes { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *SecurityScheme) GetExtensions() map[string]*_struct.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +type SecurityRequirement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SecurityRequirement) Reset() { + *x = SecurityRequirement{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityRequirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement) ProtoMessage() {} + +func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityRequirement.ProtoReflect.Descriptor instead. +func (*SecurityRequirement) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13} +} + +func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { + if x != nil { + return x.SecurityRequirement + } + return nil +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +type Scopes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maps between a name of a scope to a short description of it (as the value + // of the property). + Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Scopes) Reset() { + *x = Scopes{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Scopes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scopes) ProtoMessage() {} + +func (x *Scopes) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Scopes.ProtoReflect.Descriptor instead. +func (*Scopes) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14} +} + +func (x *Scopes) GetScope() map[string]string { + if x != nil { + return x.Scope + } + return nil +} + +// If the security scheme is of type "oauth2", then the value is a list of +// scope names required for the execution. For other security scheme types, +// the array MUST be empty. +type SecurityRequirement_SecurityRequirementValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` +} + +func (x *SecurityRequirement_SecurityRequirementValue) Reset() { + *x = SecurityRequirement_SecurityRequirementValue{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityRequirement_SecurityRequirementValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} + +func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] + 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 SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead. +func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13, 0} +} + +func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x07, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, + 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, + 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x22, + 0xff, 0x06, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x65, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, + 0x61, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x5a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x44, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, + 0x09, 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, + 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, + 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, + 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, + 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 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, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 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, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, + 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, + 0x65, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, + 0x6a, 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, + 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x22, 0xdf, 0x07, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, + 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, + 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, + 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, + 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, + 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, + 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, + 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, + 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, + 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0b, 0x0a, + 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, + 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, + 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, + 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x1b, + 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x4a, 0x04, + 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, + 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0x94, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xf7, 0x01, + 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, + 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, + 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, + 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, + 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, + 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, + 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, + 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, + 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, + 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, + 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, + 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 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, 0x2a, 0x3b, 0x0a, 0x06, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, + 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce sync.Once + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc +) + +func file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP() []byte { + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce.Do(func() { + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData) + }) + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData +} + +var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []interface{}{ + (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme + (JSONSchema_JSONSchemaSimpleTypes)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + (SecurityScheme_Type)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + (SecurityScheme_In)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + (SecurityScheme_Flow)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Header)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Header + (*Response)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Response + (*Info)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.Info + (*Contact)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Contact + (*License)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.License + (*ExternalDocumentation)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + (*Schema)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*JSONSchema)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + (*Tag)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*SecurityDefinitions)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + (*SecurityScheme)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + (*SecurityRequirement)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + (*Scopes)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Scopes + nil, // 20: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + nil, // 21: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + nil, // 22: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + nil, // 23: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + (*SecurityRequirement_SecurityRequirementValue)(nil), // 30: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + (*_struct.Value)(nil), // 33: google.protobuf.Value +} +var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ + 9, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info + 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 20, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + 16, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + 18, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 12, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 21, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + 12, // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 22, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + 0, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 18, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 23, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + 13, // 12: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 24, // 13: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + 25, // 14: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + 26, // 15: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + 10, // 16: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact + 11, // 17: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License + 27, // 18: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + 14, // 19: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 12, // 20: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 1, // 21: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + 12, // 22: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 28, // 23: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + 2, // 24: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + 3, // 25: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + 4, // 26: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + 19, // 27: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes + 29, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + 31, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + 32, // 30: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + 8, // 31: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 33, // 32: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value + 8, // 33: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 33, // 34: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value + 7, // 35: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header + 33, // 36: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value + 33, // 37: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value + 17, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + 33, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value + 30, // 40: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + 41, // [41:41] is the sub-list for method output_type + 41, // [41:41] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } +func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { + if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Swagger); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2].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_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3].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_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*License); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalDocumentation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityScheme); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Scopes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement_SecurityRequirementValue); 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_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, + NumEnums: 5, + NumMessages: 28, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, + EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, + MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, + }.Build() + File_protoc_gen_openapiv2_options_openapiv2_proto = out.File + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil +} diff --git a/api/third_party/protoc-gen-openapiv2/options/openapiv2.proto b/api/third_party/protoc-gen-openapiv2/options/openapiv2.proto new file mode 100644 index 00000000..7be1fb57 --- /dev/null +++ b/api/third_party/protoc-gen-openapiv2/options/openapiv2.proto @@ -0,0 +1,645 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +import "google/protobuf/struct.proto"; + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +enum Scheme { + UNKNOWN = 0; + HTTP = 1; + HTTPS = 2; + WS = 3; + WSS = 4; +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: "; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +// +message Swagger { + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + string swagger = 1; + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info info = 2; + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + string host = 3; + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + string base_path = 4; + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + repeated Scheme schemes = 5; + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string consumes = 6; + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'paths'. + reserved 8; + // field 9 is reserved for 'definitions', which at this time are already + // exposed as and customizable as proto messages. + reserved 9; + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + map responses = 10; + // Security scheme definitions that can be used across the specification. + SecurityDefinitions security_definitions = 11; + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + repeated SecurityRequirement security = 12; + // field 13 is reserved for 'tags', which are supposed to be exposed as and + // customizable as proto services. TODO(ivucica): add processing of proto + // service objects into OpenAPI v2 Tag objects. + reserved 13; + // Additional external documentation. + ExternalDocumentation external_docs = 14; + map extensions = 15; +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +message Operation { + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + repeated string tags = 1; + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + string summary = 2; + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + string description = 3; + // Additional external documentation for this operation. + ExternalDocumentation external_docs = 4; + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + string operation_id = 5; + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string consumes = 6; + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'parameters'. + reserved 8; + // The list of possible responses as they are returned from executing this + // operation. + map responses = 9; + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + repeated Scheme schemes = 10; + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + bool deprecated = 11; + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + repeated SecurityRequirement security = 12; + map extensions = 13; +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +// +message Header { + // `Description` is a short description of the header. + string description = 1; + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + string type = 2; + // `Format` The extending format for the previously mentioned type. + string format = 3; + // field 4 is reserved for 'items', but in OpenAPI-specific way. + reserved 4; + // field 5 is reserved `Collection Format` Determines the format of the array if type array is used. + reserved 5; + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + string default = 6; + // field 7 is reserved for 'maximum'. + reserved 7; + // field 8 is reserved for 'exclusiveMaximum'. + reserved 8; + // field 9 is reserved for 'minimum'. + reserved 9; + // field 10 is reserved for 'exclusiveMinimum'. + reserved 10; + // field 11 is reserved for 'maxLength'. + reserved 11; + // field 12 is reserved for 'minLength'. + reserved 12; + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + string pattern = 13; + // field 14 is reserved for 'maxItems'. + reserved 14; + // field 15 is reserved for 'minItems'. + reserved 15; + // field 16 is reserved for 'uniqueItems'. + reserved 16; + // field 17 is reserved for 'enum'. + reserved 17; + // field 18 is reserved for 'multipleOf'. + reserved 18; +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +// +message Response { + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + string description = 1; + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema schema = 2; + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + map headers = 3; + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + map examples = 4; + map extensions = 5; +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: "; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// }; +// ... +// }; +// +message Info { + // The title of the application. + string title = 1; + // A short description of the application. GFM syntax can be used for rich + // text representation. + string description = 2; + // The Terms of Service for the API. + string terms_of_service = 3; + // The contact information for the exposed API. + Contact contact = 4; + // The license information for the exposed API. + License license = 5; + // Provides the version of the application API (not to be confused + // with the specification version). + string version = 6; + map extensions = 7; +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +// +message Contact { + // The identifying name of the contact person/organization. + string name = 1; + // The URL pointing to the contact information. MUST be in the format of a + // URL. + string url = 2; + // The email address of the contact person/organization. MUST be in the format + // of an email address. + string email = 3; +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// ... +// }; +// ... +// }; +// +message License { + // The license name used for the API. + string name = 1; + // A URL to the license used for the API. MUST be in the format of a URL. + string url = 2; +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +// +message ExternalDocumentation { + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + string description = 1; + // The URL for the target documentation. Value MUST be in the format + // of a URL. + string url = 2; +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +message Schema { + JSONSchema json_schema = 1; + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + string discriminator = 2; + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + bool read_only = 3; + // field 4 is reserved for 'xml'. + reserved 4; + // Additional external documentation for this schema. + ExternalDocumentation external_docs = 5; + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + string example = 6; +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// {description: "The unique identifier of the simple message." +// }]; +// } +// +message JSONSchema { + // field 1 is reserved for '$id', omitted from OpenAPI v2. + reserved 1; + // field 2 is reserved for '$schema', omitted from OpenAPI v2. + reserved 2; + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // `ref: ".google.protobuf.Timestamp"`. + string ref = 3; + // field 4 is reserved for '$comment', omitted from OpenAPI v2. + reserved 4; + // The title of the schema. + string title = 5; + // A short description of the schema. + string description = 6; + string default = 7; + bool read_only = 8; + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + string example = 9; + double multiple_of = 10; + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + double maximum = 11; + bool exclusive_maximum = 12; + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + double minimum = 13; + bool exclusive_minimum = 14; + uint64 max_length = 15; + uint64 min_length = 16; + string pattern = 17; + // field 18 is reserved for 'additionalItems', omitted from OpenAPI v2. + reserved 18; + // field 19 is reserved for 'items', but in OpenAPI-specific way. + // TODO(ivucica): add 'items'? + reserved 19; + uint64 max_items = 20; + uint64 min_items = 21; + bool unique_items = 22; + // field 23 is reserved for 'contains', omitted from OpenAPI v2. + reserved 23; + uint64 max_properties = 24; + uint64 min_properties = 25; + repeated string required = 26; + // field 27 is reserved for 'additionalProperties', but in OpenAPI-specific + // way. TODO(ivucica): add 'additionalProperties'? + reserved 27; + // field 28 is reserved for 'definitions', omitted from OpenAPI v2. + reserved 28; + // field 29 is reserved for 'properties', but in OpenAPI-specific way. + // TODO(ivucica): add 'additionalProperties'? + reserved 29; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // patternProperties, dependencies, propertyNames, const + reserved 30 to 33; + // Items in 'array' must be unique. + repeated string array = 34; + + enum JSONSchemaSimpleTypes { + UNKNOWN = 0; + ARRAY = 1; + BOOLEAN = 2; + INTEGER = 3; + NULL = 4; + NUMBER = 5; + OBJECT = 6; + STRING = 7; + } + + repeated JSONSchemaSimpleTypes type = 35; + // `Format` + string format = 36; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: contentMediaType, contentEncoding, if, then, else + reserved 37 to 41; + // field 42 is reserved for 'allOf', but in OpenAPI-specific way. + // TODO(ivucica): add 'allOf'? + reserved 42; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // anyOf, oneOf, not + reserved 43 to 45; + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + repeated string enum = 46; +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +// +message Tag { + // field 1 is reserved for 'name'. In our generator, this is (to be) extracted + // from the name of proto service, and thus not exposed to the user, as + // changing tag object's name would break the link to the references to the + // tag in individual operation specifications. + // + // TODO(ivucica): Add 'name' property. Use it to allow override of the name of + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + reserved 1; + // A short description for the tag. GFM syntax can be used for rich text + // representation. + string description = 2; + // Additional external documentation for this tag. + ExternalDocumentation external_docs = 3; +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +message SecurityDefinitions { + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + map security = 1; +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +message SecurityScheme { + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + enum Type { + TYPE_INVALID = 0; + TYPE_BASIC = 1; + TYPE_API_KEY = 2; + TYPE_OAUTH2 = 3; + } + + // The location of the API key. Valid values are "query" or "header". + enum In { + IN_INVALID = 0; + IN_QUERY = 1; + IN_HEADER = 2; + } + + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + enum Flow { + FLOW_INVALID = 0; + FLOW_IMPLICIT = 1; + FLOW_PASSWORD = 2; + FLOW_APPLICATION = 3; + FLOW_ACCESS_CODE = 4; + } + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type type = 1; + // A short description for security scheme. + string description = 2; + // The name of the header or query parameter to be used. + // Valid for apiKey. + string name = 3; + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In in = 4; + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow flow = 5; + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + string authorization_url = 6; + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + string token_url = 7; + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes scopes = 8; + map extensions = 9; +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +message SecurityRequirement { + // If the security scheme is of type "oauth2", then the value is a list of + // scope names required for the execution. For other security scheme types, + // the array MUST be empty. + message SecurityRequirementValue { + repeated string scope = 1; + } + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + map security_requirement = 1; +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +message Scopes { + // Maps between a name of a scope to a short description of it (as the value + // of the property). + map scope = 1; +} diff --git a/api/third_party/protoc-gen-swagger/options/openapiv2.proto b/api/third_party/protoc-gen-swagger/options/openapiv2.proto deleted file mode 100755 index 3dcac4d9..00000000 --- a/api/third_party/protoc-gen-swagger/options/openapiv2.proto +++ /dev/null @@ -1,380 +0,0 @@ -syntax = "proto3"; - -package grpc.gateway.protoc_gen_swagger.options; - -option go_package = "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject -// -// TODO(ivucica): document fields -message Swagger { - string swagger = 1; - Info info = 2; - string host = 3; - // `base_path` is the common prefix path used on all API endpoints (ie. /api, /v1, etc.). By adding this, - // it allows you to remove this portion from the path endpoints in your Swagger file making them easier - // to read. Note that using `base_path` does not change the endpoint paths that are generated in the resulting - // Swagger file. If you wish to use `base_path` with relatively generated Swagger paths, the - // `base_path` prefix must be manually removed from your `google.api.http` paths and your code changed to - // serve the API from the `base_path`. - string base_path = 4; - enum SwaggerScheme { - UNKNOWN = 0; - HTTP = 1; - HTTPS = 2; - WS = 3; - WSS = 4; - } - repeated SwaggerScheme schemes = 5; - repeated string consumes = 6; - repeated string produces = 7; - // field 8 is reserved for 'paths'. - reserved 8; - // field 9 is reserved for 'definitions', which at this time are already - // exposed as and customizable as proto messages. - reserved 9; - map responses = 10; - SecurityDefinitions security_definitions = 11; - repeated SecurityRequirement security = 12; - // field 13 is reserved for 'tags', which are supposed to be exposed as and - // customizable as proto services. TODO(ivucica): add processing of proto - // service objects into OpenAPI v2 Tag objects. - reserved 13; - ExternalDocumentation external_docs = 14; - map extensions = 15; -} - -// `Operation` is a representation of OpenAPI v2 specification's Operation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject -// -// TODO(ivucica): document fields -message Operation { - repeated string tags = 1; - string summary = 2; - string description = 3; - ExternalDocumentation external_docs = 4; - string operation_id = 5; - repeated string consumes = 6; - repeated string produces = 7; - // field 8 is reserved for 'parameters'. - reserved 8; - map responses = 9; - repeated string schemes = 10; - bool deprecated = 11; - repeated SecurityRequirement security = 12; - map extensions = 13; -} - -// `Response` is a representation of OpenAPI v2 specification's Response object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject -// -message Response { - // `Description` is a short description of the response. - // GFM syntax can be used for rich text representation. - string description = 1; - // `Schema` optionally defines the structure of the response. - // If `Schema` is not provided, it means there is no content to the response. - Schema schema = 2; - // field 3 is reserved for 'headers'. - reserved 3; - // `Examples` gives per-mimetype response examples. - // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object - map examples = 4; - map extensions = 5; -} - -// `Info` is a representation of OpenAPI v2 specification's Info object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject -// -// TODO(ivucica): document fields -message Info { - string title = 1; - string description = 2; - string terms_of_service = 3; - Contact contact = 4; - License license = 5; - string version = 6; - map extensions = 7; -} - -// `Contact` is a representation of OpenAPI v2 specification's Contact object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject -// -// TODO(ivucica): document fields -message Contact { - string name = 1; - string url = 2; - string email = 3; -} - -// `License` is a representation of OpenAPI v2 specification's License object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject -// -message License { - // Required. The license name used for the API. - string name = 1; - // A URL to the license used for the API. - string url = 2; -} - -// `ExternalDocumentation` is a representation of OpenAPI v2 specification's -// ExternalDocumentation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject -// -// TODO(ivucica): document fields -message ExternalDocumentation { - string description = 1; - string url = 2; -} - -// `Schema` is a representation of OpenAPI v2 specification's Schema object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -// TODO(ivucica): document fields -message Schema { - JSONSchema json_schema = 1; - string discriminator = 2; - bool read_only = 3; - // field 4 is reserved for 'xml'. - reserved 4; - ExternalDocumentation external_docs = 5; - google.protobuf.Any example = 6; -} - -// `JSONSchema` represents properties from JSON Schema taken, and as used, in -// the OpenAPI v2 spec. -// -// This includes changes made by OpenAPI v2. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, -// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json -// -// TODO(ivucica): document fields -message JSONSchema { - // field 1 is reserved for '$id', omitted from OpenAPI v2. - reserved 1; - // field 2 is reserved for '$schema', omitted from OpenAPI v2. - reserved 2; - // Ref is used to define an external reference to include in the message. - // This could be a fully qualified proto message reference, and that type must be imported - // into the protofile. If no message is identified, the Ref will be used verbatim in - // the output. - // For example: - // `ref: ".google.protobuf.Timestamp"`. - string ref = 3; - // field 4 is reserved for '$comment', omitted from OpenAPI v2. - reserved 4; - string title = 5; - string description = 6; - string default = 7; - bool read_only = 8; - // field 9 is reserved for 'examples', which is omitted from OpenAPI v2 in favor of 'example' field. - reserved 9; - double multiple_of = 10; - double maximum = 11; - bool exclusive_maximum = 12; - double minimum = 13; - bool exclusive_minimum = 14; - uint64 max_length = 15; - uint64 min_length = 16; - string pattern = 17; - // field 18 is reserved for 'additionalItems', omitted from OpenAPI v2. - reserved 18; - // field 19 is reserved for 'items', but in OpenAPI-specific way. TODO(ivucica): add 'items'? - reserved 19; - uint64 max_items = 20; - uint64 min_items = 21; - bool unique_items = 22; - // field 23 is reserved for 'contains', omitted from OpenAPI v2. - reserved 23; - uint64 max_properties = 24; - uint64 min_properties = 25; - repeated string required = 26; - // field 27 is reserved for 'additionalProperties', but in OpenAPI-specific way. TODO(ivucica): add 'additionalProperties'? - reserved 27; - // field 28 is reserved for 'definitions', omitted from OpenAPI v2. - reserved 28; - // field 29 is reserved for 'properties', but in OpenAPI-specific way. TODO(ivucica): add 'additionalProperties'? - reserved 29; - // following fields are reserved, as the properties have been omitted from OpenAPI v2: - // patternProperties, dependencies, propertyNames, const - reserved 30 to 33; - // Items in 'array' must be unique. - repeated string array = 34; - - enum JSONSchemaSimpleTypes { - UNKNOWN = 0; - ARRAY = 1; - BOOLEAN = 2; - INTEGER = 3; - NULL = 4; - NUMBER = 5; - OBJECT = 6; - STRING = 7; - } - - repeated JSONSchemaSimpleTypes type = 35; - // following fields are reserved, as the properties have been omitted from OpenAPI v2: - // format, contentMediaType, contentEncoding, if, then, else - reserved 36 to 41; - // field 42 is reserved for 'allOf', but in OpenAPI-specific way. TODO(ivucica): add 'allOf'? - reserved 42; - // following fields are reserved, as the properties have been omitted from OpenAPI v2: - // anyOf, oneOf, not - reserved 43 to 45; -} - -// `Tag` is a representation of OpenAPI v2 specification's Tag object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject -// -// TODO(ivucica): document fields -message Tag { - // field 1 is reserved for 'name'. In our generator, this is (to be) extracted - // from the name of proto service, and thus not exposed to the user, as - // changing tag object's name would break the link to the references to the - // tag in individual operation specifications. - // - // TODO(ivucica): Add 'name' property. Use it to allow override of the name of - // global Tag object, then use that name to reference the tag throughout the - // Swagger file. - reserved 1; - // TODO(ivucica): Description should be extracted from comments on the proto - // service object. - string description = 2; - ExternalDocumentation external_docs = 3; -} - -// `SecurityDefinitions` is a representation of OpenAPI v2 specification's -// Security Definitions object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject -// -// A declaration of the security schemes available to be used in the -// specification. This does not enforce the security schemes on the operations -// and only serves to provide the relevant details for each scheme. -message SecurityDefinitions { - // A single security scheme definition, mapping a "name" to the scheme it defines. - map security = 1; -} - -// `SecurityScheme` is a representation of OpenAPI v2 specification's -// Security Scheme object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject -// -// Allows the definition of a security scheme that can be used by the -// operations. Supported schemes are basic authentication, an API key (either as -// a header or as a query parameter) and OAuth2's common flows (implicit, -// password, application and access code). -message SecurityScheme { - // Required. The type of the security scheme. Valid values are "basic", - // "apiKey" or "oauth2". - enum Type { - TYPE_INVALID = 0; - TYPE_BASIC = 1; - TYPE_API_KEY = 2; - TYPE_OAUTH2 = 3; - } - - // Required. The location of the API key. Valid values are "query" or "header". - enum In { - IN_INVALID = 0; - IN_QUERY = 1; - IN_HEADER = 2; - } - - // Required. The flow used by the OAuth2 security scheme. Valid values are - // "implicit", "password", "application" or "accessCode". - enum Flow { - FLOW_INVALID = 0; - FLOW_IMPLICIT = 1; - FLOW_PASSWORD = 2; - FLOW_APPLICATION = 3; - FLOW_ACCESS_CODE = 4; - } - - // Required. The type of the security scheme. Valid values are "basic", - // "apiKey" or "oauth2". - Type type = 1; - // A short description for security scheme. - string description = 2; - // Required. The name of the header or query parameter to be used. - // - // Valid for apiKey. - string name = 3; - // Required. The location of the API key. Valid values are "query" or "header". - // - // Valid for apiKey. - In in = 4; - // Required. The flow used by the OAuth2 security scheme. Valid values are - // "implicit", "password", "application" or "accessCode". - // - // Valid for oauth2. - Flow flow = 5; - // Required. The authorization URL to be used for this flow. This SHOULD be in - // the form of a URL. - // - // Valid for oauth2/implicit and oauth2/accessCode. - string authorization_url = 6; - // Required. The token URL to be used for this flow. This SHOULD be in the - // form of a URL. - // - // Valid for oauth2/password, oauth2/application and oauth2/accessCode. - string token_url = 7; - // Required. The available scopes for the OAuth2 security scheme. - // - // Valid for oauth2. - Scopes scopes = 8; - map extensions = 9; -} - -// `SecurityRequirement` is a representation of OpenAPI v2 specification's -// Security Requirement object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject -// -// Lists the required security schemes to execute this operation. The object can -// have multiple security schemes declared in it which are all required (that -// is, there is a logical AND between the schemes). -// -// The name used for each property MUST correspond to a security scheme -// declared in the Security Definitions. -message SecurityRequirement { - // If the security scheme is of type "oauth2", then the value is a list of - // scope names required for the execution. For other security scheme types, - // the array MUST be empty. - message SecurityRequirementValue { - repeated string scope = 1; - } - // Each name must correspond to a security scheme which is declared in - // the Security Definitions. If the security scheme is of type "oauth2", - // then the value is a list of scope names required for the execution. - // For other security scheme types, the array MUST be empty. - map security_requirement = 1; -} - -// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject -// -// Lists the available scopes for an OAuth2 security scheme. -message Scopes { - // Maps between a name of a scope to a short description of it (as the value - // of the property). - map scope = 1; -} diff --git a/main.go b/main.go index 7241a6f4..f60c8f4c 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/jmoiron/sqlx" "github.com/onepanelio/core/api" migrations "github.com/onepanelio/core/db/go" @@ -171,17 +171,18 @@ func startHTTPProxy() { opts := []grpc.DialOption{grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(math.MaxInt64), grpc.MaxCallRecvMsgSize(math.MaxInt64))} - registerHandler(api.RegisterWorkflowTemplateServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterWorkflowServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterCronWorkflowServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterSecretServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterNamespaceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterAuthServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterLabelServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterWorkspaceTemplateServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterWorkspaceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterConfigServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) - registerHandler(api.RegisterServiceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + api.RegisterWorkflowTemplateServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterWorkflowTemplateServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterWorkflowServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterCronWorkflowServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterSecretServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterNamespaceServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterAuthServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterLabelServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterWorkspaceTemplateServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterWorkspaceServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterConfigServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + api.RegisterServiceServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) log.Printf("Starting HTTP proxy on port %v", *httpPort) diff --git a/server/auth_server.go b/server/auth_server.go index 70ddca9d..0fc52bf9 100644 --- a/server/auth_server.go +++ b/server/auth_server.go @@ -14,6 +14,7 @@ import ( // AuthServer contains logic for checking Authorization of resources in the system type AuthServer struct { + api.UnimplementedAuthServiceServer } // NewAuthServer creates a new AuthServer diff --git a/server/config_server.go b/server/config_server.go index abfa3c7c..a4ba63da 100644 --- a/server/config_server.go +++ b/server/config_server.go @@ -8,7 +8,9 @@ import ( ) // ConfigServer contains actions for system configuration related items -type ConfigServer struct{} +type ConfigServer struct { + api.UnimplementedConfigServiceServer +} // NewConfigServer creates a new ConfigServer func NewConfigServer() *ConfigServer { diff --git a/server/cron_workflow_server.go b/server/cron_workflow_server.go index f79da934..a75a3c79 100644 --- a/server/cron_workflow_server.go +++ b/server/cron_workflow_server.go @@ -11,7 +11,9 @@ import ( "github.com/onepanelio/core/server/converter" ) -type CronWorkflowServer struct{} +type CronWorkflowServer struct { + api.UnimplementedCronWorkflowServiceServer +} func NewCronWorkflowServer() *CronWorkflowServer { return &CronWorkflowServer{} diff --git a/server/label_server.go b/server/label_server.go index eaa27b4f..debd26c9 100644 --- a/server/label_server.go +++ b/server/label_server.go @@ -49,7 +49,9 @@ func mapKeyValuesToMap(keyValues []*api.KeyValue) map[string]string { return result } -type LabelServer struct{} +type LabelServer struct { + api.UnimplementedLabelServiceServer +} func NewLabelServer() *LabelServer { return &LabelServer{} diff --git a/server/namespace_server.go b/server/namespace_server.go index 5b0521c3..9bcd09de 100644 --- a/server/namespace_server.go +++ b/server/namespace_server.go @@ -10,7 +10,9 @@ import ( "github.com/onepanelio/core/server/auth" ) -type NamespaceServer struct{} +type NamespaceServer struct { + api.UnimplementedNamespaceServiceServer +} func NewNamespaceServer() *NamespaceServer { return &NamespaceServer{} diff --git a/server/secret_server.go b/server/secret_server.go index 66540852..4aabc2ff 100644 --- a/server/secret_server.go +++ b/server/secret_server.go @@ -9,7 +9,9 @@ import ( "github.com/onepanelio/core/server/auth" ) -type SecretServer struct{} +type SecretServer struct { + api.UnimplementedSecretServiceServer +} func NewSecretServer() *SecretServer { return &SecretServer{} diff --git a/server/service_server.go b/server/service_server.go index 8d80307d..130660db 100644 --- a/server/service_server.go +++ b/server/service_server.go @@ -8,7 +8,9 @@ import ( ) // ServiceServer contains actions for installed services -type ServiceServer struct{} +type ServiceServer struct { + api.UnimplementedServiceServiceServer +} // NewServiceServer creates a new ServiceServer func NewServiceServer() *ServiceServer { diff --git a/server/workflow_server.go b/server/workflow_server.go index bb9c5577..57747573 100644 --- a/server/workflow_server.go +++ b/server/workflow_server.go @@ -9,6 +9,7 @@ import ( "github.com/onepanelio/core/pkg/util/request/pagination" "github.com/onepanelio/core/pkg/util/router" "github.com/onepanelio/core/server/converter" + log "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sort" @@ -24,7 +25,9 @@ import ( requestSort "github.com/onepanelio/core/pkg/util/request/sort" ) -type WorkflowServer struct{} +type WorkflowServer struct { + api.UnimplementedWorkflowServiceServer +} func NewWorkflowServer() *WorkflowServer { return &WorkflowServer{} @@ -217,6 +220,7 @@ func (s *WorkflowServer) WatchWorkflowExecution(req *api.WatchWorkflowExecutionR } wf.Namespace = req.Namespace if err := stream.Send(apiWorkflowExecution(wf, webRouter)); err != nil { + log.Printf("Stream Send failed: %v\n", err) return err } } diff --git a/server/workflow_template_server.go b/server/workflow_template_server.go index 5c5003a8..065e115c 100644 --- a/server/workflow_template_server.go +++ b/server/workflow_template_server.go @@ -11,7 +11,9 @@ import ( "github.com/onepanelio/core/server/converter" ) -type WorkflowTemplateServer struct{} +type WorkflowTemplateServer struct { + api.UnimplementedWorkflowTemplateServiceServer +} func NewWorkflowTemplateServer() *WorkflowTemplateServer { return &WorkflowTemplateServer{} diff --git a/server/workspace_server.go b/server/workspace_server.go index df407263..eb321409 100644 --- a/server/workspace_server.go +++ b/server/workspace_server.go @@ -21,7 +21,9 @@ var reservedWorkspaceNames = map[string]bool{ "modeldb": true, } -type WorkspaceServer struct{} +type WorkspaceServer struct { + api.UnimplementedWorkspaceServiceServer +} func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace { protocol := config.APIProtocol() diff --git a/server/workspace_template_server.go b/server/workspace_template_server.go index 21c18017..6d72d44e 100644 --- a/server/workspace_template_server.go +++ b/server/workspace_template_server.go @@ -14,7 +14,9 @@ import ( "time" ) -type WorkspaceTemplateServer struct{} +type WorkspaceTemplateServer struct { + api.UnimplementedWorkspaceTemplateServiceServer +} func apiWorkspaceTemplate(wt *v1.WorkspaceTemplate) *api.WorkspaceTemplate { res := &api.WorkspaceTemplate{ From 2931d5e7542db3aa3febe1da1a8ef2ef9102d3d3 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 15:46:34 -0800 Subject: [PATCH 57/80] update: fixed missing generated files for grpc and moved generated files into their own subdirectory for easier separation of files. --- Makefile | 10 +- api/api.pb.go | 86 - api/api.swagger.json | 380 +-- api/auth.pb.go | 819 ----- api/auth.pb.gw.go | 319 -- api/common.pb.go | 287 -- api/config.pb.go | 422 --- api/config.pb.gw.go | 148 - api/cron_workflow.pb.go | 1003 ------ api/cron_workflow.pb.gw.go | 823 ----- api/label.pb.go | 1019 ------ api/label.pb.gw.go | 842 ----- api/metric.pb.go | 164 - api/namespace.pb.go | 538 ---- api/namespace.pb.gw.go | 240 -- api/{ => proto}/api.proto | 1 + api/{ => proto}/auth.proto | 1 + api/{ => proto}/common.proto | 1 + api/{ => proto}/config.proto | 1 + api/{ => proto}/cron_workflow.proto | 1 + api/{ => proto}/label.proto | 1 + api/{ => proto}/metric.proto | 1 + api/{ => proto}/namespace.proto | 1 + api/{ => proto}/secret.proto | 1 + api/{ => proto}/services.proto | 2 +- api/{ => proto}/workflow.proto | 1 + api/{ => proto}/workflow_template.proto | 1 + api/{ => proto}/workspace.proto | 2 + api/{ => proto}/workspace_template.proto | 2 +- api/secret.pb.go | 1564 --------- api/secret.pb.gw.go | 1071 ------- api/services.pb.go | 557 ---- api/services.pb.gw.go | 318 -- api/workflow.pb.go | 3681 ---------------------- api/workflow.pb.gw.go | 2172 ------------- api/workflow.swagger.json | 809 ----- api/workflow_template.pb.go | 1769 ----------- api/workflow_template.pb.gw.go | 1286 -------- api/workspace.pb.go | 2213 ------------- api/workspace.pb.gw.go | 1282 -------- api/workspace_template.pb.go | 1428 --------- api/workspace_template.pb.gw.go | 959 ------ main.go | 2 +- server/auth/auth.go | 2 +- server/auth_server.go | 2 +- server/config_server.go | 2 +- server/converter/converter.go | 2 +- server/cron_workflow_server.go | 2 +- server/label_server.go | 2 +- server/namespace_server.go | 2 +- server/secret_server.go | 2 +- server/service_server.go | 2 +- server/workflow_server.go | 2 +- server/workflow_template_server.go | 2 +- server/workspace_server.go | 2 +- server/workspace_template_server.go | 2 +- 56 files changed, 207 insertions(+), 26047 deletions(-) delete mode 100644 api/api.pb.go delete mode 100644 api/auth.pb.go delete mode 100644 api/auth.pb.gw.go delete mode 100644 api/common.pb.go delete mode 100644 api/config.pb.go delete mode 100644 api/config.pb.gw.go delete mode 100644 api/cron_workflow.pb.go delete mode 100644 api/cron_workflow.pb.gw.go delete mode 100644 api/label.pb.go delete mode 100644 api/label.pb.gw.go delete mode 100644 api/metric.pb.go delete mode 100644 api/namespace.pb.go delete mode 100644 api/namespace.pb.gw.go rename api/{ => proto}/api.proto (93%) rename api/{ => proto}/auth.proto (96%) rename api/{ => proto}/common.proto (85%) rename api/{ => proto}/config.proto (90%) rename api/{ => proto}/cron_workflow.proto (97%) rename api/{ => proto}/label.proto (97%) rename api/{ => proto}/metric.proto (67%) rename api/{ => proto}/namespace.proto (93%) rename api/{ => proto}/secret.proto (98%) rename api/{ => proto}/services.proto (93%) rename api/{ => proto}/workflow.proto (99%) rename api/{ => proto}/workflow_template.proto (98%) rename api/{ => proto}/workspace.proto (98%) rename api/{ => proto}/workspace_template.proto (98%) delete mode 100644 api/secret.pb.go delete mode 100644 api/secret.pb.gw.go delete mode 100644 api/services.pb.go delete mode 100644 api/services.pb.gw.go delete mode 100644 api/workflow.pb.go delete mode 100644 api/workflow.pb.gw.go delete mode 100644 api/workflow.swagger.json delete mode 100644 api/workflow_template.pb.go delete mode 100644 api/workflow_template.pb.gw.go delete mode 100644 api/workspace.pb.go delete mode 100644 api/workspace.pb.gw.go delete mode 100644 api/workspace_template.pb.go delete mode 100644 api/workspace_template.pb.gw.go diff --git a/Makefile b/Makefile index 00877e62..f679edeb 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,13 @@ jq: protoc: protoc -I/usr/local/include \ -Iapi/third_party/ \ - -Iapi/ \ - --grpc-gateway_out ./api \ + -Iapi/proto \ + --go_out ./api/gen --go_opt paths=source_relative \ + --go-grpc_out ./api/gen --go-grpc_opt paths=source_relative \ + --go-grpc_opt paths=source_relative \ + --grpc-gateway_out ./api/gen \ --grpc-gateway_opt logtostderr=true \ + --grpc-gateway_opt allow_delete_body=true \ --grpc-gateway_opt paths=source_relative \ --grpc-gateway_opt generate_unbound_methods=true \ --openapiv2_out ./api \ @@ -29,7 +33,7 @@ protoc: --openapiv2_opt allow_delete_body=true \ --openapiv2_opt logtostderr=true \ --openapiv2_opt simple_operation_ids=true \ - api/*.proto + api/proto/*.proto api: init protoc jq diff --git a/api/api.pb.go b/api/api.pb.go deleted file mode 100644 index 807a9338..00000000 --- a/api/api.pb.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: api.proto - -package api - -import ( - proto "github.com/golang/protobuf/proto" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -var File_api_proto protoreflect.FileDescriptor - -var file_api_proto_rawDesc = []byte{ - 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, - 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, - 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x89, - 0x02, 0x92, 0x41, 0x85, 0x02, 0x12, 0x58, 0x0a, 0x08, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, - 0x6c, 0x12, 0x0c, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x20, 0x41, 0x50, 0x49, 0x22, - 0x36, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, - 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x32, 0x06, 0x30, 0x2e, 0x31, 0x30, 0x2e, 0x30, 0x1a, - 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x38, 0x38, 0x38, 0x2a, - 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x18, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5a, 0x49, 0x0a, 0x47, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x3d, 0x08, - 0x02, 0x12, 0x28, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x20, 0x62, 0x79, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x1a, 0x0d, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, - 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var file_api_proto_goTypes = []interface{}{} -var file_api_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_api_proto_init() } -func file_api_proto_init() { - if File_api_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_api_proto_goTypes, - DependencyIndexes: file_api_proto_depIdxs, - }.Build() - File_api_proto = out.File - file_api_proto_rawDesc = nil - file_api_proto_goTypes = nil - file_api_proto_depIdxs = nil -} diff --git a/api/api.swagger.json b/api/api.swagger.json index 64a199ac..84ef337f 100644 --- a/api/api.swagger.json +++ b/api/api.swagger.json @@ -33,9 +33,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -65,9 +65,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -98,9 +98,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -130,9 +130,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -152,9 +152,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -200,9 +200,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -242,9 +242,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -274,9 +274,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -312,9 +312,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -346,9 +346,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -390,9 +390,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -404,7 +404,7 @@ "type": "string" }, { - "name": "workflow_template_name", + "name": "workflowTemplateName", "in": "query", "required": false, "type": "string" @@ -440,9 +440,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -465,7 +465,7 @@ ] } }, - "/apis/v1beta1/{namespace}/cron_workflows/{workflow_template_name}": { + "/apis/v1beta1/{namespace}/cron_workflows/{workflowTemplateName}": { "get": { "operationId": "ListCronWorkflows2", "responses": { @@ -476,9 +476,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -490,7 +490,7 @@ "type": "string" }, { - "name": "workflow_template_name", + "name": "workflowTemplateName", "in": "path", "required": true, "type": "string" @@ -526,9 +526,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -554,9 +554,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -592,9 +592,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -626,9 +626,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -662,9 +662,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -698,9 +698,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -740,9 +740,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -784,9 +784,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -826,9 +826,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -870,9 +870,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -906,9 +906,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -967,8 +967,7 @@ "name": "includeSystem", "in": "query", "required": false, - "type": "boolean", - "format": "boolean" + "type": "boolean" } ], "tags": [ @@ -976,6 +975,7 @@ ] }, "post": { + "summary": "Creates a Workflow", "operationId": "CreateWorkflowExecution", "responses": { "200": { @@ -985,9 +985,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1023,9 +1023,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1053,9 +1053,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1078,6 +1078,7 @@ ] }, "post": { + "summary": "Clone a Workflow. This is the same as running it again.", "operationId": "CloneWorkflowExecution", "responses": { "200": { @@ -1087,9 +1088,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1123,9 +1124,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1165,9 +1166,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1209,9 +1210,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1251,9 +1252,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1293,9 +1294,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1339,16 +1340,16 @@ "$ref": "#/definitions/LogEntry" }, "error": { - "$ref": "#/definitions/grpc.gateway.runtime.StreamError" + "$ref": "#/definitions/google.rpc.Status" } }, "title": "Stream result of LogEntry" } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1394,9 +1395,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1436,9 +1437,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1472,9 +1473,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1516,9 +1517,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1560,9 +1561,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1598,16 +1599,16 @@ "$ref": "#/definitions/WorkflowExecution" }, "error": { - "$ref": "#/definitions/grpc.gateway.runtime.StreamError" + "$ref": "#/definitions/google.rpc.Status" } }, "title": "Stream result of WorkflowExecution" } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1641,9 +1642,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1689,9 +1690,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1727,9 +1728,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1770,9 +1771,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1806,9 +1807,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1855,9 +1856,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1904,9 +1905,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1940,9 +1941,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -1983,9 +1984,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2027,9 +2028,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2057,9 +2058,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2108,6 +2109,7 @@ ] }, "post": { + "summary": "Creates a WorkspaceTemplate", "operationId": "CreateWorkspaceTemplate", "responses": { "200": { @@ -2117,9 +2119,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2146,6 +2148,7 @@ }, "/apis/v1beta1/{namespace}/workspace_templates/{uid}": { "get": { + "summary": "Get a WorkspaceTemplate", "operationId": "GetWorkspaceTemplate", "responses": { "200": { @@ -2155,9 +2158,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2187,6 +2190,7 @@ ] }, "put": { + "summary": "Updates a WorkspaceTemplate", "operationId": "UpdateWorkspaceTemplate", "responses": { "200": { @@ -2196,9 +2200,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2231,6 +2235,7 @@ }, "/apis/v1beta1/{namespace}/workspace_templates/{uid}/archive": { "put": { + "summary": "Archives a WorkspaceTemplate", "operationId": "ArchiveWorkspaceTemplate", "responses": { "200": { @@ -2240,9 +2245,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2276,9 +2281,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2303,6 +2308,7 @@ }, "/apis/v1beta1/{namespace}/workspace_templates/{uid}/workflow_template": { "post": { + "summary": "Get the generated WorkflowTemplate for a WorkspaceTemplate", "operationId": "GenerateWorkspaceTemplateWorkflowTemplate", "responses": { "200": { @@ -2312,9 +2318,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2356,9 +2362,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2416,9 +2422,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2454,9 +2460,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2488,9 +2494,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2522,9 +2528,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2566,9 +2572,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2602,9 +2608,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2638,9 +2644,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2674,9 +2680,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2718,9 +2724,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2758,9 +2764,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2806,9 +2812,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2856,9 +2862,9 @@ } }, "default": { - "description": "An unexpected error response", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" + "$ref": "#/definitions/google.rpc.Status" } } }, @@ -2899,8 +2905,7 @@ "type": "object", "properties": { "inserted": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -2914,8 +2919,7 @@ "type": "string" }, "override": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "metrics": { "type": "array", @@ -3029,8 +3033,7 @@ "type": "object", "properties": { "deleted": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -3038,8 +3041,7 @@ "type": "object", "properties": { "deleted": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -3066,8 +3068,7 @@ "type": "string" }, "directory": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -3175,8 +3176,7 @@ "type": "object", "properties": { "authorized": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -3565,8 +3565,7 @@ "type": "string" }, "required": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "visibility": { "type": "string" @@ -3608,8 +3607,7 @@ "type": "object", "properties": { "exists": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -3640,8 +3638,7 @@ "type": "object", "properties": { "updated": { - "type": "boolean", - "format": "boolean" + "type": "boolean" } } }, @@ -3811,12 +3808,10 @@ "type": "string" }, "isLatest": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "isArchived": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "labels": { "type": "array", @@ -3981,8 +3976,7 @@ "type": "string" }, "isLatest": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "createdAt": { "type": "string" @@ -3997,8 +3991,7 @@ } }, "isArchived": { - "type": "boolean", - "format": "boolean" + "type": "boolean" }, "description": { "type": "string" @@ -4008,56 +4001,25 @@ "google.protobuf.Any": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + "typeUrl": { + "type": "string" }, "value": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := &pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } + "format": "byte" } } }, - "grpc.gateway.runtime.StreamError": { + "google.rpc.Status": { "type": "object", "properties": { - "grpc_code": { - "type": "integer", - "format": "int32" - }, - "http_code": { + "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, - "http_status": { - "type": "string" - }, "details": { "type": "array", "items": { diff --git a/api/auth.pb.go b/api/auth.pb.go deleted file mode 100644 index e44bf1c6..00000000 --- a/api/auth.pb.go +++ /dev/null @@ -1,819 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: auth.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type IsValidTokenRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *IsValidTokenRequest) Reset() { - *x = IsValidTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsValidTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsValidTokenRequest) ProtoMessage() {} - -func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 IsValidTokenRequest.ProtoReflect.Descriptor instead. -func (*IsValidTokenRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *IsValidTokenRequest) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *IsValidTokenRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type IsValidTokenResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` -} - -func (x *IsValidTokenResponse) Reset() { - *x = IsValidTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsValidTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsValidTokenResponse) ProtoMessage() {} - -func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 IsValidTokenResponse.ProtoReflect.Descriptor instead. -func (*IsValidTokenResponse) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *IsValidTokenResponse) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *IsValidTokenResponse) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *IsValidTokenResponse) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -type IsAuthorized struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Verb string `protobuf:"bytes,2,opt,name=verb,proto3" json:"verb,omitempty"` - Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` - Resource string `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"` - ResourceName string `protobuf:"bytes,5,opt,name=resourceName,proto3" json:"resourceName,omitempty"` -} - -func (x *IsAuthorized) Reset() { - *x = IsAuthorized{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsAuthorized) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsAuthorized) ProtoMessage() {} - -func (x *IsAuthorized) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 IsAuthorized.ProtoReflect.Descriptor instead. -func (*IsAuthorized) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{2} -} - -func (x *IsAuthorized) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *IsAuthorized) GetVerb() string { - if x != nil { - return x.Verb - } - return "" -} - -func (x *IsAuthorized) GetGroup() string { - if x != nil { - return x.Group - } - return "" -} - -func (x *IsAuthorized) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *IsAuthorized) GetResourceName() string { - if x != nil { - return x.ResourceName - } - return "" -} - -type IsAuthorizedRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsAuthorized *IsAuthorized `protobuf:"bytes,1,opt,name=isAuthorized,proto3" json:"isAuthorized,omitempty"` -} - -func (x *IsAuthorizedRequest) Reset() { - *x = IsAuthorizedRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsAuthorizedRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsAuthorizedRequest) ProtoMessage() {} - -func (x *IsAuthorizedRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 IsAuthorizedRequest.ProtoReflect.Descriptor instead. -func (*IsAuthorizedRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{3} -} - -func (x *IsAuthorizedRequest) GetIsAuthorized() *IsAuthorized { - if x != nil { - return x.IsAuthorized - } - return nil -} - -type IsAuthorizedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"` -} - -func (x *IsAuthorizedResponse) Reset() { - *x = IsAuthorizedResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsAuthorizedResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsAuthorizedResponse) ProtoMessage() {} - -func (x *IsAuthorizedResponse) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 IsAuthorizedResponse.ProtoReflect.Descriptor instead. -func (*IsAuthorizedResponse) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{4} -} - -func (x *IsAuthorizedResponse) GetAuthorized() bool { - if x != nil { - return x.Authorized - } - return false -} - -type GetAccessTokenRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *GetAccessTokenRequest) Reset() { - *x = GetAccessTokenRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccessTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccessTokenRequest) ProtoMessage() {} - -func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 GetAccessTokenRequest.ProtoReflect.Descriptor instead. -func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{5} -} - -func (x *GetAccessTokenRequest) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *GetAccessTokenRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type GetAccessTokenResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` - AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` -} - -func (x *GetAccessTokenResponse) Reset() { - *x = GetAccessTokenResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccessTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccessTokenResponse) ProtoMessage() {} - -func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_auth_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 GetAccessTokenResponse.ProtoReflect.Descriptor instead. -func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { - return file_auth_proto_rawDescGZIP(), []int{6} -} - -func (x *GetAccessTokenResponse) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *GetAccessTokenResponse) GetAccessToken() string { - if x != nil { - return x.AccessToken - } - return "" -} - -func (x *GetAccessTokenResponse) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -var File_auth_proto protoreflect.FileDescriptor - -var file_auth_proto_rawDesc = []byte{ - 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, - 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, - 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, - 0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x60, 0x0a, 0x14, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x49, 0x73, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x4c, 0x0a, 0x13, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0c, 0x69, 0x73, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x64, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, - 0x36, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x32, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x88, 0x02, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, 0x2a, 0x12, - 0x7e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, 0x2a, 0x92, 0x41, 0x02, 0x62, 0x00, 0x12, - 0x6d, 0x0a, 0x0c, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, - 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x12, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, - 0x3a, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_auth_proto_rawDescOnce sync.Once - file_auth_proto_rawDescData = file_auth_proto_rawDesc -) - -func file_auth_proto_rawDescGZIP() []byte { - file_auth_proto_rawDescOnce.Do(func() { - file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData) - }) - return file_auth_proto_rawDescData -} - -var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_auth_proto_goTypes = []interface{}{ - (*IsValidTokenRequest)(nil), // 0: api.IsValidTokenRequest - (*IsValidTokenResponse)(nil), // 1: api.IsValidTokenResponse - (*IsAuthorized)(nil), // 2: api.IsAuthorized - (*IsAuthorizedRequest)(nil), // 3: api.IsAuthorizedRequest - (*IsAuthorizedResponse)(nil), // 4: api.IsAuthorizedResponse - (*GetAccessTokenRequest)(nil), // 5: api.GetAccessTokenRequest - (*GetAccessTokenResponse)(nil), // 6: api.GetAccessTokenResponse -} -var file_auth_proto_depIdxs = []int32{ - 2, // 0: api.IsAuthorizedRequest.isAuthorized:type_name -> api.IsAuthorized - 0, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest - 5, // 2: api.AuthService.GetAccessToken:input_type -> api.GetAccessTokenRequest - 3, // 3: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest - 1, // 4: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse - 6, // 5: api.AuthService.GetAccessToken:output_type -> api.GetAccessTokenResponse - 4, // 6: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_auth_proto_init() } -func file_auth_proto_init() { - if File_auth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsValidTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsValidTokenResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsAuthorized); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsAuthorizedRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsAuthorizedResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccessTokenRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccessTokenResponse); 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_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_auth_proto_goTypes, - DependencyIndexes: file_auth_proto_depIdxs, - MessageInfos: file_auth_proto_msgTypes, - }.Build() - File_auth_proto = out.File - file_auth_proto_rawDesc = nil - file_auth_proto_goTypes = nil - file_auth_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AuthServiceClient is the client API for AuthService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthServiceClient interface { - // Deprecated: Do not use. - IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error) - GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) - IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error) -} - -type authServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { - return &authServiceClient{cc} -} - -// Deprecated: Do not use. -func (c *authServiceClient) IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error) { - out := new(IsValidTokenResponse) - err := c.cc.Invoke(ctx, "/api.AuthService/IsValidToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authServiceClient) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) { - out := new(GetAccessTokenResponse) - err := c.cc.Invoke(ctx, "/api.AuthService/GetAccessToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authServiceClient) IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error) { - out := new(IsAuthorizedResponse) - err := c.cc.Invoke(ctx, "/api.AuthService/IsAuthorized", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthServiceServer is the server API for AuthService service. -type AuthServiceServer interface { - // Deprecated: Do not use. - IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) - GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error) - IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error) -} - -// UnimplementedAuthServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAuthServiceServer struct { -} - -func (*UnimplementedAuthServiceServer) IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented") -} -func (*UnimplementedAuthServiceServer) GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccessToken not implemented") -} -func (*UnimplementedAuthServiceServer) IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsAuthorized not implemented") -} - -func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) { - s.RegisterService(&_AuthService_serviceDesc, srv) -} - -func _AuthService_IsValidToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsValidTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).IsValidToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.AuthService/IsValidToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).IsValidToken(ctx, req.(*IsValidTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthService_GetAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccessTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).GetAccessToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.AuthService/GetAccessToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).GetAccessToken(ctx, req.(*GetAccessTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AuthService_IsAuthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsAuthorizedRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).IsAuthorized(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.AuthService/IsAuthorized", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).IsAuthorized(ctx, req.(*IsAuthorizedRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AuthService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.AuthService", - HandlerType: (*AuthServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "IsValidToken", - Handler: _AuthService_IsValidToken_Handler, - }, - { - MethodName: "GetAccessToken", - Handler: _AuthService_GetAccessToken_Handler, - }, - { - MethodName: "IsAuthorized", - Handler: _AuthService_IsAuthorized_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "auth.proto", -} diff --git a/api/auth.pb.gw.go b/api/auth.pb.gw.go deleted file mode 100644 index 89648a7b..00000000 --- a/api/auth.pb.gw.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: auth.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq IsValidTokenRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.IsValidToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq IsValidTokenRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.IsValidToken(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccessTokenRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccessTokenRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAccessToken(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq IsAuthorizedRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.IsAuthorized); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.IsAuthorized(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq IsAuthorizedRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.IsAuthorized); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.IsAuthorized(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". -// UnaryRPC :call AuthServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { - - mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AuthService_IsValidToken_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AuthService_GetAccessToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AuthService_IsAuthorized_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_IsAuthorized_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterAuthServiceHandler(ctx, mux, conn) -} - -// RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAuthServiceHandlerClient(ctx, mux, NewAuthServiceClient(conn)) -} - -// RegisterAuthServiceHandlerClient registers the http handlers for service AuthService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthServiceClient" to call the correct interceptors. -func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error { - - mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthService_IsValidToken_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AuthService_GetAccessToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AuthService_IsAuthorized_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_IsAuthorized_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AuthService_IsValidToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "token"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AuthService_GetAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "get_access_token"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AuthService_IsAuthorized_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "auth"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_AuthService_IsValidToken_0 = runtime.ForwardResponseMessage - - forward_AuthService_GetAccessToken_0 = runtime.ForwardResponseMessage - - forward_AuthService_IsAuthorized_0 = runtime.ForwardResponseMessage -) diff --git a/api/common.pb.go b/api/common.pb.go deleted file mode 100644 index 4959faf6..00000000 --- a/api/common.pb.go +++ /dev/null @@ -1,287 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: common.proto - -package api - -import ( - proto "github.com/golang/protobuf/proto" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Parameter 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"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - DisplayName string `protobuf:"bytes,4,opt,name=displayName,proto3" json:"displayName,omitempty"` - Hint string `protobuf:"bytes,5,opt,name=hint,proto3" json:"hint,omitempty"` - Required bool `protobuf:"varint,6,opt,name=required,proto3" json:"required,omitempty"` - Visibility string `protobuf:"bytes,7,opt,name=visibility,proto3" json:"visibility,omitempty"` - Options []*ParameterOption `protobuf:"bytes,8,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *Parameter) Reset() { - *x = Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Parameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Parameter) ProtoMessage() {} - -func (x *Parameter) ProtoReflect() protoreflect.Message { - mi := &file_common_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 Parameter.ProtoReflect.Descriptor instead. -func (*Parameter) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{0} -} - -func (x *Parameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Parameter) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *Parameter) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Parameter) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Parameter) GetHint() string { - if x != nil { - return x.Hint - } - return "" -} - -func (x *Parameter) GetRequired() bool { - if x != nil { - return x.Required - } - return false -} - -func (x *Parameter) GetVisibility() string { - if x != nil { - return x.Visibility - } - return "" -} - -func (x *Parameter) GetOptions() []*ParameterOption { - if x != nil { - return x.Options - } - return nil -} - -type ParameterOption 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 *ParameterOption) Reset() { - *x = ParameterOption{} - if protoimpl.UnsafeEnabled { - mi := &file_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParameterOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParameterOption) ProtoMessage() {} - -func (x *ParameterOption) ProtoReflect() protoreflect.Message { - mi := &file_common_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 ParameterOption.ProtoReflect.Descriptor instead. -func (*ParameterOption) Descriptor() ([]byte, []int) { - return file_common_proto_rawDescGZIP(), []int{1} -} - -func (x *ParameterOption) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ParameterOption) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -var File_common_proto protoreflect.FileDescriptor - -var file_common_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x61, 0x70, 0x69, 0x22, 0xeb, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 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, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x70, - 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_common_proto_rawDescOnce sync.Once - file_common_proto_rawDescData = file_common_proto_rawDesc -) - -func file_common_proto_rawDescGZIP() []byte { - file_common_proto_rawDescOnce.Do(func() { - file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData) - }) - return file_common_proto_rawDescData -} - -var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_common_proto_goTypes = []interface{}{ - (*Parameter)(nil), // 0: api.Parameter - (*ParameterOption)(nil), // 1: api.ParameterOption -} -var file_common_proto_depIdxs = []int32{ - 1, // 0: api.Parameter.options:type_name -> api.ParameterOption - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_common_proto_init() } -func file_common_proto_init() { - if File_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParameterOption); 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_common_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_common_proto_goTypes, - DependencyIndexes: file_common_proto_depIdxs, - MessageInfos: file_common_proto_msgTypes, - }.Build() - File_common_proto = out.File - file_common_proto_rawDesc = nil - file_common_proto_goTypes = nil - file_common_proto_depIdxs = nil -} diff --git a/api/config.pb.go b/api/config.pb.go deleted file mode 100644 index 7d49d633..00000000 --- a/api/config.pb.go +++ /dev/null @@ -1,422 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: config.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type GetConfigResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ApiUrl string `protobuf:"bytes,1,opt,name=apiUrl,proto3" json:"apiUrl,omitempty"` - Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` - Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"` - NodePool *NodePool `protobuf:"bytes,4,opt,name=nodePool,proto3" json:"nodePool,omitempty"` -} - -func (x *GetConfigResponse) Reset() { - *x = GetConfigResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConfigResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigResponse) ProtoMessage() {} - -func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_config_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 GetConfigResponse.ProtoReflect.Descriptor instead. -func (*GetConfigResponse) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{0} -} - -func (x *GetConfigResponse) GetApiUrl() string { - if x != nil { - return x.ApiUrl - } - return "" -} - -func (x *GetConfigResponse) GetDomain() string { - if x != nil { - return x.Domain - } - return "" -} - -func (x *GetConfigResponse) GetFqdn() string { - if x != nil { - return x.Fqdn - } - return "" -} - -func (x *GetConfigResponse) GetNodePool() *NodePool { - if x != nil { - return x.NodePool - } - return nil -} - -type NodePoolOption 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 *NodePoolOption) Reset() { - *x = NodePoolOption{} - if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodePoolOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePoolOption) ProtoMessage() {} - -func (x *NodePoolOption) ProtoReflect() protoreflect.Message { - mi := &file_config_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 NodePoolOption.ProtoReflect.Descriptor instead. -func (*NodePoolOption) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{1} -} - -func (x *NodePoolOption) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *NodePoolOption) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type NodePool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` - Options []*NodePoolOption `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *NodePool) Reset() { - *x = NodePool{} - if protoimpl.UnsafeEnabled { - mi := &file_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodePool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodePool) ProtoMessage() {} - -func (x *NodePool) ProtoReflect() protoreflect.Message { - mi := &file_config_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 NodePool.ProtoReflect.Descriptor instead. -func (*NodePool) Descriptor() ([]byte, []int) { - return file_config_proto_rawDescGZIP(), []int{2} -} - -func (x *NodePool) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *NodePool) GetOptions() []*NodePoolOption { - if x != nil { - return x.Options - } - return nil -} - -var File_config_proto protoreflect.FileDescriptor - -var file_config_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, - 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, - 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, - 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4f, - 0x70, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x4f, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x32, 0x6a, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_config_proto_rawDescOnce sync.Once - file_config_proto_rawDescData = file_config_proto_rawDesc -) - -func file_config_proto_rawDescGZIP() []byte { - file_config_proto_rawDescOnce.Do(func() { - file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData) - }) - return file_config_proto_rawDescData -} - -var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_config_proto_goTypes = []interface{}{ - (*GetConfigResponse)(nil), // 0: api.GetConfigResponse - (*NodePoolOption)(nil), // 1: api.NodePoolOption - (*NodePool)(nil), // 2: api.NodePool - (*empty.Empty)(nil), // 3: google.protobuf.Empty -} -var file_config_proto_depIdxs = []int32{ - 2, // 0: api.GetConfigResponse.nodePool:type_name -> api.NodePool - 1, // 1: api.NodePool.options:type_name -> api.NodePoolOption - 3, // 2: api.ConfigService.GetConfig:input_type -> google.protobuf.Empty - 0, // 3: api.ConfigService.GetConfig:output_type -> api.GetConfigResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] 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_config_proto_init() } -func file_config_proto_init() { - if File_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConfigResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodePoolOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodePool); 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_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_config_proto_goTypes, - DependencyIndexes: file_config_proto_depIdxs, - MessageInfos: file_config_proto_msgTypes, - }.Build() - File_config_proto = out.File - file_config_proto_rawDesc = nil - file_config_proto_goTypes = nil - file_config_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ConfigServiceClient is the client API for ConfigService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ConfigServiceClient interface { - GetConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error) -} - -type configServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient { - return &configServiceClient{cc} -} - -func (c *configServiceClient) GetConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error) { - out := new(GetConfigResponse) - err := c.cc.Invoke(ctx, "/api.ConfigService/GetConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConfigServiceServer is the server API for ConfigService service. -type ConfigServiceServer interface { - GetConfig(context.Context, *empty.Empty) (*GetConfigResponse, error) -} - -// UnimplementedConfigServiceServer can be embedded to have forward compatible implementations. -type UnimplementedConfigServiceServer struct { -} - -func (*UnimplementedConfigServiceServer) GetConfig(context.Context, *empty.Empty) (*GetConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") -} - -func RegisterConfigServiceServer(s *grpc.Server, srv ConfigServiceServer) { - s.RegisterService(&_ConfigService_serviceDesc, srv) -} - -func _ConfigService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConfigServiceServer).GetConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ConfigService/GetConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConfigServiceServer).GetConfig(ctx, req.(*empty.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _ConfigService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.ConfigService", - HandlerType: (*ConfigServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetConfig", - Handler: _ConfigService_GetConfig_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "config.proto", -} diff --git a/api/config.pb.gw.go b/api/config.pb.gw.go deleted file mode 100644 index 4b1d7e8e..00000000 --- a/api/config.pb.gw.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: config.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/empty" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_ConfigService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty - var metadata runtime.ServerMetadata - - msg, err := client.GetConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ConfigService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty - var metadata runtime.ServerMetadata - - msg, err := server.GetConfig(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux". -// UnaryRPC :call ConfigServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error { - - mux.Handle("GET", pattern_ConfigService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ConfigService_GetConfig_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterConfigServiceHandlerFromEndpoint is same as RegisterConfigServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterConfigServiceHandler(ctx, mux, conn) -} - -// RegisterConfigServiceHandler registers the http handlers for service ConfigService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterConfigServiceHandlerClient(ctx, mux, NewConfigServiceClient(conn)) -} - -// RegisterConfigServiceHandlerClient registers the http handlers for service ConfigService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ConfigServiceClient" to call the correct interceptors. -func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error { - - mux.Handle("GET", pattern_ConfigService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ConfigService_GetConfig_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ConfigService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ConfigService_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "config"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_ConfigService_GetConfig_0 = runtime.ForwardResponseMessage -) diff --git a/api/cron_workflow.pb.go b/api/cron_workflow.pb.go deleted file mode 100644 index a1dea3bb..00000000 --- a/api/cron_workflow.pb.go +++ /dev/null @@ -1,1003 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: cron_workflow.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CronWorkflow struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Manifest string `protobuf:"bytes,3,opt,name=manifest,proto3" json:"manifest,omitempty"` - WorkflowExecution *WorkflowExecution `protobuf:"bytes,4,opt,name=workflowExecution,proto3" json:"workflowExecution,omitempty"` - Labels []*KeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"` - Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *CronWorkflow) Reset() { - *x = CronWorkflow{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CronWorkflow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CronWorkflow) ProtoMessage() {} - -func (x *CronWorkflow) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 CronWorkflow.ProtoReflect.Descriptor instead. -func (*CronWorkflow) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{0} -} - -func (x *CronWorkflow) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CronWorkflow) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *CronWorkflow) GetManifest() string { - if x != nil { - return x.Manifest - } - return "" -} - -func (x *CronWorkflow) GetWorkflowExecution() *WorkflowExecution { - if x != nil { - return x.WorkflowExecution - } - return nil -} - -func (x *CronWorkflow) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -func (x *CronWorkflow) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -type CreateCronWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - CronWorkflow *CronWorkflow `protobuf:"bytes,2,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"` -} - -func (x *CreateCronWorkflowRequest) Reset() { - *x = CreateCronWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateCronWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateCronWorkflowRequest) ProtoMessage() {} - -func (x *CreateCronWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 CreateCronWorkflowRequest.ProtoReflect.Descriptor instead. -func (*CreateCronWorkflowRequest) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateCronWorkflowRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow { - if x != nil { - return x.CronWorkflow - } - return nil -} - -type GetCronWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *GetCronWorkflowRequest) Reset() { - *x = GetCronWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetCronWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCronWorkflowRequest) ProtoMessage() {} - -func (x *GetCronWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 GetCronWorkflowRequest.ProtoReflect.Descriptor instead. -func (*GetCronWorkflowRequest) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{2} -} - -func (x *GetCronWorkflowRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetCronWorkflowRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type UpdateCronWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - CronWorkflow *CronWorkflow `protobuf:"bytes,3,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"` -} - -func (x *UpdateCronWorkflowRequest) Reset() { - *x = UpdateCronWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateCronWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateCronWorkflowRequest) ProtoMessage() {} - -func (x *UpdateCronWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 UpdateCronWorkflowRequest.ProtoReflect.Descriptor instead. -func (*UpdateCronWorkflowRequest) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{3} -} - -func (x *UpdateCronWorkflowRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateCronWorkflowRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UpdateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow { - if x != nil { - return x.CronWorkflow - } - return nil -} - -type DeleteCronWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *DeleteCronWorkflowRequest) Reset() { - *x = DeleteCronWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteCronWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteCronWorkflowRequest) ProtoMessage() {} - -func (x *DeleteCronWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 DeleteCronWorkflowRequest.ProtoReflect.Descriptor instead. -func (*DeleteCronWorkflowRequest) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteCronWorkflowRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeleteCronWorkflowRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ListCronWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - WorkflowTemplateName string `protobuf:"bytes,2,opt,name=workflow_template_name,json=workflowTemplateName,proto3" json:"workflow_template_name,omitempty"` - PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` -} - -func (x *ListCronWorkflowRequest) Reset() { - *x = ListCronWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListCronWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListCronWorkflowRequest) ProtoMessage() {} - -func (x *ListCronWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 ListCronWorkflowRequest.ProtoReflect.Descriptor instead. -func (*ListCronWorkflowRequest) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{5} -} - -func (x *ListCronWorkflowRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListCronWorkflowRequest) GetWorkflowTemplateName() string { - if x != nil { - return x.WorkflowTemplateName - } - return "" -} - -func (x *ListCronWorkflowRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListCronWorkflowRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -type ListCronWorkflowsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - CronWorkflows []*CronWorkflow `protobuf:"bytes,2,rep,name=cronWorkflows,proto3" json:"cronWorkflows,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` -} - -func (x *ListCronWorkflowsResponse) Reset() { - *x = ListCronWorkflowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cron_workflow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListCronWorkflowsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListCronWorkflowsResponse) ProtoMessage() {} - -func (x *ListCronWorkflowsResponse) ProtoReflect() protoreflect.Message { - mi := &file_cron_workflow_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 ListCronWorkflowsResponse.ProtoReflect.Descriptor instead. -func (*ListCronWorkflowsResponse) Descriptor() ([]byte, []int) { - return file_cron_workflow_proto_rawDescGZIP(), []int{6} -} - -func (x *ListCronWorkflowsResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListCronWorkflowsResponse) GetCronWorkflows() []*CronWorkflow { - if x != nil { - return x.CronWorkflows - } - return nil -} - -func (x *ListCronWorkflowsResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListCronWorkflowsResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListCronWorkflowsResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -var File_cron_workflow_proto protoreflect.FileDescriptor - -var file_cron_workflow_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x70, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63, - 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x22, 0x48, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x82, 0x01, 0x0a, - 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x72, - 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x22, 0x4b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x9d, - 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xb4, - 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0d, 0x63, 0x72, - 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xf9, 0x05, 0x0a, 0x13, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, - 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, - 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x78, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, - 0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, - 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, - 0xc8, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, - 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x75, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6f, 0x12, 0x28, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x5a, 0x43, 0x12, 0x41, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x12, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, - 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x30, 0x2a, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, - 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, - 0x7d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cron_workflow_proto_rawDescOnce sync.Once - file_cron_workflow_proto_rawDescData = file_cron_workflow_proto_rawDesc -) - -func file_cron_workflow_proto_rawDescGZIP() []byte { - file_cron_workflow_proto_rawDescOnce.Do(func() { - file_cron_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_cron_workflow_proto_rawDescData) - }) - return file_cron_workflow_proto_rawDescData -} - -var file_cron_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_cron_workflow_proto_goTypes = []interface{}{ - (*CronWorkflow)(nil), // 0: api.CronWorkflow - (*CreateCronWorkflowRequest)(nil), // 1: api.CreateCronWorkflowRequest - (*GetCronWorkflowRequest)(nil), // 2: api.GetCronWorkflowRequest - (*UpdateCronWorkflowRequest)(nil), // 3: api.UpdateCronWorkflowRequest - (*DeleteCronWorkflowRequest)(nil), // 4: api.DeleteCronWorkflowRequest - (*ListCronWorkflowRequest)(nil), // 5: api.ListCronWorkflowRequest - (*ListCronWorkflowsResponse)(nil), // 6: api.ListCronWorkflowsResponse - (*WorkflowExecution)(nil), // 7: api.WorkflowExecution - (*KeyValue)(nil), // 8: api.KeyValue - (*empty.Empty)(nil), // 9: google.protobuf.Empty -} -var file_cron_workflow_proto_depIdxs = []int32{ - 7, // 0: api.CronWorkflow.workflowExecution:type_name -> api.WorkflowExecution - 8, // 1: api.CronWorkflow.labels:type_name -> api.KeyValue - 0, // 2: api.CreateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow - 0, // 3: api.UpdateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow - 0, // 4: api.ListCronWorkflowsResponse.cronWorkflows:type_name -> api.CronWorkflow - 1, // 5: api.CronWorkflowService.CreateCronWorkflow:input_type -> api.CreateCronWorkflowRequest - 3, // 6: api.CronWorkflowService.UpdateCronWorkflow:input_type -> api.UpdateCronWorkflowRequest - 2, // 7: api.CronWorkflowService.GetCronWorkflow:input_type -> api.GetCronWorkflowRequest - 5, // 8: api.CronWorkflowService.ListCronWorkflows:input_type -> api.ListCronWorkflowRequest - 4, // 9: api.CronWorkflowService.DeleteCronWorkflow:input_type -> api.DeleteCronWorkflowRequest - 0, // 10: api.CronWorkflowService.CreateCronWorkflow:output_type -> api.CronWorkflow - 0, // 11: api.CronWorkflowService.UpdateCronWorkflow:output_type -> api.CronWorkflow - 0, // 12: api.CronWorkflowService.GetCronWorkflow:output_type -> api.CronWorkflow - 6, // 13: api.CronWorkflowService.ListCronWorkflows:output_type -> api.ListCronWorkflowsResponse - 9, // 14: api.CronWorkflowService.DeleteCronWorkflow:output_type -> google.protobuf.Empty - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] 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_cron_workflow_proto_init() } -func file_cron_workflow_proto_init() { - if File_cron_workflow_proto != nil { - return - } - file_workflow_proto_init() - file_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_cron_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CronWorkflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cron_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateCronWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cron_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetCronWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cron_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateCronWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cron_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteCronWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cron_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCronWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cron_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListCronWorkflowsResponse); 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_cron_workflow_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cron_workflow_proto_goTypes, - DependencyIndexes: file_cron_workflow_proto_depIdxs, - MessageInfos: file_cron_workflow_proto_msgTypes, - }.Build() - File_cron_workflow_proto = out.File - file_cron_workflow_proto_rawDesc = nil - file_cron_workflow_proto_goTypes = nil - file_cron_workflow_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// CronWorkflowServiceClient is the client API for CronWorkflowService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type CronWorkflowServiceClient interface { - CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) - UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) - GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) - ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error) - DeleteCronWorkflow(ctx context.Context, in *DeleteCronWorkflowRequest, opts ...grpc.CallOption) (*empty.Empty, error) -} - -type cronWorkflowServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewCronWorkflowServiceClient(cc grpc.ClientConnInterface) CronWorkflowServiceClient { - return &cronWorkflowServiceClient{cc} -} - -func (c *cronWorkflowServiceClient) CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) { - out := new(CronWorkflow) - err := c.cc.Invoke(ctx, "/api.CronWorkflowService/CreateCronWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *cronWorkflowServiceClient) UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) { - out := new(CronWorkflow) - err := c.cc.Invoke(ctx, "/api.CronWorkflowService/UpdateCronWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *cronWorkflowServiceClient) GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) { - out := new(CronWorkflow) - err := c.cc.Invoke(ctx, "/api.CronWorkflowService/GetCronWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *cronWorkflowServiceClient) ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error) { - out := new(ListCronWorkflowsResponse) - err := c.cc.Invoke(ctx, "/api.CronWorkflowService/ListCronWorkflows", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *cronWorkflowServiceClient) DeleteCronWorkflow(ctx context.Context, in *DeleteCronWorkflowRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.CronWorkflowService/DeleteCronWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CronWorkflowServiceServer is the server API for CronWorkflowService service. -type CronWorkflowServiceServer interface { - CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error) - UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error) - GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error) - ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error) - DeleteCronWorkflow(context.Context, *DeleteCronWorkflowRequest) (*empty.Empty, error) -} - -// UnimplementedCronWorkflowServiceServer can be embedded to have forward compatible implementations. -type UnimplementedCronWorkflowServiceServer struct { -} - -func (*UnimplementedCronWorkflowServiceServer) CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCronWorkflow not implemented") -} -func (*UnimplementedCronWorkflowServiceServer) UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateCronWorkflow not implemented") -} -func (*UnimplementedCronWorkflowServiceServer) GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCronWorkflow not implemented") -} -func (*UnimplementedCronWorkflowServiceServer) ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListCronWorkflows not implemented") -} -func (*UnimplementedCronWorkflowServiceServer) DeleteCronWorkflow(context.Context, *DeleteCronWorkflowRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteCronWorkflow not implemented") -} - -func RegisterCronWorkflowServiceServer(s *grpc.Server, srv CronWorkflowServiceServer) { - s.RegisterService(&_CronWorkflowService_serviceDesc, srv) -} - -func _CronWorkflowService_CreateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateCronWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.CronWorkflowService/CreateCronWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, req.(*CreateCronWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CronWorkflowService_UpdateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateCronWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.CronWorkflowService/UpdateCronWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, req.(*UpdateCronWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CronWorkflowService_GetCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCronWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.CronWorkflowService/GetCronWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, req.(*GetCronWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CronWorkflowService_ListCronWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCronWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.CronWorkflowService/ListCronWorkflows", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, req.(*ListCronWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CronWorkflowService_DeleteCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteCronWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CronWorkflowServiceServer).DeleteCronWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.CronWorkflowService/DeleteCronWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CronWorkflowServiceServer).DeleteCronWorkflow(ctx, req.(*DeleteCronWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _CronWorkflowService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.CronWorkflowService", - HandlerType: (*CronWorkflowServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateCronWorkflow", - Handler: _CronWorkflowService_CreateCronWorkflow_Handler, - }, - { - MethodName: "UpdateCronWorkflow", - Handler: _CronWorkflowService_UpdateCronWorkflow_Handler, - }, - { - MethodName: "GetCronWorkflow", - Handler: _CronWorkflowService_GetCronWorkflow_Handler, - }, - { - MethodName: "ListCronWorkflows", - Handler: _CronWorkflowService_ListCronWorkflows_Handler, - }, - { - MethodName: "DeleteCronWorkflow", - Handler: _CronWorkflowService_DeleteCronWorkflow_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cron_workflow.proto", -} diff --git a/api/cron_workflow.pb.gw.go b/api/cron_workflow.pb.gw.go deleted file mode 100644 index df46a794..00000000 --- a/api/cron_workflow.pb.gw.go +++ /dev/null @@ -1,823 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cron_workflow.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateCronWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.CreateCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateCronWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.CreateCronWorkflow(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CronWorkflowService_UpdateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateCronWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.UpdateCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CronWorkflowService_UpdateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateCronWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.UpdateCronWorkflow(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CronWorkflowService_GetCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.GetCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CronWorkflowService_GetCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.GetCronWorkflow(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CronWorkflowService_ListCronWorkflows_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_CronWorkflowService_ListCronWorkflows_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListCronWorkflows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CronWorkflowService_ListCronWorkflows_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_CronWorkflowService_ListCronWorkflows_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListCronWorkflows(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_CronWorkflowService_ListCronWorkflows_1 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "workflow_template_name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["workflow_template_name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflow_template_name") - } - - protoReq.WorkflowTemplateName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflow_template_name", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_1); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListCronWorkflows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["workflow_template_name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflow_template_name") - } - - protoReq.WorkflowTemplateName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflow_template_name", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_CronWorkflowService_ListCronWorkflows_1); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListCronWorkflows(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CronWorkflowService_DeleteCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.DeleteCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CronWorkflowService_DeleteCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteCronWorkflowRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.DeleteCronWorkflow(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterCronWorkflowServiceHandlerServer registers the http handlers for service CronWorkflowService to "mux". -// UnaryRPC :call CronWorkflowServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CronWorkflowServiceServer) error { - - mux.Handle("POST", pattern_CronWorkflowService_CreateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CronWorkflowService_CreateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_CreateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CronWorkflowService_UpdateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CronWorkflowService_UpdateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_UpdateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CronWorkflowService_GetCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CronWorkflowService_GetCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_GetCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CronWorkflowService_ListCronWorkflows_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_ListCronWorkflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CronWorkflowService_ListCronWorkflows_1(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_ListCronWorkflows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CronWorkflowService_DeleteCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CronWorkflowService_DeleteCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_DeleteCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterCronWorkflowServiceHandlerFromEndpoint is same as RegisterCronWorkflowServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterCronWorkflowServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterCronWorkflowServiceHandler(ctx, mux, conn) -} - -// RegisterCronWorkflowServiceHandler registers the http handlers for service CronWorkflowService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterCronWorkflowServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterCronWorkflowServiceHandlerClient(ctx, mux, NewCronWorkflowServiceClient(conn)) -} - -// RegisterCronWorkflowServiceHandlerClient registers the http handlers for service CronWorkflowService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CronWorkflowServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CronWorkflowServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "CronWorkflowServiceClient" to call the correct interceptors. -func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CronWorkflowServiceClient) error { - - mux.Handle("POST", pattern_CronWorkflowService_CreateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CronWorkflowService_CreateCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_CreateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_CronWorkflowService_UpdateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CronWorkflowService_UpdateCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_UpdateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CronWorkflowService_GetCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CronWorkflowService_GetCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_GetCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CronWorkflowService_ListCronWorkflows_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_ListCronWorkflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CronWorkflowService_ListCronWorkflows_1(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_ListCronWorkflows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CronWorkflowService_DeleteCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_CronWorkflowService_DeleteCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CronWorkflowService_DeleteCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_CronWorkflowService_CreateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflow"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CronWorkflowService_UpdateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CronWorkflowService_GetCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CronWorkflowService_ListCronWorkflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflows"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CronWorkflowService_ListCronWorkflows_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "workflow_template_name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CronWorkflowService_DeleteCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "uid"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_CronWorkflowService_CreateCronWorkflow_0 = runtime.ForwardResponseMessage - - forward_CronWorkflowService_UpdateCronWorkflow_0 = runtime.ForwardResponseMessage - - forward_CronWorkflowService_GetCronWorkflow_0 = runtime.ForwardResponseMessage - - forward_CronWorkflowService_ListCronWorkflows_0 = runtime.ForwardResponseMessage - - forward_CronWorkflowService_ListCronWorkflows_1 = runtime.ForwardResponseMessage - - forward_CronWorkflowService_DeleteCronWorkflow_0 = runtime.ForwardResponseMessage -) diff --git a/api/label.pb.go b/api/label.pb.go deleted file mode 100644 index 3388ab73..00000000 --- a/api/label.pb.go +++ /dev/null @@ -1,1019 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: label.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type KeyValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *KeyValue) Reset() { - *x = KeyValue{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyValue) ProtoMessage() {} - -func (x *KeyValue) ProtoReflect() protoreflect.Message { - mi := &file_label_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 KeyValue.ProtoReflect.Descriptor instead. -func (*KeyValue) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{0} -} - -func (x *KeyValue) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *KeyValue) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type Labels struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Items []*KeyValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` -} - -func (x *Labels) Reset() { - *x = Labels{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Labels) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Labels) ProtoMessage() {} - -func (x *Labels) ProtoReflect() protoreflect.Message { - mi := &file_label_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 Labels.ProtoReflect.Descriptor instead. -func (*Labels) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{1} -} - -func (x *Labels) GetItems() []*KeyValue { - if x != nil { - return x.Items - } - return nil -} - -type AddLabelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` - Labels *Labels `protobuf:"bytes,4,opt,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *AddLabelsRequest) Reset() { - *x = AddLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddLabelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddLabelsRequest) ProtoMessage() {} - -func (x *AddLabelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_label_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 AddLabelsRequest.ProtoReflect.Descriptor instead. -func (*AddLabelsRequest) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{2} -} - -func (x *AddLabelsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *AddLabelsRequest) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *AddLabelsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *AddLabelsRequest) GetLabels() *Labels { - if x != nil { - return x.Labels - } - return nil -} - -type ReplaceLabelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` - Labels *Labels `protobuf:"bytes,4,opt,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *ReplaceLabelsRequest) Reset() { - *x = ReplaceLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReplaceLabelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReplaceLabelsRequest) ProtoMessage() {} - -func (x *ReplaceLabelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_label_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 ReplaceLabelsRequest.ProtoReflect.Descriptor instead. -func (*ReplaceLabelsRequest) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{3} -} - -func (x *ReplaceLabelsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ReplaceLabelsRequest) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *ReplaceLabelsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *ReplaceLabelsRequest) GetLabels() *Labels { - if x != nil { - return x.Labels - } - return nil -} - -type GetLabelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *GetLabelsRequest) Reset() { - *x = GetLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLabelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLabelsRequest) ProtoMessage() {} - -func (x *GetLabelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_label_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 GetLabelsRequest.ProtoReflect.Descriptor instead. -func (*GetLabelsRequest) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{4} -} - -func (x *GetLabelsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetLabelsRequest) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *GetLabelsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type GetAvailableLabelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - KeyLike string `protobuf:"bytes,3,opt,name=keyLike,proto3" json:"keyLike,omitempty"` - SkipKeys string `protobuf:"bytes,4,opt,name=skipKeys,proto3" json:"skipKeys,omitempty"` -} - -func (x *GetAvailableLabelsRequest) Reset() { - *x = GetAvailableLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAvailableLabelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvailableLabelsRequest) ProtoMessage() {} - -func (x *GetAvailableLabelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_label_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 GetAvailableLabelsRequest.ProtoReflect.Descriptor instead. -func (*GetAvailableLabelsRequest) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{5} -} - -func (x *GetAvailableLabelsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetAvailableLabelsRequest) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *GetAvailableLabelsRequest) GetKeyLike() string { - if x != nil { - return x.KeyLike - } - return "" -} - -func (x *GetAvailableLabelsRequest) GetSkipKeys() string { - if x != nil { - return x.SkipKeys - } - return "" -} - -type GetLabelsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Labels []*KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *GetLabelsResponse) Reset() { - *x = GetLabelsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLabelsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLabelsResponse) ProtoMessage() {} - -func (x *GetLabelsResponse) ProtoReflect() protoreflect.Message { - mi := &file_label_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 GetLabelsResponse.ProtoReflect.Descriptor instead. -func (*GetLabelsResponse) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{6} -} - -func (x *GetLabelsResponse) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -type DeleteLabelRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` - Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *DeleteLabelRequest) Reset() { - *x = DeleteLabelRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_label_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteLabelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteLabelRequest) ProtoMessage() {} - -func (x *DeleteLabelRequest) ProtoReflect() protoreflect.Message { - mi := &file_label_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 DeleteLabelRequest.ProtoReflect.Descriptor instead. -func (*DeleteLabelRequest) Descriptor() ([]byte, []int) { - return file_label_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteLabelRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeleteLabelRequest) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *DeleteLabelRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *DeleteLabelRequest) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -var File_label_proto protoreflect.FileDescriptor - -var file_label_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, - 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, 0x22, 0x2d, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x23, - 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, - 0x65, 0x6d, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x14, 0x52, 0x65, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, - 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x22, 0x5e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b, - 0x65, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79, - 0x73, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x72, 0x0a, - 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x32, 0x98, 0x05, 0x0a, 0x0c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x75, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7d, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, - 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, - 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_label_proto_rawDescOnce sync.Once - file_label_proto_rawDescData = file_label_proto_rawDesc -) - -func file_label_proto_rawDescGZIP() []byte { - file_label_proto_rawDescOnce.Do(func() { - file_label_proto_rawDescData = protoimpl.X.CompressGZIP(file_label_proto_rawDescData) - }) - return file_label_proto_rawDescData -} - -var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_label_proto_goTypes = []interface{}{ - (*KeyValue)(nil), // 0: api.KeyValue - (*Labels)(nil), // 1: api.Labels - (*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest - (*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest - (*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest - (*GetAvailableLabelsRequest)(nil), // 5: api.GetAvailableLabelsRequest - (*GetLabelsResponse)(nil), // 6: api.GetLabelsResponse - (*DeleteLabelRequest)(nil), // 7: api.DeleteLabelRequest -} -var file_label_proto_depIdxs = []int32{ - 0, // 0: api.Labels.items:type_name -> api.KeyValue - 1, // 1: api.AddLabelsRequest.labels:type_name -> api.Labels - 1, // 2: api.ReplaceLabelsRequest.labels:type_name -> api.Labels - 0, // 3: api.GetLabelsResponse.labels:type_name -> api.KeyValue - 5, // 4: api.LabelService.GetAvailableLabels:input_type -> api.GetAvailableLabelsRequest - 4, // 5: api.LabelService.GetLabels:input_type -> api.GetLabelsRequest - 2, // 6: api.LabelService.AddLabels:input_type -> api.AddLabelsRequest - 3, // 7: api.LabelService.ReplaceLabels:input_type -> api.ReplaceLabelsRequest - 7, // 8: api.LabelService.DeleteLabel:input_type -> api.DeleteLabelRequest - 6, // 9: api.LabelService.GetAvailableLabels:output_type -> api.GetLabelsResponse - 6, // 10: api.LabelService.GetLabels:output_type -> api.GetLabelsResponse - 6, // 11: api.LabelService.AddLabels:output_type -> api.GetLabelsResponse - 6, // 12: api.LabelService.ReplaceLabels:output_type -> api.GetLabelsResponse - 6, // 13: api.LabelService.DeleteLabel:output_type -> api.GetLabelsResponse - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] 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_label_proto_init() } -func file_label_proto_init() { - if File_label_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_label_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Labels); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReplaceLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAvailableLabelsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLabelsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_label_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteLabelRequest); 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_label_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_label_proto_goTypes, - DependencyIndexes: file_label_proto_depIdxs, - MessageInfos: file_label_proto_msgTypes, - }.Build() - File_label_proto = out.File - file_label_proto_rawDesc = nil - file_label_proto_goTypes = nil - file_label_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// LabelServiceClient is the client API for LabelService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LabelServiceClient interface { - GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) - GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) - AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) - ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) - DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) -} - -type labelServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewLabelServiceClient(cc grpc.ClientConnInterface) LabelServiceClient { - return &labelServiceClient{cc} -} - -func (c *labelServiceClient) GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { - out := new(GetLabelsResponse) - err := c.cc.Invoke(ctx, "/api.LabelService/GetAvailableLabels", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *labelServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { - out := new(GetLabelsResponse) - err := c.cc.Invoke(ctx, "/api.LabelService/GetLabels", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *labelServiceClient) AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { - out := new(GetLabelsResponse) - err := c.cc.Invoke(ctx, "/api.LabelService/AddLabels", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *labelServiceClient) ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { - out := new(GetLabelsResponse) - err := c.cc.Invoke(ctx, "/api.LabelService/ReplaceLabels", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *labelServiceClient) DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { - out := new(GetLabelsResponse) - err := c.cc.Invoke(ctx, "/api.LabelService/DeleteLabel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LabelServiceServer is the server API for LabelService service. -type LabelServiceServer interface { - GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error) - GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) - AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error) - ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error) - DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error) -} - -// UnimplementedLabelServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLabelServiceServer struct { -} - -func (*UnimplementedLabelServiceServer) GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAvailableLabels not implemented") -} -func (*UnimplementedLabelServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented") -} -func (*UnimplementedLabelServiceServer) AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddLabels not implemented") -} -func (*UnimplementedLabelServiceServer) ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReplaceLabels not implemented") -} -func (*UnimplementedLabelServiceServer) DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteLabel not implemented") -} - -func RegisterLabelServiceServer(s *grpc.Server, srv LabelServiceServer) { - s.RegisterService(&_LabelService_serviceDesc, srv) -} - -func _LabelService_GetAvailableLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAvailableLabelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LabelServiceServer).GetAvailableLabels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.LabelService/GetAvailableLabels", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LabelServiceServer).GetAvailableLabels(ctx, req.(*GetAvailableLabelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LabelService_GetLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLabelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LabelServiceServer).GetLabels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.LabelService/GetLabels", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LabelServiceServer).GetLabels(ctx, req.(*GetLabelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LabelService_AddLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddLabelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LabelServiceServer).AddLabels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.LabelService/AddLabels", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LabelServiceServer).AddLabels(ctx, req.(*AddLabelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LabelService_ReplaceLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReplaceLabelsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LabelServiceServer).ReplaceLabels(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.LabelService/ReplaceLabels", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LabelServiceServer).ReplaceLabels(ctx, req.(*ReplaceLabelsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _LabelService_DeleteLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteLabelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LabelServiceServer).DeleteLabel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.LabelService/DeleteLabel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LabelServiceServer).DeleteLabel(ctx, req.(*DeleteLabelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _LabelService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.LabelService", - HandlerType: (*LabelServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAvailableLabels", - Handler: _LabelService_GetAvailableLabels_Handler, - }, - { - MethodName: "GetLabels", - Handler: _LabelService_GetLabels_Handler, - }, - { - MethodName: "AddLabels", - Handler: _LabelService_AddLabels_Handler, - }, - { - MethodName: "ReplaceLabels", - Handler: _LabelService_ReplaceLabels_Handler, - }, - { - MethodName: "DeleteLabel", - Handler: _LabelService_DeleteLabel_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "label.proto", -} diff --git a/api/label.pb.gw.go b/api/label.pb.gw.go deleted file mode 100644 index 1c264cc1..00000000 --- a/api/label.pb.gw.go +++ /dev/null @@ -1,842 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: label.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -var ( - filter_LabelService_GetAvailableLabels_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "resource": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableLabelsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LabelService_GetAvailableLabels_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAvailableLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAvailableLabelsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_LabelService_GetAvailableLabels_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAvailableLabels(ctx, &protoReq) - return msg, metadata, err - -} - -func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLabelsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.GetLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLabelsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.GetLabels(ctx, &protoReq) - return msg, metadata, err - -} - -func request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddLabelsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.AddLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddLabelsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.AddLabels(ctx, &protoReq) - return msg, metadata, err - -} - -func request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReplaceLabelsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ReplaceLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReplaceLabelsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ReplaceLabels(ctx, &protoReq) - return msg, metadata, err - -} - -func request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteLabelRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := client.DeleteLabel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteLabelRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["resource"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") - } - - protoReq.Resource, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := server.DeleteLabel(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterLabelServiceHandlerServer registers the http handlers for service LabelService to "mux". -// UnaryRPC :call LabelServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LabelServiceServer) error { - - mux.Handle("GET", pattern_LabelService_GetAvailableLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LabelService_GetLabels_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_GetLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_LabelService_AddLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LabelService_AddLabels_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_AddLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_LabelService_ReplaceLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LabelService_ReplaceLabels_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_ReplaceLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_LabelService_DeleteLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_LabelService_DeleteLabel_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_DeleteLabel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterLabelServiceHandlerFromEndpoint is same as RegisterLabelServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterLabelServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterLabelServiceHandler(ctx, mux, conn) -} - -// RegisterLabelServiceHandler registers the http handlers for service LabelService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterLabelServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterLabelServiceHandlerClient(ctx, mux, NewLabelServiceClient(conn)) -} - -// RegisterLabelServiceHandlerClient registers the http handlers for service LabelService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LabelServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LabelServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "LabelServiceClient" to call the correct interceptors. -func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LabelServiceClient) error { - - mux.Handle("GET", pattern_LabelService_GetAvailableLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LabelService_GetLabels_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_GetLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_LabelService_AddLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LabelService_AddLabels_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_AddLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_LabelService_ReplaceLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LabelService_ReplaceLabels_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_ReplaceLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_LabelService_DeleteLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_LabelService_DeleteLabel_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_LabelService_DeleteLabel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_LabelService_GetAvailableLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 2}, []string{"apis", "v1beta1", "labels", "namespace", "resource"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_LabelService_GetLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_LabelService_AddLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_LabelService_ReplaceLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_LabelService_DeleteLabel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels", "key"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_LabelService_GetAvailableLabels_0 = runtime.ForwardResponseMessage - - forward_LabelService_GetLabels_0 = runtime.ForwardResponseMessage - - forward_LabelService_AddLabels_0 = runtime.ForwardResponseMessage - - forward_LabelService_ReplaceLabels_0 = runtime.ForwardResponseMessage - - forward_LabelService_DeleteLabel_0 = runtime.ForwardResponseMessage -) diff --git a/api/metric.pb.go b/api/metric.pb.go deleted file mode 100644 index 5bb88ad6..00000000 --- a/api/metric.pb.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: metric.proto - -package api - -import ( - proto "github.com/golang/protobuf/proto" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Metric struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` - Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` -} - -func (x *Metric) Reset() { - *x = Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_metric_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metric) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metric) ProtoMessage() {} - -func (x *Metric) ProtoReflect() protoreflect.Message { - mi := &file_metric_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 Metric.ProtoReflect.Descriptor instead. -func (*Metric) Descriptor() ([]byte, []int) { - return file_metric_proto_rawDescGZIP(), []int{0} -} - -func (x *Metric) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Metric) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *Metric) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -var File_metric_proto protoreflect.FileDescriptor - -var file_metric_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x61, 0x70, 0x69, 0x22, 0x4a, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 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, 0x01, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_metric_proto_rawDescOnce sync.Once - file_metric_proto_rawDescData = file_metric_proto_rawDesc -) - -func file_metric_proto_rawDescGZIP() []byte { - file_metric_proto_rawDescOnce.Do(func() { - file_metric_proto_rawDescData = protoimpl.X.CompressGZIP(file_metric_proto_rawDescData) - }) - return file_metric_proto_rawDescData -} - -var file_metric_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_metric_proto_goTypes = []interface{}{ - (*Metric)(nil), // 0: api.Metric -} -var file_metric_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_metric_proto_init() } -func file_metric_proto_init() { - if File_metric_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_metric_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metric); 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_metric_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_metric_proto_goTypes, - DependencyIndexes: file_metric_proto_depIdxs, - MessageInfos: file_metric_proto_msgTypes, - }.Build() - File_metric_proto = out.File - file_metric_proto_rawDesc = nil - file_metric_proto_goTypes = nil - file_metric_proto_depIdxs = nil -} diff --git a/api/namespace.pb.go b/api/namespace.pb.go deleted file mode 100644 index fc140b21..00000000 --- a/api/namespace.pb.go +++ /dev/null @@ -1,538 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: namespace.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type ListNamespacesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` - Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` -} - -func (x *ListNamespacesRequest) Reset() { - *x = ListNamespacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_namespace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNamespacesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNamespacesRequest) ProtoMessage() {} - -func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { - mi := &file_namespace_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 ListNamespacesRequest.ProtoReflect.Descriptor instead. -func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { - return file_namespace_proto_rawDescGZIP(), []int{0} -} - -func (x *ListNamespacesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListNamespacesRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListNamespacesRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -type ListNamespacesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Namespaces []*Namespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` -} - -func (x *ListNamespacesResponse) Reset() { - *x = ListNamespacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_namespace_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNamespacesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNamespacesResponse) ProtoMessage() {} - -func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { - mi := &file_namespace_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 ListNamespacesResponse.ProtoReflect.Descriptor instead. -func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { - return file_namespace_proto_rawDescGZIP(), []int{1} -} - -func (x *ListNamespacesResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { - if x != nil { - return x.Namespaces - } - return nil -} - -func (x *ListNamespacesResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListNamespacesResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListNamespacesResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -type CreateNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *CreateNamespaceRequest) Reset() { - *x = CreateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_namespace_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateNamespaceRequest) ProtoMessage() {} - -func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_namespace_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 CreateNamespaceRequest.ProtoReflect.Descriptor instead. -func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { - return file_namespace_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateNamespaceRequest) GetNamespace() *Namespace { - if x != nil { - return x.Namespace - } - return nil -} - -type Namespace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *Namespace) Reset() { - *x = Namespace{} - if protoimpl.UnsafeEnabled { - mi := &file_namespace_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Namespace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Namespace) ProtoMessage() {} - -func (x *Namespace) ProtoReflect() protoreflect.Message { - mi := &file_namespace_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 Namespace.ProtoReflect.Descriptor instead. -func (*Namespace) Descriptor() ([]byte, []int) { - return file_namespace_proto_rawDescGZIP(), []int{3} -} - -func (x *Namespace) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_namespace_proto protoreflect.FileDescriptor - -var file_namespace_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, - 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x46, - 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0e, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, - 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x25, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_namespace_proto_rawDescOnce sync.Once - file_namespace_proto_rawDescData = file_namespace_proto_rawDesc -) - -func file_namespace_proto_rawDescGZIP() []byte { - file_namespace_proto_rawDescOnce.Do(func() { - file_namespace_proto_rawDescData = protoimpl.X.CompressGZIP(file_namespace_proto_rawDescData) - }) - return file_namespace_proto_rawDescData -} - -var file_namespace_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_namespace_proto_goTypes = []interface{}{ - (*ListNamespacesRequest)(nil), // 0: api.ListNamespacesRequest - (*ListNamespacesResponse)(nil), // 1: api.ListNamespacesResponse - (*CreateNamespaceRequest)(nil), // 2: api.CreateNamespaceRequest - (*Namespace)(nil), // 3: api.Namespace -} -var file_namespace_proto_depIdxs = []int32{ - 3, // 0: api.ListNamespacesResponse.namespaces:type_name -> api.Namespace - 3, // 1: api.CreateNamespaceRequest.namespace:type_name -> api.Namespace - 0, // 2: api.NamespaceService.ListNamespaces:input_type -> api.ListNamespacesRequest - 2, // 3: api.NamespaceService.CreateNamespace:input_type -> api.CreateNamespaceRequest - 1, // 4: api.NamespaceService.ListNamespaces:output_type -> api.ListNamespacesResponse - 3, // 5: api.NamespaceService.CreateNamespace:output_type -> api.Namespace - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] 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_namespace_proto_init() } -func file_namespace_proto_init() { - if File_namespace_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_namespace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNamespacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_namespace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNamespacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_namespace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_namespace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Namespace); 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_namespace_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_namespace_proto_goTypes, - DependencyIndexes: file_namespace_proto_depIdxs, - MessageInfos: file_namespace_proto_msgTypes, - }.Build() - File_namespace_proto = out.File - file_namespace_proto_rawDesc = nil - file_namespace_proto_goTypes = nil - file_namespace_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// NamespaceServiceClient is the client API for NamespaceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NamespaceServiceClient interface { - ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) - CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) -} - -type namespaceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient { - return &namespaceServiceClient{cc} -} - -func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { - out := new(ListNamespacesResponse) - err := c.cc.Invoke(ctx, "/api.NamespaceService/ListNamespaces", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespaceServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) { - out := new(Namespace) - err := c.cc.Invoke(ctx, "/api.NamespaceService/CreateNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NamespaceServiceServer is the server API for NamespaceService service. -type NamespaceServiceServer interface { - ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) - CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) -} - -// UnimplementedNamespaceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedNamespaceServiceServer struct { -} - -func (*UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") -} -func (*UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") -} - -func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer) { - s.RegisterService(&_NamespaceService_serviceDesc, srv) -} - -func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).ListNamespaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.NamespaceService/ListNamespaces", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespaceService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).CreateNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.NamespaceService/CreateNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _NamespaceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.NamespaceService", - HandlerType: (*NamespaceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListNamespaces", - Handler: _NamespaceService_ListNamespaces_Handler, - }, - { - MethodName: "CreateNamespace", - Handler: _NamespaceService_CreateNamespace_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "namespace.proto", -} diff --git a/api/namespace.pb.gw.go b/api/namespace.pb.gw.go deleted file mode 100644 index 37619593..00000000 --- a/api/namespace.pb.gw.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: namespace.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -var ( - filter_NamespaceService_ListNamespaces_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_NamespaceService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_ListNamespaces_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_NamespaceService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_NamespaceService_ListNamespaces_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListNamespaces(ctx, &protoReq) - return msg, metadata, err - -} - -func request_NamespaceService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Namespace); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_NamespaceService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Namespace); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterNamespaceServiceHandlerServer registers the http handlers for service NamespaceService to "mux". -// UnaryRPC :call NamespaceServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error { - - mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_NamespaceService_ListNamespaces_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_NamespaceService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_NamespaceService_CreateNamespace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_NamespaceService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterNamespaceServiceHandlerFromEndpoint is same as RegisterNamespaceServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterNamespaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterNamespaceServiceHandler(ctx, mux, conn) -} - -// RegisterNamespaceServiceHandler registers the http handlers for service NamespaceService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterNamespaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterNamespaceServiceHandlerClient(ctx, mux, NewNamespaceServiceClient(conn)) -} - -// RegisterNamespaceServiceHandlerClient registers the http handlers for service NamespaceService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespaceServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespaceServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "NamespaceServiceClient" to call the correct interceptors. -func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceServiceClient) error { - - mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_NamespaceService_ListNamespaces_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_NamespaceService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_NamespaceService_CreateNamespace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_NamespaceService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_NamespaceService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_NamespaceService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_NamespaceService_ListNamespaces_0 = runtime.ForwardResponseMessage - - forward_NamespaceService_CreateNamespace_0 = runtime.ForwardResponseMessage -) diff --git a/api/api.proto b/api/proto/api.proto similarity index 93% rename from api/api.proto rename to api/proto/api.proto index db35db2d..f515f9d1 100644 --- a/api/api.proto +++ b/api/proto/api.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "protoc-gen-openapiv2/options/annotations.proto"; diff --git a/api/auth.proto b/api/proto/auth.proto similarity index 96% rename from api/auth.proto rename to api/proto/auth.proto index 00f4c07b..91d366ea 100644 --- a/api/auth.proto +++ b/api/proto/auth.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; diff --git a/api/common.proto b/api/proto/common.proto similarity index 85% rename from api/common.proto rename to api/proto/common.proto index ee51926d..5b848a96 100644 --- a/api/common.proto +++ b/api/proto/common.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; message Parameter { string name = 1; diff --git a/api/config.proto b/api/proto/config.proto similarity index 90% rename from api/config.proto rename to api/proto/config.proto index 013ec7cc..4fa2ee30 100644 --- a/api/config.proto +++ b/api/proto/config.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; diff --git a/api/cron_workflow.proto b/api/proto/cron_workflow.proto similarity index 97% rename from api/cron_workflow.proto rename to api/proto/cron_workflow.proto index b59cf633..4076f3f3 100644 --- a/api/cron_workflow.proto +++ b/api/proto/cron_workflow.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; diff --git a/api/label.proto b/api/proto/label.proto similarity index 97% rename from api/label.proto rename to api/proto/label.proto index c6d39762..e5c975ac 100644 --- a/api/label.proto +++ b/api/proto/label.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; diff --git a/api/metric.proto b/api/proto/metric.proto similarity index 67% rename from api/metric.proto rename to api/proto/metric.proto index 94b6eace..f0f1a9bb 100644 --- a/api/metric.proto +++ b/api/proto/metric.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; message Metric { string name = 1; diff --git a/api/namespace.proto b/api/proto/namespace.proto similarity index 93% rename from api/namespace.proto rename to api/proto/namespace.proto index d1a0a771..f766f958 100644 --- a/api/namespace.proto +++ b/api/proto/namespace.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; diff --git a/api/secret.proto b/api/proto/secret.proto similarity index 98% rename from api/secret.proto rename to api/proto/secret.proto index 9bb90817..8947ae8a 100644 --- a/api/secret.proto +++ b/api/proto/secret.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/protobuf/empty.proto"; import "google/api/annotations.proto"; diff --git a/api/services.proto b/api/proto/services.proto similarity index 93% rename from api/services.proto rename to api/proto/services.proto index 23fe7a18..b6095853 100644 --- a/api/services.proto +++ b/api/proto/services.proto @@ -1,9 +1,9 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; service ServiceService { rpc GetService(GetServiceRequest) returns (Service) { diff --git a/api/workflow.proto b/api/proto/workflow.proto similarity index 99% rename from api/workflow.proto rename to api/proto/workflow.proto index 1f9d444f..a5e215a5 100644 --- a/api/workflow.proto +++ b/api/proto/workflow.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; diff --git a/api/workflow_template.proto b/api/proto/workflow_template.proto similarity index 98% rename from api/workflow_template.proto rename to api/proto/workflow_template.proto index 41cd06e1..7fe91e0b 100644 --- a/api/workflow_template.proto +++ b/api/proto/workflow_template.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; import "label.proto"; diff --git a/api/workspace.proto b/api/proto/workspace.proto similarity index 98% rename from api/workspace.proto rename to api/proto/workspace.proto index 819a7dba..2c83d069 100644 --- a/api/workspace.proto +++ b/api/proto/workspace.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; + import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; diff --git a/api/workspace_template.proto b/api/proto/workspace_template.proto similarity index 98% rename from api/workspace_template.proto rename to api/proto/workspace_template.proto index bbe3a566..59d6773a 100644 --- a/api/workspace_template.proto +++ b/api/proto/workspace_template.proto @@ -1,10 +1,10 @@ syntax = "proto3"; package api; +option go_package = "github.com/onepanelio/core/api/gen"; import "google/api/annotations.proto"; import "workflow_template.proto"; -import "google/protobuf/empty.proto"; import "label.proto"; service WorkspaceTemplateService { diff --git a/api/secret.pb.go b/api/secret.pb.go deleted file mode 100644 index 7eb1343a..00000000 --- a/api/secret.pb.go +++ /dev/null @@ -1,1564 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: secret.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type AddSecretKeyValueRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Secret *Secret `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *AddSecretKeyValueRequest) Reset() { - *x = AddSecretKeyValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddSecretKeyValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddSecretKeyValueRequest) ProtoMessage() {} - -func (x *AddSecretKeyValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 AddSecretKeyValueRequest.ProtoReflect.Descriptor instead. -func (*AddSecretKeyValueRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{0} -} - -func (x *AddSecretKeyValueRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *AddSecretKeyValueRequest) GetSecret() *Secret { - if x != nil { - return x.Secret - } - return nil -} - -type AddSecretKeyValueResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Inserted bool `protobuf:"varint,1,opt,name=inserted,proto3" json:"inserted,omitempty"` -} - -func (x *AddSecretKeyValueResponse) Reset() { - *x = AddSecretKeyValueResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddSecretKeyValueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddSecretKeyValueResponse) ProtoMessage() {} - -func (x *AddSecretKeyValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 AddSecretKeyValueResponse.ProtoReflect.Descriptor instead. -func (*AddSecretKeyValueResponse) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{1} -} - -func (x *AddSecretKeyValueResponse) GetInserted() bool { - if x != nil { - return x.Inserted - } - return false -} - -type SecretExistsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *SecretExistsRequest) Reset() { - *x = SecretExistsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretExistsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretExistsRequest) ProtoMessage() {} - -func (x *SecretExistsRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 SecretExistsRequest.ProtoReflect.Descriptor instead. -func (*SecretExistsRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{2} -} - -func (x *SecretExistsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *SecretExistsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type SecretExistsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` -} - -func (x *SecretExistsResponse) Reset() { - *x = SecretExistsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecretExistsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecretExistsResponse) ProtoMessage() {} - -func (x *SecretExistsResponse) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 SecretExistsResponse.ProtoReflect.Descriptor instead. -func (*SecretExistsResponse) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{3} -} - -func (x *SecretExistsResponse) GetExists() bool { - if x != nil { - return x.Exists - } - return false -} - -type UpdateSecretKeyValueRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Secret *Secret `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *UpdateSecretKeyValueRequest) Reset() { - *x = UpdateSecretKeyValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSecretKeyValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSecretKeyValueRequest) ProtoMessage() {} - -func (x *UpdateSecretKeyValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 UpdateSecretKeyValueRequest.ProtoReflect.Descriptor instead. -func (*UpdateSecretKeyValueRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{4} -} - -func (x *UpdateSecretKeyValueRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateSecretKeyValueRequest) GetSecret() *Secret { - if x != nil { - return x.Secret - } - return nil -} - -type UpdateSecretKeyValueResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Updated bool `protobuf:"varint,1,opt,name=updated,proto3" json:"updated,omitempty"` -} - -func (x *UpdateSecretKeyValueResponse) Reset() { - *x = UpdateSecretKeyValueResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSecretKeyValueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSecretKeyValueResponse) ProtoMessage() {} - -func (x *UpdateSecretKeyValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 UpdateSecretKeyValueResponse.ProtoReflect.Descriptor instead. -func (*UpdateSecretKeyValueResponse) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdateSecretKeyValueResponse) GetUpdated() bool { - if x != nil { - return x.Updated - } - return false -} - -type DeleteSecretRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *DeleteSecretRequest) Reset() { - *x = DeleteSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSecretRequest) ProtoMessage() {} - -func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 DeleteSecretRequest.ProtoReflect.Descriptor instead. -func (*DeleteSecretRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{6} -} - -func (x *DeleteSecretRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeleteSecretRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type DeleteSecretKeyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - SecretName string `protobuf:"bytes,2,opt,name=secretName,proto3" json:"secretName,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *DeleteSecretKeyRequest) Reset() { - *x = DeleteSecretKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSecretKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSecretKeyRequest) ProtoMessage() {} - -func (x *DeleteSecretKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 DeleteSecretKeyRequest.ProtoReflect.Descriptor instead. -func (*DeleteSecretKeyRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteSecretKeyRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeleteSecretKeyRequest) GetSecretName() string { - if x != nil { - return x.SecretName - } - return "" -} - -func (x *DeleteSecretKeyRequest) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -type DeleteSecretKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"` -} - -func (x *DeleteSecretKeyResponse) Reset() { - *x = DeleteSecretKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSecretKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSecretKeyResponse) ProtoMessage() {} - -func (x *DeleteSecretKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 DeleteSecretKeyResponse.ProtoReflect.Descriptor instead. -func (*DeleteSecretKeyResponse) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{8} -} - -func (x *DeleteSecretKeyResponse) GetDeleted() bool { - if x != nil { - return x.Deleted - } - return false -} - -type DeleteSecretResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"` -} - -func (x *DeleteSecretResponse) Reset() { - *x = DeleteSecretResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSecretResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSecretResponse) ProtoMessage() {} - -func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 DeleteSecretResponse.ProtoReflect.Descriptor instead. -func (*DeleteSecretResponse) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteSecretResponse) GetDeleted() bool { - if x != nil { - return x.Deleted - } - return false -} - -type ListSecretsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *ListSecretsRequest) Reset() { - *x = ListSecretsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSecretsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSecretsRequest) ProtoMessage() {} - -func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 ListSecretsRequest.ProtoReflect.Descriptor instead. -func (*ListSecretsRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{10} -} - -func (x *ListSecretsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -type ListSecretsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Secrets []*Secret `protobuf:"bytes,2,rep,name=secrets,proto3" json:"secrets,omitempty"` -} - -func (x *ListSecretsResponse) Reset() { - *x = ListSecretsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSecretsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSecretsResponse) ProtoMessage() {} - -func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 ListSecretsResponse.ProtoReflect.Descriptor instead. -func (*ListSecretsResponse) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{11} -} - -func (x *ListSecretsResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListSecretsResponse) GetSecrets() []*Secret { - if x != nil { - return x.Secrets - } - return nil -} - -type CreateSecretRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Secret *Secret `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *CreateSecretRequest) Reset() { - *x = CreateSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSecretRequest) ProtoMessage() {} - -func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 CreateSecretRequest.ProtoReflect.Descriptor instead. -func (*CreateSecretRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{12} -} - -func (x *CreateSecretRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateSecretRequest) GetSecret() *Secret { - if x != nil { - return x.Secret - } - return nil -} - -type GetSecretRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetSecretRequest) Reset() { - *x = GetSecretRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSecretRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSecretRequest) ProtoMessage() {} - -func (x *GetSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_secret_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 GetSecretRequest.ProtoReflect.Descriptor instead. -func (*GetSecretRequest) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{13} -} - -func (x *GetSecretRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetSecretRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Data map[string]string `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_secret_proto_msgTypes[14] - 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_secret_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 Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_secret_proto_rawDescGZIP(), []int{14} -} - -func (x *Secret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Secret) GetData() map[string]string { - if x != nil { - return x.Data - } - return nil -} - -var File_secret_proto protoreflect.FileDescriptor - -var file_secret_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x61, 0x70, 0x69, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, - 0x0a, 0x18, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x37, 0x0a, - 0x19, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, - 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, - 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x2e, 0x0a, 0x14, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, - 0x60, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x22, 0x38, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x33, - 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x22, 0x30, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x13, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0x58, 0x0a, - 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, - 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x44, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x80, 0x01, - 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, - 0x32, 0x90, 0x08, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x21, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x3a, - 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x7c, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x65, - 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6b, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x75, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2a, 0x2a, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8f, 0x01, 0x0a, - 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, - 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x3b, 0x2a, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x93, - 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x22, 0x2f, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x12, 0x9c, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x32, 0x2f, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x06, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_secret_proto_rawDescOnce sync.Once - file_secret_proto_rawDescData = file_secret_proto_rawDesc -) - -func file_secret_proto_rawDescGZIP() []byte { - file_secret_proto_rawDescOnce.Do(func() { - file_secret_proto_rawDescData = protoimpl.X.CompressGZIP(file_secret_proto_rawDescData) - }) - return file_secret_proto_rawDescData -} - -var file_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_secret_proto_goTypes = []interface{}{ - (*AddSecretKeyValueRequest)(nil), // 0: api.AddSecretKeyValueRequest - (*AddSecretKeyValueResponse)(nil), // 1: api.AddSecretKeyValueResponse - (*SecretExistsRequest)(nil), // 2: api.SecretExistsRequest - (*SecretExistsResponse)(nil), // 3: api.SecretExistsResponse - (*UpdateSecretKeyValueRequest)(nil), // 4: api.UpdateSecretKeyValueRequest - (*UpdateSecretKeyValueResponse)(nil), // 5: api.UpdateSecretKeyValueResponse - (*DeleteSecretRequest)(nil), // 6: api.DeleteSecretRequest - (*DeleteSecretKeyRequest)(nil), // 7: api.DeleteSecretKeyRequest - (*DeleteSecretKeyResponse)(nil), // 8: api.DeleteSecretKeyResponse - (*DeleteSecretResponse)(nil), // 9: api.DeleteSecretResponse - (*ListSecretsRequest)(nil), // 10: api.ListSecretsRequest - (*ListSecretsResponse)(nil), // 11: api.ListSecretsResponse - (*CreateSecretRequest)(nil), // 12: api.CreateSecretRequest - (*GetSecretRequest)(nil), // 13: api.GetSecretRequest - (*Secret)(nil), // 14: api.Secret - nil, // 15: api.Secret.DataEntry - (*empty.Empty)(nil), // 16: google.protobuf.Empty -} -var file_secret_proto_depIdxs = []int32{ - 14, // 0: api.AddSecretKeyValueRequest.secret:type_name -> api.Secret - 14, // 1: api.UpdateSecretKeyValueRequest.secret:type_name -> api.Secret - 14, // 2: api.ListSecretsResponse.secrets:type_name -> api.Secret - 14, // 3: api.CreateSecretRequest.secret:type_name -> api.Secret - 15, // 4: api.Secret.data:type_name -> api.Secret.DataEntry - 12, // 5: api.SecretService.CreateSecret:input_type -> api.CreateSecretRequest - 2, // 6: api.SecretService.SecretExists:input_type -> api.SecretExistsRequest - 13, // 7: api.SecretService.GetSecret:input_type -> api.GetSecretRequest - 10, // 8: api.SecretService.ListSecrets:input_type -> api.ListSecretsRequest - 6, // 9: api.SecretService.DeleteSecret:input_type -> api.DeleteSecretRequest - 7, // 10: api.SecretService.DeleteSecretKey:input_type -> api.DeleteSecretKeyRequest - 0, // 11: api.SecretService.AddSecretKeyValue:input_type -> api.AddSecretKeyValueRequest - 4, // 12: api.SecretService.UpdateSecretKeyValue:input_type -> api.UpdateSecretKeyValueRequest - 16, // 13: api.SecretService.CreateSecret:output_type -> google.protobuf.Empty - 3, // 14: api.SecretService.SecretExists:output_type -> api.SecretExistsResponse - 14, // 15: api.SecretService.GetSecret:output_type -> api.Secret - 11, // 16: api.SecretService.ListSecrets:output_type -> api.ListSecretsResponse - 9, // 17: api.SecretService.DeleteSecret:output_type -> api.DeleteSecretResponse - 8, // 18: api.SecretService.DeleteSecretKey:output_type -> api.DeleteSecretKeyResponse - 1, // 19: api.SecretService.AddSecretKeyValue:output_type -> api.AddSecretKeyValueResponse - 5, // 20: api.SecretService.UpdateSecretKeyValue:output_type -> api.UpdateSecretKeyValueResponse - 13, // [13:21] is the sub-list for method output_type - 5, // [5:13] 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_secret_proto_init() } -func file_secret_proto_init() { - if File_secret_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_secret_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddSecretKeyValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddSecretKeyValueResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretExistsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretExistsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSecretKeyValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSecretKeyValueResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSecretKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSecretKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSecretResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecretsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecretsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSecretRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_secret_proto_msgTypes[14].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 - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_secret_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_secret_proto_goTypes, - DependencyIndexes: file_secret_proto_depIdxs, - MessageInfos: file_secret_proto_msgTypes, - }.Build() - File_secret_proto = out.File - file_secret_proto_rawDesc = nil - file_secret_proto_goTypes = nil - file_secret_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SecretServiceClient is the client API for SecretService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SecretServiceClient interface { - CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*empty.Empty, error) - SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error) - GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) - ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) - DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) - DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error) - AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error) - UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error) -} - -type secretServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSecretServiceClient(cc grpc.ClientConnInterface) SecretServiceClient { - return &secretServiceClient{cc} -} - -func (c *secretServiceClient) CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.SecretService/CreateSecret", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error) { - out := new(SecretExistsResponse) - err := c.cc.Invoke(ctx, "/api.SecretService/SecretExists", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) { - out := new(Secret) - err := c.cc.Invoke(ctx, "/api.SecretService/GetSecret", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) { - out := new(ListSecretsResponse) - err := c.cc.Invoke(ctx, "/api.SecretService/ListSecrets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) { - out := new(DeleteSecretResponse) - err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecret", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error) { - out := new(DeleteSecretKeyResponse) - err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecretKey", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error) { - out := new(AddSecretKeyValueResponse) - err := c.cc.Invoke(ctx, "/api.SecretService/AddSecretKeyValue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *secretServiceClient) UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error) { - out := new(UpdateSecretKeyValueResponse) - err := c.cc.Invoke(ctx, "/api.SecretService/UpdateSecretKeyValue", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SecretServiceServer is the server API for SecretService service. -type SecretServiceServer interface { - CreateSecret(context.Context, *CreateSecretRequest) (*empty.Empty, error) - SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error) - GetSecret(context.Context, *GetSecretRequest) (*Secret, error) - ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) - DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) - DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error) - AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error) - UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error) -} - -// UnimplementedSecretServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSecretServiceServer struct { -} - -func (*UnimplementedSecretServiceServer) CreateSecret(context.Context, *CreateSecretRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSecret not implemented") -} -func (*UnimplementedSecretServiceServer) SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SecretExists not implemented") -} -func (*UnimplementedSecretServiceServer) GetSecret(context.Context, *GetSecretRequest) (*Secret, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSecret not implemented") -} -func (*UnimplementedSecretServiceServer) ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSecrets not implemented") -} -func (*UnimplementedSecretServiceServer) DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSecret not implemented") -} -func (*UnimplementedSecretServiceServer) DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSecretKey not implemented") -} -func (*UnimplementedSecretServiceServer) AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddSecretKeyValue not implemented") -} -func (*UnimplementedSecretServiceServer) UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSecretKeyValue not implemented") -} - -func RegisterSecretServiceServer(s *grpc.Server, srv SecretServiceServer) { - s.RegisterService(&_SecretService_serviceDesc, srv) -} - -func _SecretService_CreateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSecretRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).CreateSecret(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/CreateSecret", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).CreateSecret(ctx, req.(*CreateSecretRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_SecretExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SecretExistsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).SecretExists(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/SecretExists", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).SecretExists(ctx, req.(*SecretExistsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSecretRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).GetSecret(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/GetSecret", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).GetSecret(ctx, req.(*GetSecretRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSecretsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).ListSecrets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/ListSecrets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).ListSecrets(ctx, req.(*ListSecretsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_DeleteSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSecretRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).DeleteSecret(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/DeleteSecret", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).DeleteSecret(ctx, req.(*DeleteSecretRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_DeleteSecretKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSecretKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).DeleteSecretKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/DeleteSecretKey", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).DeleteSecretKey(ctx, req.(*DeleteSecretKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_AddSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddSecretKeyValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).AddSecretKeyValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/AddSecretKeyValue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).AddSecretKeyValue(ctx, req.(*AddSecretKeyValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SecretService_UpdateSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSecretKeyValueRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.SecretService/UpdateSecretKeyValue", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, req.(*UpdateSecretKeyValueRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SecretService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.SecretService", - HandlerType: (*SecretServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateSecret", - Handler: _SecretService_CreateSecret_Handler, - }, - { - MethodName: "SecretExists", - Handler: _SecretService_SecretExists_Handler, - }, - { - MethodName: "GetSecret", - Handler: _SecretService_GetSecret_Handler, - }, - { - MethodName: "ListSecrets", - Handler: _SecretService_ListSecrets_Handler, - }, - { - MethodName: "DeleteSecret", - Handler: _SecretService_DeleteSecret_Handler, - }, - { - MethodName: "DeleteSecretKey", - Handler: _SecretService_DeleteSecretKey_Handler, - }, - { - MethodName: "AddSecretKeyValue", - Handler: _SecretService_AddSecretKeyValue_Handler, - }, - { - MethodName: "UpdateSecretKeyValue", - Handler: _SecretService_UpdateSecretKeyValue_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "secret.proto", -} diff --git a/api/secret.pb.gw.go b/api/secret.pb.gw.go deleted file mode 100644 index a88e134f..00000000 --- a/api/secret.pb.gw.go +++ /dev/null @@ -1,1071 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: secret.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_SecretService_CreateSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSecretRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.CreateSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_CreateSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSecretRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.CreateSecret(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_SecretExists_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SecretExistsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := client.SecretExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_SecretExists_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SecretExistsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.SecretExists(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSecretRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := client.GetSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSecretRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.GetSecret(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_ListSecrets_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSecretsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.ListSecrets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_ListSecrets_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSecretsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.ListSecrets(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_DeleteSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSecretRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := client.DeleteSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_DeleteSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSecretRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.DeleteSecret(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSecretKeyRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["secretName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secretName") - } - - protoReq.SecretName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secretName", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := client.DeleteSecretKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSecretKeyRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["secretName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secretName") - } - - protoReq.SecretName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secretName", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := server.DeleteSecretKey(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_AddSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddSecretKeyValueRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["secret.name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) - } - - msg, err := client.AddSecretKeyValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_AddSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddSecretKeyValueRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["secret.name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) - } - - msg, err := server.AddSecretKeyValue(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateSecretKeyValueRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["secret.name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) - } - - msg, err := client.UpdateSecretKeyValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateSecretKeyValueRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["secret.name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) - } - - msg, err := server.UpdateSecretKeyValue(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterSecretServiceHandlerServer registers the http handlers for service SecretService to "mux". -// UnaryRPC :call SecretServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecretServiceServer) error { - - mux.Handle("POST", pattern_SecretService_CreateSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_CreateSecret_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_CreateSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SecretService_SecretExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_SecretExists_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_SecretExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_GetSecret_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_GetSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SecretService_ListSecrets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_ListSecrets_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_ListSecrets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SecretService_DeleteSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_DeleteSecret_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_DeleteSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SecretService_DeleteSecretKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_DeleteSecretKey_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_DeleteSecretKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SecretService_AddSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_AddSecretKeyValue_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_AddSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_SecretService_UpdateSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SecretService_UpdateSecretKeyValue_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_UpdateSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterSecretServiceHandlerFromEndpoint is same as RegisterSecretServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSecretServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterSecretServiceHandler(ctx, mux, conn) -} - -// RegisterSecretServiceHandler registers the http handlers for service SecretService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterSecretServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSecretServiceHandlerClient(ctx, mux, NewSecretServiceClient(conn)) -} - -// RegisterSecretServiceHandlerClient registers the http handlers for service SecretService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecretServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecretServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SecretServiceClient" to call the correct interceptors. -func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecretServiceClient) error { - - mux.Handle("POST", pattern_SecretService_CreateSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_CreateSecret_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_CreateSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SecretService_SecretExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_SecretExists_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_SecretExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_GetSecret_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_GetSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SecretService_ListSecrets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_ListSecrets_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_ListSecrets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SecretService_DeleteSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_DeleteSecret_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_DeleteSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SecretService_DeleteSecretKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_DeleteSecretKey_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_DeleteSecretKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SecretService_AddSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_AddSecretKeyValue_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_AddSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_SecretService_UpdateSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SecretService_UpdateSecretKeyValue_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_SecretService_UpdateSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_SecretService_CreateSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_SecretExists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "secrets", "name", "exists"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_GetSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_ListSecrets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_DeleteSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_DeleteSecretKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "secrets", "secretName", "keys", "key"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_AddSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SecretService_UpdateSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_SecretService_CreateSecret_0 = runtime.ForwardResponseMessage - - forward_SecretService_SecretExists_0 = runtime.ForwardResponseMessage - - forward_SecretService_GetSecret_0 = runtime.ForwardResponseMessage - - forward_SecretService_ListSecrets_0 = runtime.ForwardResponseMessage - - forward_SecretService_DeleteSecret_0 = runtime.ForwardResponseMessage - - forward_SecretService_DeleteSecretKey_0 = runtime.ForwardResponseMessage - - forward_SecretService_AddSecretKeyValue_0 = runtime.ForwardResponseMessage - - forward_SecretService_UpdateSecretKeyValue_0 = runtime.ForwardResponseMessage -) diff --git a/api/services.pb.go b/api/services.pb.go deleted file mode 100644 index 822357d8..00000000 --- a/api/services.pb.go +++ /dev/null @@ -1,557 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: services.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Service struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *Service) Reset() { - *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_services_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Service) ProtoMessage() {} - -func (x *Service) ProtoReflect() protoreflect.Message { - mi := &file_services_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 Service.ProtoReflect.Descriptor instead. -func (*Service) Descriptor() ([]byte, []int) { - return file_services_proto_rawDescGZIP(), []int{0} -} - -func (x *Service) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Service) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type GetServiceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetServiceRequest) Reset() { - *x = GetServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_services_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetServiceRequest) ProtoMessage() {} - -func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_services_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 GetServiceRequest.ProtoReflect.Descriptor instead. -func (*GetServiceRequest) Descriptor() ([]byte, []int) { - return file_services_proto_rawDescGZIP(), []int{1} -} - -func (x *GetServiceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetServiceRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type ListServicesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` -} - -func (x *ListServicesRequest) Reset() { - *x = ListServicesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_services_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListServicesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListServicesRequest) ProtoMessage() {} - -func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { - mi := &file_services_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 ListServicesRequest.ProtoReflect.Descriptor instead. -func (*ListServicesRequest) Descriptor() ([]byte, []int) { - return file_services_proto_rawDescGZIP(), []int{2} -} - -func (x *ListServicesRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListServicesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListServicesRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -type ListServicesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Services []*Service `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` -} - -func (x *ListServicesResponse) Reset() { - *x = ListServicesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_services_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListServicesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListServicesResponse) ProtoMessage() {} - -func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { - mi := &file_services_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 ListServicesResponse.ProtoReflect.Descriptor instead. -func (*ListServicesResponse) Descriptor() ([]byte, []int) { - return file_services_proto_rawDescGZIP(), []int{3} -} - -func (x *ListServicesResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListServicesResponse) GetServices() []*Service { - if x != nil { - return x.Services - } - return nil -} - -func (x *ListServicesResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListServicesResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListServicesResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -var File_services_proto protoreflect.FileDescriptor - -var file_services_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x2f, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x22, 0x45, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xa0, 0x01, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, - 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, - 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x32, 0xe6, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, - 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6e, 0x0a, 0x0c, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_services_proto_rawDescOnce sync.Once - file_services_proto_rawDescData = file_services_proto_rawDesc -) - -func file_services_proto_rawDescGZIP() []byte { - file_services_proto_rawDescOnce.Do(func() { - file_services_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_proto_rawDescData) - }) - return file_services_proto_rawDescData -} - -var file_services_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_services_proto_goTypes = []interface{}{ - (*Service)(nil), // 0: api.Service - (*GetServiceRequest)(nil), // 1: api.GetServiceRequest - (*ListServicesRequest)(nil), // 2: api.ListServicesRequest - (*ListServicesResponse)(nil), // 3: api.ListServicesResponse -} -var file_services_proto_depIdxs = []int32{ - 0, // 0: api.ListServicesResponse.services:type_name -> api.Service - 1, // 1: api.ServiceService.GetService:input_type -> api.GetServiceRequest - 2, // 2: api.ServiceService.ListServices:input_type -> api.ListServicesRequest - 0, // 3: api.ServiceService.GetService:output_type -> api.Service - 3, // 4: api.ServiceService.ListServices:output_type -> api.ListServicesResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_services_proto_init() } -func file_services_proto_init() { - if File_services_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_services_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_services_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetServiceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_services_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListServicesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_services_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListServicesResponse); 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_services_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_services_proto_goTypes, - DependencyIndexes: file_services_proto_depIdxs, - MessageInfos: file_services_proto_msgTypes, - }.Build() - File_services_proto = out.File - file_services_proto_rawDesc = nil - file_services_proto_goTypes = nil - file_services_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ServiceServiceClient is the client API for ServiceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ServiceServiceClient interface { - GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) - ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) -} - -type serviceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceServiceClient(cc grpc.ClientConnInterface) ServiceServiceClient { - return &serviceServiceClient{cc} -} - -func (c *serviceServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) { - out := new(Service) - err := c.cc.Invoke(ctx, "/api.ServiceService/GetService", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { - out := new(ListServicesResponse) - err := c.cc.Invoke(ctx, "/api.ServiceService/ListServices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceServiceServer is the server API for ServiceService service. -type ServiceServiceServer interface { - GetService(context.Context, *GetServiceRequest) (*Service, error) - ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) -} - -// UnimplementedServiceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedServiceServiceServer struct { -} - -func (*UnimplementedServiceServiceServer) GetService(context.Context, *GetServiceRequest) (*Service, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") -} -func (*UnimplementedServiceServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") -} - -func RegisterServiceServiceServer(s *grpc.Server, srv ServiceServiceServer) { - s.RegisterService(&_ServiceService_serviceDesc, srv) -} - -func _ServiceService_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServiceServer).GetService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ServiceService/GetService", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServiceServer).GetService(ctx, req.(*GetServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceService_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListServicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServiceServer).ListServices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ServiceService/ListServices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServiceServer).ListServices(ctx, req.(*ListServicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ServiceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.ServiceService", - HandlerType: (*ServiceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetService", - Handler: _ServiceService_GetService_Handler, - }, - { - MethodName: "ListServices", - Handler: _ServiceService_ListServices_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "services.proto", -} diff --git a/api/services.pb.gw.go b/api/services.pb.gw.go deleted file mode 100644 index eb7356fe..00000000 --- a/api/services.pb.gw.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: services.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_ServiceService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetServiceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ServiceService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetServiceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.GetService(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ServiceService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_ServiceService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListServicesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceService_ListServices_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ServiceService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListServicesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ServiceService_ListServices_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListServices(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterServiceServiceHandlerServer registers the http handlers for service ServiceService to "mux". -// UnaryRPC :call ServiceServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterServiceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServiceServer) error { - - mux.Handle("GET", pattern_ServiceService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ServiceService_GetService_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceService_GetService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ServiceService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ServiceService_ListServices_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterServiceServiceHandlerFromEndpoint is same as RegisterServiceServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterServiceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterServiceServiceHandler(ctx, mux, conn) -} - -// RegisterServiceServiceHandler registers the http handlers for service ServiceService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterServiceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterServiceServiceHandlerClient(ctx, mux, NewServiceServiceClient(conn)) -} - -// RegisterServiceServiceHandlerClient registers the http handlers for service ServiceService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ServiceServiceClient" to call the correct interceptors. -func RegisterServiceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceServiceClient) error { - - mux.Handle("GET", pattern_ServiceService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ServiceService_GetService_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceService_GetService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ServiceService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ServiceService_ListServices_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ServiceService_GetService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "service", "name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ServiceService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "service"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_ServiceService_GetService_0 = runtime.ForwardResponseMessage - - forward_ServiceService_ListServices_0 = runtime.ForwardResponseMessage -) diff --git a/api/workflow.pb.go b/api/workflow.pb.go deleted file mode 100644 index 3de829b2..00000000 --- a/api/workflow.pb.go +++ /dev/null @@ -1,3681 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: workflow.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CreateWorkflowExecutionBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"` - WorkflowTemplateVersion int64 `protobuf:"varint,3,opt,name=workflowTemplateVersion,proto3" json:"workflowTemplateVersion,omitempty"` - Parameters []*Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` - Labels []*KeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *CreateWorkflowExecutionBody) Reset() { - *x = CreateWorkflowExecutionBody{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkflowExecutionBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkflowExecutionBody) ProtoMessage() {} - -func (x *CreateWorkflowExecutionBody) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 CreateWorkflowExecutionBody.ProtoReflect.Descriptor instead. -func (*CreateWorkflowExecutionBody) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateWorkflowExecutionBody) GetWorkflowTemplateUid() string { - if x != nil { - return x.WorkflowTemplateUid - } - return "" -} - -func (x *CreateWorkflowExecutionBody) GetWorkflowTemplateVersion() int64 { - if x != nil { - return x.WorkflowTemplateVersion - } - return 0 -} - -func (x *CreateWorkflowExecutionBody) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *CreateWorkflowExecutionBody) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -type CreateWorkflowExecutionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Body *CreateWorkflowExecutionBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *CreateWorkflowExecutionRequest) Reset() { - *x = CreateWorkflowExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkflowExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkflowExecutionRequest) ProtoMessage() {} - -func (x *CreateWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 CreateWorkflowExecutionRequest.ProtoReflect.Descriptor instead. -func (*CreateWorkflowExecutionRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateWorkflowExecutionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateWorkflowExecutionRequest) GetBody() *CreateWorkflowExecutionBody { - if x != nil { - return x.Body - } - return nil -} - -type CloneWorkflowExecutionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *CloneWorkflowExecutionRequest) Reset() { - *x = CloneWorkflowExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloneWorkflowExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloneWorkflowExecutionRequest) ProtoMessage() {} - -func (x *CloneWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 CloneWorkflowExecutionRequest.ProtoReflect.Descriptor instead. -func (*CloneWorkflowExecutionRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{2} -} - -func (x *CloneWorkflowExecutionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CloneWorkflowExecutionRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type GetWorkflowExecutionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *GetWorkflowExecutionRequest) Reset() { - *x = GetWorkflowExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowExecutionRequest) ProtoMessage() {} - -func (x *GetWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 GetWorkflowExecutionRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowExecutionRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{3} -} - -func (x *GetWorkflowExecutionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkflowExecutionRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type GetArtifactRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *GetArtifactRequest) Reset() { - *x = GetArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetArtifactRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetArtifactRequest) ProtoMessage() {} - -func (x *GetArtifactRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 GetArtifactRequest.ProtoReflect.Descriptor instead. -func (*GetArtifactRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{4} -} - -func (x *GetArtifactRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetArtifactRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GetArtifactRequest) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -type WatchWorkflowExecutionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *WatchWorkflowExecutionRequest) Reset() { - *x = WatchWorkflowExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WatchWorkflowExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WatchWorkflowExecutionRequest) ProtoMessage() {} - -func (x *WatchWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 WatchWorkflowExecutionRequest.ProtoReflect.Descriptor instead. -func (*WatchWorkflowExecutionRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{5} -} - -func (x *WatchWorkflowExecutionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *WatchWorkflowExecutionRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ResubmitWorkflowExecutionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ResubmitWorkflowExecutionRequest) Reset() { - *x = ResubmitWorkflowExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResubmitWorkflowExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResubmitWorkflowExecutionRequest) ProtoMessage() {} - -func (x *ResubmitWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 ResubmitWorkflowExecutionRequest.ProtoReflect.Descriptor instead. -func (*ResubmitWorkflowExecutionRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{6} -} - -func (x *ResubmitWorkflowExecutionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ResubmitWorkflowExecutionRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type TerminateWorkflowExecutionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *TerminateWorkflowExecutionRequest) Reset() { - *x = TerminateWorkflowExecutionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TerminateWorkflowExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TerminateWorkflowExecutionRequest) ProtoMessage() {} - -func (x *TerminateWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 TerminateWorkflowExecutionRequest.ProtoReflect.Descriptor instead. -func (*TerminateWorkflowExecutionRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{7} -} - -func (x *TerminateWorkflowExecutionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *TerminateWorkflowExecutionRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type GetWorkflowExecutionLogsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - PodName string `protobuf:"bytes,3,opt,name=podName,proto3" json:"podName,omitempty"` - ContainerName string `protobuf:"bytes,4,opt,name=containerName,proto3" json:"containerName,omitempty"` -} - -func (x *GetWorkflowExecutionLogsRequest) Reset() { - *x = GetWorkflowExecutionLogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowExecutionLogsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowExecutionLogsRequest) ProtoMessage() {} - -func (x *GetWorkflowExecutionLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 GetWorkflowExecutionLogsRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowExecutionLogsRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{8} -} - -func (x *GetWorkflowExecutionLogsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkflowExecutionLogsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GetWorkflowExecutionLogsRequest) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -func (x *GetWorkflowExecutionLogsRequest) GetContainerName() string { - if x != nil { - return x.ContainerName - } - return "" -} - -type GetWorkflowExecutionMetricsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - PodName string `protobuf:"bytes,3,opt,name=podName,proto3" json:"podName,omitempty"` -} - -func (x *GetWorkflowExecutionMetricsRequest) Reset() { - *x = GetWorkflowExecutionMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowExecutionMetricsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowExecutionMetricsRequest) ProtoMessage() {} - -func (x *GetWorkflowExecutionMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 GetWorkflowExecutionMetricsRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowExecutionMetricsRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{9} -} - -func (x *GetWorkflowExecutionMetricsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkflowExecutionMetricsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GetWorkflowExecutionMetricsRequest) GetPodName() string { - if x != nil { - return x.PodName - } - return "" -} - -type GetWorkflowExecutionMetricsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *GetWorkflowExecutionMetricsResponse) Reset() { - *x = GetWorkflowExecutionMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowExecutionMetricsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowExecutionMetricsResponse) ProtoMessage() {} - -func (x *GetWorkflowExecutionMetricsResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 GetWorkflowExecutionMetricsResponse.ProtoReflect.Descriptor instead. -func (*GetWorkflowExecutionMetricsResponse) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{10} -} - -func (x *GetWorkflowExecutionMetricsResponse) GetMetrics() []*Metric { - if x != nil { - return x.Metrics - } - return nil -} - -type ListWorkflowExecutionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"` - WorkflowTemplateVersion string `protobuf:"bytes,3,opt,name=workflowTemplateVersion,proto3" json:"workflowTemplateVersion,omitempty"` - PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,5,opt,name=page,proto3" json:"page,omitempty"` - Order string `protobuf:"bytes,6,opt,name=order,proto3" json:"order,omitempty"` - Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"` - Phase string `protobuf:"bytes,8,opt,name=phase,proto3" json:"phase,omitempty"` - IncludeSystem bool `protobuf:"varint,9,opt,name=includeSystem,proto3" json:"includeSystem,omitempty"` -} - -func (x *ListWorkflowExecutionsRequest) Reset() { - *x = ListWorkflowExecutionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowExecutionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowExecutionsRequest) ProtoMessage() {} - -func (x *ListWorkflowExecutionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 ListWorkflowExecutionsRequest.ProtoReflect.Descriptor instead. -func (*ListWorkflowExecutionsRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{11} -} - -func (x *ListWorkflowExecutionsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListWorkflowExecutionsRequest) GetWorkflowTemplateUid() string { - if x != nil { - return x.WorkflowTemplateUid - } - return "" -} - -func (x *ListWorkflowExecutionsRequest) GetWorkflowTemplateVersion() string { - if x != nil { - return x.WorkflowTemplateVersion - } - return "" -} - -func (x *ListWorkflowExecutionsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListWorkflowExecutionsRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkflowExecutionsRequest) GetOrder() string { - if x != nil { - return x.Order - } - return "" -} - -func (x *ListWorkflowExecutionsRequest) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -func (x *ListWorkflowExecutionsRequest) GetPhase() string { - if x != nil { - return x.Phase - } - return "" -} - -func (x *ListWorkflowExecutionsRequest) GetIncludeSystem() bool { - if x != nil { - return x.IncludeSystem - } - return false -} - -type ListWorkflowExecutionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkflowExecutions []*WorkflowExecution `protobuf:"bytes,2,rep,name=workflowExecutions,proto3" json:"workflowExecutions,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` - TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` -} - -func (x *ListWorkflowExecutionsResponse) Reset() { - *x = ListWorkflowExecutionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowExecutionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowExecutionsResponse) ProtoMessage() {} - -func (x *ListWorkflowExecutionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 ListWorkflowExecutionsResponse.ProtoReflect.Descriptor instead. -func (*ListWorkflowExecutionsResponse) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{12} -} - -func (x *ListWorkflowExecutionsResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListWorkflowExecutionsResponse) GetWorkflowExecutions() []*WorkflowExecution { - if x != nil { - return x.WorkflowExecutions - } - return nil -} - -func (x *ListWorkflowExecutionsResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkflowExecutionsResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListWorkflowExecutionsResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -func (x *ListWorkflowExecutionsResponse) GetTotalAvailableCount() int32 { - if x != nil { - return x.TotalAvailableCount - } - return 0 -} - -type LogEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Timestamp string `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` -} - -func (x *LogEntry) Reset() { - *x = LogEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogEntry) ProtoMessage() {} - -func (x *LogEntry) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 LogEntry.ProtoReflect.Descriptor instead. -func (*LogEntry) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{13} -} - -func (x *LogEntry) GetTimestamp() string { - if x != nil { - return x.Timestamp - } - return "" -} - -func (x *LogEntry) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -type WorkflowExecutionMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *WorkflowExecutionMetadata) Reset() { - *x = WorkflowExecutionMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowExecutionMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowExecutionMetadata) ProtoMessage() {} - -func (x *WorkflowExecutionMetadata) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 WorkflowExecutionMetadata.ProtoReflect.Descriptor instead. -func (*WorkflowExecutionMetadata) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{14} -} - -func (x *WorkflowExecutionMetadata) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type WorkflowExecution struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` - StartedAt string `protobuf:"bytes,5,opt,name=startedAt,proto3" json:"startedAt,omitempty"` - FinishedAt string `protobuf:"bytes,6,opt,name=finishedAt,proto3" json:"finishedAt,omitempty"` - Manifest string `protobuf:"bytes,7,opt,name=manifest,proto3" json:"manifest,omitempty"` - Parameters []*Parameter `protobuf:"bytes,8,rep,name=parameters,proto3" json:"parameters,omitempty"` - WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,9,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` - Labels []*KeyValue `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty"` - Metadata *WorkflowExecutionMetadata `protobuf:"bytes,11,opt,name=metadata,proto3" json:"metadata,omitempty"` - Metrics []*Metric `protobuf:"bytes,12,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *WorkflowExecution) Reset() { - *x = WorkflowExecution{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowExecution) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowExecution) ProtoMessage() {} - -func (x *WorkflowExecution) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[15] - 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 WorkflowExecution.ProtoReflect.Descriptor instead. -func (*WorkflowExecution) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{15} -} - -func (x *WorkflowExecution) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *WorkflowExecution) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *WorkflowExecution) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WorkflowExecution) GetPhase() string { - if x != nil { - return x.Phase - } - return "" -} - -func (x *WorkflowExecution) GetStartedAt() string { - if x != nil { - return x.StartedAt - } - return "" -} - -func (x *WorkflowExecution) GetFinishedAt() string { - if x != nil { - return x.FinishedAt - } - return "" -} - -func (x *WorkflowExecution) GetManifest() string { - if x != nil { - return x.Manifest - } - return "" -} - -func (x *WorkflowExecution) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *WorkflowExecution) GetWorkflowTemplate() *WorkflowTemplate { - if x != nil { - return x.WorkflowTemplate - } - return nil -} - -func (x *WorkflowExecution) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -func (x *WorkflowExecution) GetMetadata() *WorkflowExecutionMetadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *WorkflowExecution) GetMetrics() []*Metric { - if x != nil { - return x.Metrics - } - return nil -} - -type ArtifactResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *ArtifactResponse) Reset() { - *x = ArtifactResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ArtifactResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArtifactResponse) ProtoMessage() {} - -func (x *ArtifactResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[16] - 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 ArtifactResponse.ProtoReflect.Descriptor instead. -func (*ArtifactResponse) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{16} -} - -func (x *ArtifactResponse) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type File struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Extension string `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` - Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` - ContentType string `protobuf:"bytes,5,opt,name=contentType,proto3" json:"contentType,omitempty"` - LastModified string `protobuf:"bytes,6,opt,name=lastModified,proto3" json:"lastModified,omitempty"` - Directory bool `protobuf:"varint,7,opt,name=directory,proto3" json:"directory,omitempty"` -} - -func (x *File) Reset() { - *x = File{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[17] - 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_workflow_proto_msgTypes[17] - 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_workflow_proto_rawDescGZIP(), []int{17} -} - -func (x *File) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *File) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *File) GetExtension() string { - if x != nil { - return x.Extension - } - return "" -} - -func (x *File) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -func (x *File) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -func (x *File) GetLastModified() string { - if x != nil { - return x.LastModified - } - return "" -} - -func (x *File) GetDirectory() bool { - if x != nil { - return x.Directory - } - return false -} - -type ListFilesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *ListFilesRequest) Reset() { - *x = ListFilesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListFilesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListFilesRequest) ProtoMessage() {} - -func (x *ListFilesRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[18] - 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 ListFilesRequest.ProtoReflect.Descriptor instead. -func (*ListFilesRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{18} -} - -func (x *ListFilesRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListFilesRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *ListFilesRequest) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type ListFilesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` - ParentPath string `protobuf:"bytes,2,opt,name=parentPath,proto3" json:"parentPath,omitempty"` -} - -func (x *ListFilesResponse) Reset() { - *x = ListFilesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListFilesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListFilesResponse) ProtoMessage() {} - -func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[19] - 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 ListFilesResponse.ProtoReflect.Descriptor instead. -func (*ListFilesResponse) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{19} -} - -func (x *ListFilesResponse) GetFiles() []*File { - if x != nil { - return x.Files - } - return nil -} - -func (x *ListFilesResponse) GetParentPath() string { - if x != nil { - return x.ParentPath - } - return "" -} - -type Statistics struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkflowStatus string `protobuf:"bytes,1,opt,name=workflowStatus,proto3" json:"workflowStatus,omitempty"` - WorkflowTemplateId int64 `protobuf:"varint,2,opt,name=workflowTemplateId,proto3" json:"workflowTemplateId,omitempty"` -} - -func (x *Statistics) Reset() { - *x = Statistics{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Statistics) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Statistics) ProtoMessage() {} - -func (x *Statistics) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Statistics.ProtoReflect.Descriptor instead. -func (*Statistics) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{20} -} - -func (x *Statistics) GetWorkflowStatus() string { - if x != nil { - return x.WorkflowStatus - } - return "" -} - -func (x *Statistics) GetWorkflowTemplateId() int64 { - if x != nil { - return x.WorkflowTemplateId - } - return 0 -} - -type AddWorkflowExecutionStatisticRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Statistics *Statistics `protobuf:"bytes,3,opt,name=statistics,proto3" json:"statistics,omitempty"` -} - -func (x *AddWorkflowExecutionStatisticRequest) Reset() { - *x = AddWorkflowExecutionStatisticRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddWorkflowExecutionStatisticRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddWorkflowExecutionStatisticRequest) ProtoMessage() {} - -func (x *AddWorkflowExecutionStatisticRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[21] - 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 AddWorkflowExecutionStatisticRequest.ProtoReflect.Descriptor instead. -func (*AddWorkflowExecutionStatisticRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{21} -} - -func (x *AddWorkflowExecutionStatisticRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *AddWorkflowExecutionStatisticRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *AddWorkflowExecutionStatisticRequest) GetStatistics() *Statistics { - if x != nil { - return x.Statistics - } - return nil -} - -type CronStartWorkflowExecutionStatisticRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Statistics *Statistics `protobuf:"bytes,3,opt,name=statistics,proto3" json:"statistics,omitempty"` -} - -func (x *CronStartWorkflowExecutionStatisticRequest) Reset() { - *x = CronStartWorkflowExecutionStatisticRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CronStartWorkflowExecutionStatisticRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CronStartWorkflowExecutionStatisticRequest) ProtoMessage() {} - -func (x *CronStartWorkflowExecutionStatisticRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[22] - 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 CronStartWorkflowExecutionStatisticRequest.ProtoReflect.Descriptor instead. -func (*CronStartWorkflowExecutionStatisticRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{22} -} - -func (x *CronStartWorkflowExecutionStatisticRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CronStartWorkflowExecutionStatisticRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *CronStartWorkflowExecutionStatisticRequest) GetStatistics() *Statistics { - if x != nil { - return x.Statistics - } - return nil -} - -type WorkflowExecutionStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Phase string `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"` -} - -func (x *WorkflowExecutionStatus) Reset() { - *x = WorkflowExecutionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowExecutionStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowExecutionStatus) ProtoMessage() {} - -func (x *WorkflowExecutionStatus) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 WorkflowExecutionStatus.ProtoReflect.Descriptor instead. -func (*WorkflowExecutionStatus) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{23} -} - -func (x *WorkflowExecutionStatus) GetPhase() string { - if x != nil { - return x.Phase - } - return "" -} - -type UpdateWorkflowExecutionStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Status *WorkflowExecutionStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *UpdateWorkflowExecutionStatusRequest) Reset() { - *x = UpdateWorkflowExecutionStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkflowExecutionStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkflowExecutionStatusRequest) ProtoMessage() {} - -func (x *UpdateWorkflowExecutionStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 UpdateWorkflowExecutionStatusRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkflowExecutionStatusRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{24} -} - -func (x *UpdateWorkflowExecutionStatusRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateWorkflowExecutionStatusRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UpdateWorkflowExecutionStatusRequest) GetStatus() *WorkflowExecutionStatus { - if x != nil { - return x.Status - } - return nil -} - -type GetWorkflowExecutionStatisticsForNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) Reset() { - *x = GetWorkflowExecutionStatisticsForNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoMessage() {} - -func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[25] - 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 GetWorkflowExecutionStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowExecutionStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{25} -} - -func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -type GetWorkflowExecutionStatisticsForNamespaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Stats *WorkflowExecutionStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` -} - -func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) Reset() { - *x = GetWorkflowExecutionStatisticsForNamespaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoMessage() {} - -func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[26] - 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 GetWorkflowExecutionStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead. -func (*GetWorkflowExecutionStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{26} -} - -func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) GetStats() *WorkflowExecutionStatisticReport { - if x != nil { - return x.Stats - } - return nil -} - -type AddWorkflowExecutionMetricRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Metric *Metric `protobuf:"bytes,3,opt,name=metric,proto3" json:"metric,omitempty"` -} - -func (x *AddWorkflowExecutionMetricRequest) Reset() { - *x = AddWorkflowExecutionMetricRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddWorkflowExecutionMetricRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddWorkflowExecutionMetricRequest) ProtoMessage() {} - -func (x *AddWorkflowExecutionMetricRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 AddWorkflowExecutionMetricRequest.ProtoReflect.Descriptor instead. -func (*AddWorkflowExecutionMetricRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{27} -} - -func (x *AddWorkflowExecutionMetricRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *AddWorkflowExecutionMetricRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *AddWorkflowExecutionMetricRequest) GetMetric() *Metric { - if x != nil { - return x.Metric - } - return nil -} - -type AddWorkflowExecutionsMetricsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Override bool `protobuf:"varint,3,opt,name=override,proto3" json:"override,omitempty"` - Metrics []*Metric `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *AddWorkflowExecutionsMetricsRequest) Reset() { - *x = AddWorkflowExecutionsMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddWorkflowExecutionsMetricsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddWorkflowExecutionsMetricsRequest) ProtoMessage() {} - -func (x *AddWorkflowExecutionsMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_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 AddWorkflowExecutionsMetricsRequest.ProtoReflect.Descriptor instead. -func (*AddWorkflowExecutionsMetricsRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{28} -} - -func (x *AddWorkflowExecutionsMetricsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *AddWorkflowExecutionsMetricsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *AddWorkflowExecutionsMetricsRequest) GetOverride() bool { - if x != nil { - return x.Override - } - return false -} - -func (x *AddWorkflowExecutionsMetricsRequest) GetMetrics() []*Metric { - if x != nil { - return x.Metrics - } - return nil -} - -type UpdateWorkflowExecutionsMetricsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Metrics []*Metric `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *UpdateWorkflowExecutionsMetricsRequest) Reset() { - *x = UpdateWorkflowExecutionsMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkflowExecutionsMetricsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkflowExecutionsMetricsRequest) ProtoMessage() {} - -func (x *UpdateWorkflowExecutionsMetricsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[29] - 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 UpdateWorkflowExecutionsMetricsRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkflowExecutionsMetricsRequest) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{29} -} - -func (x *UpdateWorkflowExecutionsMetricsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateWorkflowExecutionsMetricsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UpdateWorkflowExecutionsMetricsRequest) GetMetrics() []*Metric { - if x != nil { - return x.Metrics - } - return nil -} - -type WorkflowExecutionsMetricsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metrics []*Metric `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"` -} - -func (x *WorkflowExecutionsMetricsResponse) Reset() { - *x = WorkflowExecutionsMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowExecutionsMetricsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowExecutionsMetricsResponse) ProtoMessage() {} - -func (x *WorkflowExecutionsMetricsResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_proto_msgTypes[30] - 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 WorkflowExecutionsMetricsResponse.ProtoReflect.Descriptor instead. -func (*WorkflowExecutionsMetricsResponse) Descriptor() ([]byte, []int) { - return file_workflow_proto_rawDescGZIP(), []int{30} -} - -func (x *WorkflowExecutionsMetricsResponse) GetMetrics() []*Metric { - if x != nil { - return x.Metrics - } - return nil -} - -var File_workflow_proto protoreflect.FileDescriptor - -var file_workflow_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, - 0x64, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x55, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, - 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, - 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x74, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x4f, 0x0a, 0x1d, 0x43, - 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x22, 0x4f, 0x0a, 0x1d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x53, 0x0a, 0x21, 0x54, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x91, 0x01, - 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x6e, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x4c, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, - 0xc3, 0x02, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x30, 0x0a, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x69, - 0x64, 0x12, 0x38, 0x0a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, - 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xfa, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, - 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, - 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, - 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x30, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xc4, 0x03, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, - 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x26, 0x0a, 0x10, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0xc4, 0x01, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, - 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x56, 0x0a, 0x10, 0x4c, - 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, - 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2e, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, - 0x87, 0x01, 0x0a, 0x24, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x51, 0x0a, 0x31, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x32, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, - 0x78, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x98, 0x01, 0x0a, 0x23, 0x41, 0x64, - 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x25, 0x0a, - 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x22, 0x7f, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x25, - 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x4a, 0x0a, 0x21, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x32, 0x81, 0x17, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x16, - 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, - 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x33, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, - 0xdf, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x36, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, - 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, - 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x99, 0x01, 0x0a, - 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, - 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, - 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, - 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3e, 0x1a, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x74, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, - 0x12, 0x46, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, - 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, - 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, - 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, - 0x22, 0x3e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xcd, 0x01, 0x0a, - 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5d, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xae, 0x01, 0x0a, - 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb6, 0x01, - 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x28, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x12, 0xbc, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_workflow_proto_rawDescOnce sync.Once - file_workflow_proto_rawDescData = file_workflow_proto_rawDesc -) - -func file_workflow_proto_rawDescGZIP() []byte { - file_workflow_proto_rawDescOnce.Do(func() { - file_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_workflow_proto_rawDescData) - }) - return file_workflow_proto_rawDescData -} - -var file_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 31) -var file_workflow_proto_goTypes = []interface{}{ - (*CreateWorkflowExecutionBody)(nil), // 0: api.CreateWorkflowExecutionBody - (*CreateWorkflowExecutionRequest)(nil), // 1: api.CreateWorkflowExecutionRequest - (*CloneWorkflowExecutionRequest)(nil), // 2: api.CloneWorkflowExecutionRequest - (*GetWorkflowExecutionRequest)(nil), // 3: api.GetWorkflowExecutionRequest - (*GetArtifactRequest)(nil), // 4: api.GetArtifactRequest - (*WatchWorkflowExecutionRequest)(nil), // 5: api.WatchWorkflowExecutionRequest - (*ResubmitWorkflowExecutionRequest)(nil), // 6: api.ResubmitWorkflowExecutionRequest - (*TerminateWorkflowExecutionRequest)(nil), // 7: api.TerminateWorkflowExecutionRequest - (*GetWorkflowExecutionLogsRequest)(nil), // 8: api.GetWorkflowExecutionLogsRequest - (*GetWorkflowExecutionMetricsRequest)(nil), // 9: api.GetWorkflowExecutionMetricsRequest - (*GetWorkflowExecutionMetricsResponse)(nil), // 10: api.GetWorkflowExecutionMetricsResponse - (*ListWorkflowExecutionsRequest)(nil), // 11: api.ListWorkflowExecutionsRequest - (*ListWorkflowExecutionsResponse)(nil), // 12: api.ListWorkflowExecutionsResponse - (*LogEntry)(nil), // 13: api.LogEntry - (*WorkflowExecutionMetadata)(nil), // 14: api.WorkflowExecutionMetadata - (*WorkflowExecution)(nil), // 15: api.WorkflowExecution - (*ArtifactResponse)(nil), // 16: api.ArtifactResponse - (*File)(nil), // 17: api.File - (*ListFilesRequest)(nil), // 18: api.ListFilesRequest - (*ListFilesResponse)(nil), // 19: api.ListFilesResponse - (*Statistics)(nil), // 20: api.Statistics - (*AddWorkflowExecutionStatisticRequest)(nil), // 21: api.AddWorkflowExecutionStatisticRequest - (*CronStartWorkflowExecutionStatisticRequest)(nil), // 22: api.CronStartWorkflowExecutionStatisticRequest - (*WorkflowExecutionStatus)(nil), // 23: api.WorkflowExecutionStatus - (*UpdateWorkflowExecutionStatusRequest)(nil), // 24: api.UpdateWorkflowExecutionStatusRequest - (*GetWorkflowExecutionStatisticsForNamespaceRequest)(nil), // 25: api.GetWorkflowExecutionStatisticsForNamespaceRequest - (*GetWorkflowExecutionStatisticsForNamespaceResponse)(nil), // 26: api.GetWorkflowExecutionStatisticsForNamespaceResponse - (*AddWorkflowExecutionMetricRequest)(nil), // 27: api.AddWorkflowExecutionMetricRequest - (*AddWorkflowExecutionsMetricsRequest)(nil), // 28: api.AddWorkflowExecutionsMetricsRequest - (*UpdateWorkflowExecutionsMetricsRequest)(nil), // 29: api.UpdateWorkflowExecutionsMetricsRequest - (*WorkflowExecutionsMetricsResponse)(nil), // 30: api.WorkflowExecutionsMetricsResponse - (*Parameter)(nil), // 31: api.Parameter - (*KeyValue)(nil), // 32: api.KeyValue - (*Metric)(nil), // 33: api.Metric - (*WorkflowTemplate)(nil), // 34: api.WorkflowTemplate - (*WorkflowExecutionStatisticReport)(nil), // 35: api.WorkflowExecutionStatisticReport - (*empty.Empty)(nil), // 36: google.protobuf.Empty -} -var file_workflow_proto_depIdxs = []int32{ - 31, // 0: api.CreateWorkflowExecutionBody.parameters:type_name -> api.Parameter - 32, // 1: api.CreateWorkflowExecutionBody.labels:type_name -> api.KeyValue - 0, // 2: api.CreateWorkflowExecutionRequest.body:type_name -> api.CreateWorkflowExecutionBody - 33, // 3: api.GetWorkflowExecutionMetricsResponse.metrics:type_name -> api.Metric - 15, // 4: api.ListWorkflowExecutionsResponse.workflowExecutions:type_name -> api.WorkflowExecution - 31, // 5: api.WorkflowExecution.parameters:type_name -> api.Parameter - 34, // 6: api.WorkflowExecution.workflowTemplate:type_name -> api.WorkflowTemplate - 32, // 7: api.WorkflowExecution.labels:type_name -> api.KeyValue - 14, // 8: api.WorkflowExecution.metadata:type_name -> api.WorkflowExecutionMetadata - 33, // 9: api.WorkflowExecution.metrics:type_name -> api.Metric - 17, // 10: api.ListFilesResponse.files:type_name -> api.File - 20, // 11: api.AddWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics - 20, // 12: api.CronStartWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics - 23, // 13: api.UpdateWorkflowExecutionStatusRequest.status:type_name -> api.WorkflowExecutionStatus - 35, // 14: api.GetWorkflowExecutionStatisticsForNamespaceResponse.stats:type_name -> api.WorkflowExecutionStatisticReport - 33, // 15: api.AddWorkflowExecutionMetricRequest.metric:type_name -> api.Metric - 33, // 16: api.AddWorkflowExecutionsMetricsRequest.metrics:type_name -> api.Metric - 33, // 17: api.UpdateWorkflowExecutionsMetricsRequest.metrics:type_name -> api.Metric - 33, // 18: api.WorkflowExecutionsMetricsResponse.metrics:type_name -> api.Metric - 1, // 19: api.WorkflowService.CreateWorkflowExecution:input_type -> api.CreateWorkflowExecutionRequest - 2, // 20: api.WorkflowService.CloneWorkflowExecution:input_type -> api.CloneWorkflowExecutionRequest - 25, // 21: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:input_type -> api.GetWorkflowExecutionStatisticsForNamespaceRequest - 3, // 22: api.WorkflowService.GetWorkflowExecution:input_type -> api.GetWorkflowExecutionRequest - 11, // 23: api.WorkflowService.ListWorkflowExecutions:input_type -> api.ListWorkflowExecutionsRequest - 5, // 24: api.WorkflowService.WatchWorkflowExecution:input_type -> api.WatchWorkflowExecutionRequest - 8, // 25: api.WorkflowService.GetWorkflowExecutionLogs:input_type -> api.GetWorkflowExecutionLogsRequest - 9, // 26: api.WorkflowService.GetWorkflowExecutionMetrics:input_type -> api.GetWorkflowExecutionMetricsRequest - 6, // 27: api.WorkflowService.ResubmitWorkflowExecution:input_type -> api.ResubmitWorkflowExecutionRequest - 7, // 28: api.WorkflowService.TerminateWorkflowExecution:input_type -> api.TerminateWorkflowExecutionRequest - 4, // 29: api.WorkflowService.GetArtifact:input_type -> api.GetArtifactRequest - 18, // 30: api.WorkflowService.ListFiles:input_type -> api.ListFilesRequest - 21, // 31: api.WorkflowService.AddWorkflowExecutionStatistics:input_type -> api.AddWorkflowExecutionStatisticRequest - 22, // 32: api.WorkflowService.CronStartWorkflowExecutionStatistic:input_type -> api.CronStartWorkflowExecutionStatisticRequest - 24, // 33: api.WorkflowService.UpdateWorkflowExecutionStatus:input_type -> api.UpdateWorkflowExecutionStatusRequest - 28, // 34: api.WorkflowService.AddWorkflowExecutionMetrics:input_type -> api.AddWorkflowExecutionsMetricsRequest - 29, // 35: api.WorkflowService.UpdateWorkflowExecutionMetrics:input_type -> api.UpdateWorkflowExecutionsMetricsRequest - 15, // 36: api.WorkflowService.CreateWorkflowExecution:output_type -> api.WorkflowExecution - 15, // 37: api.WorkflowService.CloneWorkflowExecution:output_type -> api.WorkflowExecution - 26, // 38: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:output_type -> api.GetWorkflowExecutionStatisticsForNamespaceResponse - 15, // 39: api.WorkflowService.GetWorkflowExecution:output_type -> api.WorkflowExecution - 12, // 40: api.WorkflowService.ListWorkflowExecutions:output_type -> api.ListWorkflowExecutionsResponse - 15, // 41: api.WorkflowService.WatchWorkflowExecution:output_type -> api.WorkflowExecution - 13, // 42: api.WorkflowService.GetWorkflowExecutionLogs:output_type -> api.LogEntry - 10, // 43: api.WorkflowService.GetWorkflowExecutionMetrics:output_type -> api.GetWorkflowExecutionMetricsResponse - 15, // 44: api.WorkflowService.ResubmitWorkflowExecution:output_type -> api.WorkflowExecution - 36, // 45: api.WorkflowService.TerminateWorkflowExecution:output_type -> google.protobuf.Empty - 16, // 46: api.WorkflowService.GetArtifact:output_type -> api.ArtifactResponse - 19, // 47: api.WorkflowService.ListFiles:output_type -> api.ListFilesResponse - 36, // 48: api.WorkflowService.AddWorkflowExecutionStatistics:output_type -> google.protobuf.Empty - 36, // 49: api.WorkflowService.CronStartWorkflowExecutionStatistic:output_type -> google.protobuf.Empty - 36, // 50: api.WorkflowService.UpdateWorkflowExecutionStatus:output_type -> google.protobuf.Empty - 30, // 51: api.WorkflowService.AddWorkflowExecutionMetrics:output_type -> api.WorkflowExecutionsMetricsResponse - 30, // 52: api.WorkflowService.UpdateWorkflowExecutionMetrics:output_type -> api.WorkflowExecutionsMetricsResponse - 36, // [36:53] is the sub-list for method output_type - 19, // [19:36] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_workflow_proto_init() } -func file_workflow_proto_init() { - if File_workflow_proto != nil { - return - } - file_workflow_template_proto_init() - file_metric_proto_init() - file_label_proto_init() - file_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkflowExecutionBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkflowExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloneWorkflowExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WatchWorkflowExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResubmitWorkflowExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminateWorkflowExecutionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowExecutionLogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowExecutionMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowExecutionMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowExecutionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowExecutionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowExecutionMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowExecution); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArtifactResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[17].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_workflow_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFilesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListFilesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Statistics); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddWorkflowExecutionStatisticRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CronStartWorkflowExecutionStatisticRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowExecutionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkflowExecutionStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddWorkflowExecutionMetricRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddWorkflowExecutionsMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkflowExecutionsMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowExecutionsMetricsResponse); 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_workflow_proto_rawDesc, - NumEnums: 0, - NumMessages: 31, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_workflow_proto_goTypes, - DependencyIndexes: file_workflow_proto_depIdxs, - MessageInfos: file_workflow_proto_msgTypes, - }.Build() - File_workflow_proto = out.File - file_workflow_proto_rawDesc = nil - file_workflow_proto_goTypes = nil - file_workflow_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// WorkflowServiceClient is the client API for WorkflowService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WorkflowServiceClient interface { - // Creates a Workflow - CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) - // Clone a Workflow. This is the same as running it again. - CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) - GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) - GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) - ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error) - WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error) - GetWorkflowExecutionLogs(ctx context.Context, in *GetWorkflowExecutionLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowExecutionLogsClient, error) - GetWorkflowExecutionMetrics(ctx context.Context, in *GetWorkflowExecutionMetricsRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionMetricsResponse, error) - ResubmitWorkflowExecution(ctx context.Context, in *ResubmitWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) - TerminateWorkflowExecution(ctx context.Context, in *TerminateWorkflowExecutionRequest, opts ...grpc.CallOption) (*empty.Empty, error) - GetArtifact(ctx context.Context, in *GetArtifactRequest, opts ...grpc.CallOption) (*ArtifactResponse, error) - ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) - AddWorkflowExecutionStatistics(ctx context.Context, in *AddWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*empty.Empty, error) - CronStartWorkflowExecutionStatistic(ctx context.Context, in *CronStartWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*empty.Empty, error) - UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error) - AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) - UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) -} - -type workflowServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewWorkflowServiceClient(cc grpc.ClientConnInterface) WorkflowServiceClient { - return &workflowServiceClient{cc} -} - -func (c *workflowServiceClient) CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { - out := new(WorkflowExecution) - err := c.cc.Invoke(ctx, "/api.WorkflowService/CreateWorkflowExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { - out := new(WorkflowExecution) - err := c.cc.Invoke(ctx, "/api.WorkflowService/CloneWorkflowExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) { - out := new(GetWorkflowExecutionStatisticsForNamespaceResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { - out := new(WorkflowExecution) - err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error) { - out := new(ListWorkflowExecutionsResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/ListWorkflowExecutions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error) { - stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[0], "/api.WorkflowService/WatchWorkflowExecution", opts...) - if err != nil { - return nil, err - } - x := &workflowServiceWatchWorkflowExecutionClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type WorkflowService_WatchWorkflowExecutionClient interface { - Recv() (*WorkflowExecution, error) - grpc.ClientStream -} - -type workflowServiceWatchWorkflowExecutionClient struct { - grpc.ClientStream -} - -func (x *workflowServiceWatchWorkflowExecutionClient) Recv() (*WorkflowExecution, error) { - m := new(WorkflowExecution) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *workflowServiceClient) GetWorkflowExecutionLogs(ctx context.Context, in *GetWorkflowExecutionLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowExecutionLogsClient, error) { - stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[1], "/api.WorkflowService/GetWorkflowExecutionLogs", opts...) - if err != nil { - return nil, err - } - x := &workflowServiceGetWorkflowExecutionLogsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type WorkflowService_GetWorkflowExecutionLogsClient interface { - Recv() (*LogEntry, error) - grpc.ClientStream -} - -type workflowServiceGetWorkflowExecutionLogsClient struct { - grpc.ClientStream -} - -func (x *workflowServiceGetWorkflowExecutionLogsClient) Recv() (*LogEntry, error) { - m := new(LogEntry) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *workflowServiceClient) GetWorkflowExecutionMetrics(ctx context.Context, in *GetWorkflowExecutionMetricsRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionMetricsResponse, error) { - out := new(GetWorkflowExecutionMetricsResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) ResubmitWorkflowExecution(ctx context.Context, in *ResubmitWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { - out := new(WorkflowExecution) - err := c.cc.Invoke(ctx, "/api.WorkflowService/ResubmitWorkflowExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) TerminateWorkflowExecution(ctx context.Context, in *TerminateWorkflowExecutionRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkflowService/TerminateWorkflowExecution", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) GetArtifact(ctx context.Context, in *GetArtifactRequest, opts ...grpc.CallOption) (*ArtifactResponse, error) { - out := new(ArtifactResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/GetArtifact", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { - out := new(ListFilesResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/ListFiles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) AddWorkflowExecutionStatistics(ctx context.Context, in *AddWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkflowService/AddWorkflowExecutionStatistics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) CronStartWorkflowExecutionStatistic(ctx context.Context, in *CronStartWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkflowService/CronStartWorkflowExecutionStatistic", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkflowService/UpdateWorkflowExecutionStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) { - out := new(WorkflowExecutionsMetricsResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/AddWorkflowExecutionMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowServiceClient) UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) { - out := new(WorkflowExecutionsMetricsResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowService/UpdateWorkflowExecutionMetrics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WorkflowServiceServer is the server API for WorkflowService service. -type WorkflowServiceServer interface { - // Creates a Workflow - CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error) - // Clone a Workflow. This is the same as running it again. - CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error) - GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) - GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error) - ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) - WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error - GetWorkflowExecutionLogs(*GetWorkflowExecutionLogsRequest, WorkflowService_GetWorkflowExecutionLogsServer) error - GetWorkflowExecutionMetrics(context.Context, *GetWorkflowExecutionMetricsRequest) (*GetWorkflowExecutionMetricsResponse, error) - ResubmitWorkflowExecution(context.Context, *ResubmitWorkflowExecutionRequest) (*WorkflowExecution, error) - TerminateWorkflowExecution(context.Context, *TerminateWorkflowExecutionRequest) (*empty.Empty, error) - GetArtifact(context.Context, *GetArtifactRequest) (*ArtifactResponse, error) - ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) - AddWorkflowExecutionStatistics(context.Context, *AddWorkflowExecutionStatisticRequest) (*empty.Empty, error) - CronStartWorkflowExecutionStatistic(context.Context, *CronStartWorkflowExecutionStatisticRequest) (*empty.Empty, error) - UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*empty.Empty, error) - AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) - UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) -} - -// UnimplementedWorkflowServiceServer can be embedded to have forward compatible implementations. -type UnimplementedWorkflowServiceServer struct { -} - -func (*UnimplementedWorkflowServiceServer) CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowExecution not implemented") -} -func (*UnimplementedWorkflowServiceServer) CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowExecution not implemented") -} -func (*UnimplementedWorkflowServiceServer) GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionStatisticsForNamespace not implemented") -} -func (*UnimplementedWorkflowServiceServer) GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecution not implemented") -} -func (*UnimplementedWorkflowServiceServer) ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowExecutions not implemented") -} -func (*UnimplementedWorkflowServiceServer) WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error { - return status.Errorf(codes.Unimplemented, "method WatchWorkflowExecution not implemented") -} -func (*UnimplementedWorkflowServiceServer) GetWorkflowExecutionLogs(*GetWorkflowExecutionLogsRequest, WorkflowService_GetWorkflowExecutionLogsServer) error { - return status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionLogs not implemented") -} -func (*UnimplementedWorkflowServiceServer) GetWorkflowExecutionMetrics(context.Context, *GetWorkflowExecutionMetricsRequest) (*GetWorkflowExecutionMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionMetrics not implemented") -} -func (*UnimplementedWorkflowServiceServer) ResubmitWorkflowExecution(context.Context, *ResubmitWorkflowExecutionRequest) (*WorkflowExecution, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResubmitWorkflowExecution not implemented") -} -func (*UnimplementedWorkflowServiceServer) TerminateWorkflowExecution(context.Context, *TerminateWorkflowExecutionRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method TerminateWorkflowExecution not implemented") -} -func (*UnimplementedWorkflowServiceServer) GetArtifact(context.Context, *GetArtifactRequest) (*ArtifactResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetArtifact not implemented") -} -func (*UnimplementedWorkflowServiceServer) ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListFiles not implemented") -} -func (*UnimplementedWorkflowServiceServer) AddWorkflowExecutionStatistics(context.Context, *AddWorkflowExecutionStatisticRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddWorkflowExecutionStatistics not implemented") -} -func (*UnimplementedWorkflowServiceServer) CronStartWorkflowExecutionStatistic(context.Context, *CronStartWorkflowExecutionStatisticRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CronStartWorkflowExecutionStatistic not implemented") -} -func (*UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionStatus not implemented") -} -func (*UnimplementedWorkflowServiceServer) AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddWorkflowExecutionMetrics not implemented") -} -func (*UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionMetrics not implemented") -} - -func RegisterWorkflowServiceServer(s *grpc.Server, srv WorkflowServiceServer) { - s.RegisterService(&_WorkflowService_serviceDesc, srv) -} - -func _WorkflowService_CreateWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWorkflowExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).CreateWorkflowExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/CreateWorkflowExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).CreateWorkflowExecution(ctx, req.(*CreateWorkflowExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_CloneWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CloneWorkflowExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).CloneWorkflowExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/CloneWorkflowExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).CloneWorkflowExecution(ctx, req.(*CloneWorkflowExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowExecutionStatisticsForNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, req.(*GetWorkflowExecutionStatisticsForNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_GetWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/GetWorkflowExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowExecution(ctx, req.(*GetWorkflowExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_ListWorkflowExecutions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkflowExecutionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).ListWorkflowExecutions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/ListWorkflowExecutions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).ListWorkflowExecutions(ctx, req.(*ListWorkflowExecutionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_WatchWorkflowExecution_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(WatchWorkflowExecutionRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WorkflowServiceServer).WatchWorkflowExecution(m, &workflowServiceWatchWorkflowExecutionServer{stream}) -} - -type WorkflowService_WatchWorkflowExecutionServer interface { - Send(*WorkflowExecution) error - grpc.ServerStream -} - -type workflowServiceWatchWorkflowExecutionServer struct { - grpc.ServerStream -} - -func (x *workflowServiceWatchWorkflowExecutionServer) Send(m *WorkflowExecution) error { - return x.ServerStream.SendMsg(m) -} - -func _WorkflowService_GetWorkflowExecutionLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetWorkflowExecutionLogsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WorkflowServiceServer).GetWorkflowExecutionLogs(m, &workflowServiceGetWorkflowExecutionLogsServer{stream}) -} - -type WorkflowService_GetWorkflowExecutionLogsServer interface { - Send(*LogEntry) error - grpc.ServerStream -} - -type workflowServiceGetWorkflowExecutionLogsServer struct { - grpc.ServerStream -} - -func (x *workflowServiceGetWorkflowExecutionLogsServer) Send(m *LogEntry) error { - return x.ServerStream.SendMsg(m) -} - -func _WorkflowService_GetWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowExecutionMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetWorkflowExecutionMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/GetWorkflowExecutionMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetWorkflowExecutionMetrics(ctx, req.(*GetWorkflowExecutionMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_ResubmitWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResubmitWorkflowExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).ResubmitWorkflowExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/ResubmitWorkflowExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).ResubmitWorkflowExecution(ctx, req.(*ResubmitWorkflowExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_TerminateWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TerminateWorkflowExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).TerminateWorkflowExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/TerminateWorkflowExecution", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).TerminateWorkflowExecution(ctx, req.(*TerminateWorkflowExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_GetArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetArtifactRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).GetArtifact(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/GetArtifact", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).GetArtifact(ctx, req.(*GetArtifactRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_ListFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListFilesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).ListFiles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/ListFiles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).ListFiles(ctx, req.(*ListFilesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_AddWorkflowExecutionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddWorkflowExecutionStatisticRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).AddWorkflowExecutionStatistics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/AddWorkflowExecutionStatistics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).AddWorkflowExecutionStatistics(ctx, req.(*AddWorkflowExecutionStatisticRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_CronStartWorkflowExecutionStatistic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CronStartWorkflowExecutionStatisticRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).CronStartWorkflowExecutionStatistic(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/CronStartWorkflowExecutionStatistic", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).CronStartWorkflowExecutionStatistic(ctx, req.(*CronStartWorkflowExecutionStatisticRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_UpdateWorkflowExecutionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateWorkflowExecutionStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).UpdateWorkflowExecutionStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/UpdateWorkflowExecutionStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).UpdateWorkflowExecutionStatus(ctx, req.(*UpdateWorkflowExecutionStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_AddWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddWorkflowExecutionsMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).AddWorkflowExecutionMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/AddWorkflowExecutionMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).AddWorkflowExecutionMetrics(ctx, req.(*AddWorkflowExecutionsMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowService_UpdateWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateWorkflowExecutionsMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowServiceServer).UpdateWorkflowExecutionMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowService/UpdateWorkflowExecutionMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowServiceServer).UpdateWorkflowExecutionMetrics(ctx, req.(*UpdateWorkflowExecutionsMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _WorkflowService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.WorkflowService", - HandlerType: (*WorkflowServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateWorkflowExecution", - Handler: _WorkflowService_CreateWorkflowExecution_Handler, - }, - { - MethodName: "CloneWorkflowExecution", - Handler: _WorkflowService_CloneWorkflowExecution_Handler, - }, - { - MethodName: "GetWorkflowExecutionStatisticsForNamespace", - Handler: _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler, - }, - { - MethodName: "GetWorkflowExecution", - Handler: _WorkflowService_GetWorkflowExecution_Handler, - }, - { - MethodName: "ListWorkflowExecutions", - Handler: _WorkflowService_ListWorkflowExecutions_Handler, - }, - { - MethodName: "GetWorkflowExecutionMetrics", - Handler: _WorkflowService_GetWorkflowExecutionMetrics_Handler, - }, - { - MethodName: "ResubmitWorkflowExecution", - Handler: _WorkflowService_ResubmitWorkflowExecution_Handler, - }, - { - MethodName: "TerminateWorkflowExecution", - Handler: _WorkflowService_TerminateWorkflowExecution_Handler, - }, - { - MethodName: "GetArtifact", - Handler: _WorkflowService_GetArtifact_Handler, - }, - { - MethodName: "ListFiles", - Handler: _WorkflowService_ListFiles_Handler, - }, - { - MethodName: "AddWorkflowExecutionStatistics", - Handler: _WorkflowService_AddWorkflowExecutionStatistics_Handler, - }, - { - MethodName: "CronStartWorkflowExecutionStatistic", - Handler: _WorkflowService_CronStartWorkflowExecutionStatistic_Handler, - }, - { - MethodName: "UpdateWorkflowExecutionStatus", - Handler: _WorkflowService_UpdateWorkflowExecutionStatus_Handler, - }, - { - MethodName: "AddWorkflowExecutionMetrics", - Handler: _WorkflowService_AddWorkflowExecutionMetrics_Handler, - }, - { - MethodName: "UpdateWorkflowExecutionMetrics", - Handler: _WorkflowService_UpdateWorkflowExecutionMetrics_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "WatchWorkflowExecution", - Handler: _WorkflowService_WatchWorkflowExecution_Handler, - ServerStreams: true, - }, - { - StreamName: "GetWorkflowExecutionLogs", - Handler: _WorkflowService_GetWorkflowExecutionLogs_Handler, - ServerStreams: true, - }, - }, - Metadata: "workflow.proto", -} diff --git a/api/workflow.pb.gw.go b/api/workflow.pb.gw.go deleted file mode 100644 index c263dea2..00000000 --- a/api/workflow.pb.gw.go +++ /dev/null @@ -1,2172 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: workflow.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_WorkflowService_CreateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.CreateWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_CreateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.CreateWorkflowExecution(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_CloneWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CloneWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.CloneWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_CloneWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CloneWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.CloneWorkflowExecution(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_GetWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.GetWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_GetWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.GetWorkflowExecution(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkflowService_ListWorkflowExecutions_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_WorkflowService_ListWorkflowExecutions_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkflowExecutionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowService_ListWorkflowExecutions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListWorkflowExecutions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_ListWorkflowExecutions_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkflowExecutionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkflowService_ListWorkflowExecutions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListWorkflowExecutions(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_WatchWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (WorkflowService_WatchWorkflowExecutionClient, runtime.ServerMetadata, error) { - var protoReq WatchWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - stream, err := client.WatchWorkflowExecution(ctx, &protoReq) - if err != nil { - return nil, metadata, err - } - header, err := stream.Header() - if err != nil { - return nil, metadata, err - } - metadata.HeaderMD = header - return stream, metadata, nil - -} - -func request_WorkflowService_GetWorkflowExecutionLogs_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (WorkflowService_GetWorkflowExecutionLogsClient, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionLogsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["podName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName") - } - - protoReq.PodName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err) - } - - val, ok = pathParams["containerName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "containerName") - } - - protoReq.ContainerName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "containerName", err) - } - - stream, err := client.GetWorkflowExecutionLogs(ctx, &protoReq) - if err != nil { - return nil, metadata, err - } - header, err := stream.Header() - if err != nil { - return nil, metadata, err - } - metadata.HeaderMD = header - return stream, metadata, nil - -} - -func request_WorkflowService_GetWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionMetricsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["podName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName") - } - - protoReq.PodName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err) - } - - msg, err := client.GetWorkflowExecutionMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_GetWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowExecutionMetricsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["podName"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName") - } - - protoReq.PodName, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err) - } - - msg, err := server.GetWorkflowExecutionMetrics(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_ResubmitWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResubmitWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ResubmitWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_ResubmitWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResubmitWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ResubmitWorkflowExecution(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_TerminateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TerminateWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.TerminateWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_TerminateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TerminateWorkflowExecutionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.TerminateWorkflowExecution(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_GetArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetArtifactRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := client.GetArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_GetArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetArtifactRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") - } - - protoReq.Key, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) - } - - msg, err := server.GetArtifact(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListFilesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["path"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") - } - - protoReq.Path, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) - } - - msg, err := client.ListFiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListFilesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["path"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") - } - - protoReq.Path, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) - } - - msg, err := server.ListFiles(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_AddWorkflowExecutionStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddWorkflowExecutionStatisticRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.AddWorkflowExecutionStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_AddWorkflowExecutionStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddWorkflowExecutionStatisticRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.AddWorkflowExecutionStatistics(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CronStartWorkflowExecutionStatisticRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.CronStartWorkflowExecutionStatistic(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CronStartWorkflowExecutionStatisticRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.CronStartWorkflowExecutionStatistic(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkflowExecutionStatusRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.UpdateWorkflowExecutionStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkflowExecutionStatusRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.UpdateWorkflowExecutionStatus(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_AddWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddWorkflowExecutionsMetricsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.AddWorkflowExecutionMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_AddWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddWorkflowExecutionsMetricsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.AddWorkflowExecutionMetrics(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkflowExecutionsMetricsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.UpdateWorkflowExecutionMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkflowExecutionsMetricsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.UpdateWorkflowExecutionMetrics(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterWorkflowServiceHandlerServer registers the http handlers for service WorkflowService to "mux". -// UnaryRPC :call WorkflowServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkflowServiceServer) error { - - mux.Handle("POST", pattern_WorkflowService_CreateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_CreateWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_CreateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_CloneWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_CloneWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_CloneWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_GetWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_ListWorkflowExecutions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_ListWorkflowExecutions_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_ListWorkflowExecutions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_WatchWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") - _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") - _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_GetWorkflowExecutionMetrics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_ResubmitWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_ResubmitWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_ResubmitWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_TerminateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_TerminateWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_TerminateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_GetArtifact_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_ListFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_ListFiles_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_ListFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_AddWorkflowExecutionStatistics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_AddWorkflowExecutionStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_CronStartWorkflowExecutionStatistic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_CronStartWorkflowExecutionStatistic_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_UpdateWorkflowExecutionStatus_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_AddWorkflowExecutionMetrics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_AddWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowService_UpdateWorkflowExecutionMetrics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterWorkflowServiceHandlerFromEndpoint is same as RegisterWorkflowServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterWorkflowServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterWorkflowServiceHandler(ctx, mux, conn) -} - -// RegisterWorkflowServiceHandler registers the http handlers for service WorkflowService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWorkflowServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterWorkflowServiceHandlerClient(ctx, mux, NewWorkflowServiceClient(conn)) -} - -// RegisterWorkflowServiceHandlerClient registers the http handlers for service WorkflowService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkflowServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkflowServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WorkflowServiceClient" to call the correct interceptors. -func RegisterWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkflowServiceClient) error { - - mux.Handle("POST", pattern_WorkflowService_CreateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_CreateWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_CreateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_CloneWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_CloneWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_CloneWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_GetWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_ListWorkflowExecutions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_ListWorkflowExecutions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_ListWorkflowExecutions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_WatchWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_WatchWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_WatchWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_GetWorkflowExecutionLogs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecutionLogs_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_GetWorkflowExecutionMetrics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_ResubmitWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_ResubmitWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_ResubmitWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_TerminateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_TerminateWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_TerminateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_GetArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_GetArtifact_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_GetArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowService_ListFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_ListFiles_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_ListFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_AddWorkflowExecutionStatistics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_AddWorkflowExecutionStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_CronStartWorkflowExecutionStatistic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_CronStartWorkflowExecutionStatistic_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_UpdateWorkflowExecutionStatus_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_AddWorkflowExecutionMetrics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_AddWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowService_UpdateWorkflowExecutionMetrics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_WorkflowService_CreateWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_executions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_CloneWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "statistics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_GetWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_ListWorkflowExecutions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_executions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_WatchWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "watch"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_GetWorkflowExecutionLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "pods", "podName", "containers", "containerName", "logs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_GetWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "pods", "podName", "metrics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_ResubmitWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "resubmit"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_TerminateWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "terminate"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_GetArtifact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 3, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "artifacts", "key"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_ListFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 3, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "files", "path"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_AddWorkflowExecutionStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "statistics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_CronStartWorkflowExecutionStatistic_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "cron_start_statistics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_UpdateWorkflowExecutionStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "status"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_AddWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "metric"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "metric"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_WorkflowService_CreateWorkflowExecution_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_CloneWorkflowExecution_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_GetWorkflowExecution_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_ListWorkflowExecutions_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_WatchWorkflowExecution_0 = runtime.ForwardResponseStream - - forward_WorkflowService_GetWorkflowExecutionLogs_0 = runtime.ForwardResponseStream - - forward_WorkflowService_GetWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_ResubmitWorkflowExecution_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_TerminateWorkflowExecution_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_GetArtifact_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_ListFiles_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_AddWorkflowExecutionStatistics_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_CronStartWorkflowExecutionStatistic_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_UpdateWorkflowExecutionStatus_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_AddWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage - - forward_WorkflowService_UpdateWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage -) diff --git a/api/workflow.swagger.json b/api/workflow.swagger.json deleted file mode 100644 index ce47c056..00000000 --- a/api/workflow.swagger.json +++ /dev/null @@ -1,809 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "workflow.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/apis/v1beta1/{namespace}/workflow_executions": { - "post": { - "summary": "Creates a Workflow", - "operationId": "CreateWorkflowExecution", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowExecution" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/apiWorkflowExecution" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_executions/{name}": { - "get": { - "operationId": "GetWorkflowExecution", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowExecution" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_executions/{name}/pods/{podName}/containers/{containerName}/logs": { - "get": { - "operationId": "GetWorkflowExecutionLogs", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "$ref": "#/x-stream-definitions/apiLogEntry" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "podName", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "containerName", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_executions/{name}/pods/{podName}/metrics": { - "get": { - "operationId": "GetWorkflowExecutionMetrics", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiGetWorkflowExecutionMetricsResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "podName", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_executions/{name}/resubmit": { - "put": { - "operationId": "ResubmitWorkflowExecution", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowExecution" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_executions/{name}/terminate": { - "put": { - "operationId": "TerminateWorkflowExecution", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_executions/{name}/watch": { - "get": { - "operationId": "WatchWorkflowExecution", - "responses": { - "200": { - "description": "A successful response.(streaming responses)", - "schema": { - "$ref": "#/x-stream-definitions/apiWorkflowExecution" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "name", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates": { - "get": { - "operationId": "ListWorkflowTemplates", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiListWorkflowTemplatesResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - }, - "post": { - "operationId": "CreateWorkflowTemplate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates/{uid}": { - "get": { - "operationId": "GetWorkflowTemplate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "uid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "version", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates/{uid}/archive": { - "put": { - "operationId": "ArchiveWorkflowTemplate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiArchiveWorkflowTemplateResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "uid", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates/{uid}/versions": { - "get": { - "operationId": "ListWorkflowTemplateVersions", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiListWorkflowTemplateVersionsResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "uid", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates/{uid}/versions/{version}": { - "get": { - "operationId": "GetWorkflowTemplate2", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "uid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "version", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions": { - "post": { - "operationId": "CreateWorkflowTemplateVersion", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowTemplate.uid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version}": { - "put": { - "operationId": "UpdateWorkflowTemplateVersion", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowTemplate.uid", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowTemplate.version", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - ], - "tags": [ - "WorkflowService" - ] - } - }, - "/apis/v1beta1/{namespace}/workflows": { - "get": { - "operationId": "ListWorkflowExecutions", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/apiListWorkflowExecutionsResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "workflowTemplateUid", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "workflowTemplateVersion", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "page", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": [ - "WorkflowService" - ] - } - } - }, - "definitions": { - "apiArchiveWorkflowTemplateResponse": { - "type": "object", - "properties": { - "workflowTemplate": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "apiGetWorkflowExecutionMetricsResponse": { - "type": "object", - "properties": { - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/apiMetric" - } - } - } - }, - "apiListWorkflowExecutionsResponse": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int32" - }, - "workflowExecutions": { - "type": "array", - "items": { - "$ref": "#/definitions/apiWorkflowExecution" - } - }, - "page": { - "type": "integer", - "format": "int32" - }, - "pages": { - "type": "integer", - "format": "int32" - }, - "totalCount": { - "type": "integer", - "format": "int32" - } - } - }, - "apiListWorkflowTemplateVersionsResponse": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int32" - }, - "workflowTemplates": { - "type": "array", - "items": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - } - }, - "apiListWorkflowTemplatesResponse": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int32" - }, - "workflowTemplates": { - "type": "array", - "items": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - } - }, - "apiLogEntry": { - "type": "object", - "properties": { - "timestamp": { - "type": "string" - }, - "content": { - "type": "string" - } - } - }, - "apiMetric": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "number", - "format": "double" - }, - "format": { - "type": "string" - } - } - }, - "apiWorkflowExecution": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "phase": { - "type": "string" - }, - "startedAt": { - "type": "string" - }, - "finishedAt": { - "type": "string" - }, - "manifest": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/apiWorkflowExecutionParameter" - } - }, - "workflowTemplate": { - "$ref": "#/definitions/apiWorkflowTemplate" - } - } - }, - "apiWorkflowExecutionParameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "apiWorkflowTemplate": { - "type": "object", - "properties": { - "createdAt": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "manifest": { - "type": "string" - }, - "isLatest": { - "type": "boolean", - "format": "boolean" - }, - "isArchived": { - "type": "boolean", - "format": "boolean" - } - } - }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "runtimeStreamError": { - "type": "object", - "properties": { - "grpc_code": { - "type": "integer", - "format": "int32" - }, - "http_code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "http_status": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - } - }, - "x-stream-definitions": { - "apiLogEntry": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/apiLogEntry" - }, - "error": { - "$ref": "#/definitions/runtimeStreamError" - } - }, - "title": "Stream result of apiLogEntry" - }, - "apiWorkflowExecution": { - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/apiWorkflowExecution" - }, - "error": { - "$ref": "#/definitions/runtimeStreamError" - } - }, - "title": "Stream result of apiWorkflowExecution" - } - } -} diff --git a/api/workflow_template.pb.go b/api/workflow_template.pb.go deleted file mode 100644 index 2359331a..00000000 --- a/api/workflow_template.pb.go +++ /dev/null @@ -1,1769 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: workflow_template.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type CreateWorkflowTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,2,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` -} - -func (x *CreateWorkflowTemplateRequest) Reset() { - *x = CreateWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkflowTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkflowTemplateRequest) ProtoMessage() {} - -func (x *CreateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 CreateWorkflowTemplateRequest.ProtoReflect.Descriptor instead. -func (*CreateWorkflowTemplateRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateWorkflowTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateWorkflowTemplateRequest) GetWorkflowTemplate() *WorkflowTemplate { - if x != nil { - return x.WorkflowTemplate - } - return nil -} - -type UpdateWorkflowTemplateVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,2,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` -} - -func (x *UpdateWorkflowTemplateVersionRequest) Reset() { - *x = UpdateWorkflowTemplateVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkflowTemplateVersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkflowTemplateVersionRequest) ProtoMessage() {} - -func (x *UpdateWorkflowTemplateVersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 UpdateWorkflowTemplateVersionRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkflowTemplateVersionRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{1} -} - -func (x *UpdateWorkflowTemplateVersionRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateWorkflowTemplateVersionRequest) GetWorkflowTemplate() *WorkflowTemplate { - if x != nil { - return x.WorkflowTemplate - } - return nil -} - -type GetWorkflowTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *GetWorkflowTemplateRequest) Reset() { - *x = GetWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowTemplateRequest) ProtoMessage() {} - -func (x *GetWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 GetWorkflowTemplateRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowTemplateRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{2} -} - -func (x *GetWorkflowTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkflowTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GetWorkflowTemplateRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type CloneWorkflowTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *CloneWorkflowTemplateRequest) Reset() { - *x = CloneWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CloneWorkflowTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CloneWorkflowTemplateRequest) ProtoMessage() {} - -func (x *CloneWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 CloneWorkflowTemplateRequest.ProtoReflect.Descriptor instead. -func (*CloneWorkflowTemplateRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{3} -} - -func (x *CloneWorkflowTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CloneWorkflowTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *CloneWorkflowTemplateRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CloneWorkflowTemplateRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type ListWorkflowTemplateVersionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ListWorkflowTemplateVersionsRequest) Reset() { - *x = ListWorkflowTemplateVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowTemplateVersionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowTemplateVersionsRequest) ProtoMessage() {} - -func (x *ListWorkflowTemplateVersionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 ListWorkflowTemplateVersionsRequest.ProtoReflect.Descriptor instead. -func (*ListWorkflowTemplateVersionsRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{4} -} - -func (x *ListWorkflowTemplateVersionsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListWorkflowTemplateVersionsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ListWorkflowTemplateVersionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,2,rep,name=workflowTemplates,proto3" json:"workflowTemplates,omitempty"` -} - -func (x *ListWorkflowTemplateVersionsResponse) Reset() { - *x = ListWorkflowTemplateVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowTemplateVersionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowTemplateVersionsResponse) ProtoMessage() {} - -func (x *ListWorkflowTemplateVersionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 ListWorkflowTemplateVersionsResponse.ProtoReflect.Descriptor instead. -func (*ListWorkflowTemplateVersionsResponse) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{5} -} - -func (x *ListWorkflowTemplateVersionsResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListWorkflowTemplateVersionsResponse) GetWorkflowTemplates() []*WorkflowTemplate { - if x != nil { - return x.WorkflowTemplates - } - return nil -} - -type ListWorkflowTemplatesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Labels string `protobuf:"bytes,4,opt,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *ListWorkflowTemplatesRequest) Reset() { - *x = ListWorkflowTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowTemplatesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowTemplatesRequest) ProtoMessage() {} - -func (x *ListWorkflowTemplatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 ListWorkflowTemplatesRequest.ProtoReflect.Descriptor instead. -func (*ListWorkflowTemplatesRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{6} -} - -func (x *ListWorkflowTemplatesRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListWorkflowTemplatesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListWorkflowTemplatesRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkflowTemplatesRequest) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -type ListWorkflowTemplatesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,2,rep,name=workflowTemplates,proto3" json:"workflowTemplates,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` - TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` -} - -func (x *ListWorkflowTemplatesResponse) Reset() { - *x = ListWorkflowTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowTemplatesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowTemplatesResponse) ProtoMessage() {} - -func (x *ListWorkflowTemplatesResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 ListWorkflowTemplatesResponse.ProtoReflect.Descriptor instead. -func (*ListWorkflowTemplatesResponse) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{7} -} - -func (x *ListWorkflowTemplatesResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListWorkflowTemplatesResponse) GetWorkflowTemplates() []*WorkflowTemplate { - if x != nil { - return x.WorkflowTemplates - } - return nil -} - -func (x *ListWorkflowTemplatesResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkflowTemplatesResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListWorkflowTemplatesResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -func (x *ListWorkflowTemplatesResponse) GetTotalAvailableCount() int32 { - if x != nil { - return x.TotalAvailableCount - } - return 0 -} - -type ArchiveWorkflowTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ArchiveWorkflowTemplateRequest) Reset() { - *x = ArchiveWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ArchiveWorkflowTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArchiveWorkflowTemplateRequest) ProtoMessage() {} - -func (x *ArchiveWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 ArchiveWorkflowTemplateRequest.ProtoReflect.Descriptor instead. -func (*ArchiveWorkflowTemplateRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{8} -} - -func (x *ArchiveWorkflowTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ArchiveWorkflowTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ArchiveWorkflowTemplateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,1,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` -} - -func (x *ArchiveWorkflowTemplateResponse) Reset() { - *x = ArchiveWorkflowTemplateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ArchiveWorkflowTemplateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArchiveWorkflowTemplateResponse) ProtoMessage() {} - -func (x *ArchiveWorkflowTemplateResponse) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 ArchiveWorkflowTemplateResponse.ProtoReflect.Descriptor instead. -func (*ArchiveWorkflowTemplateResponse) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{9} -} - -func (x *ArchiveWorkflowTemplateResponse) GetWorkflowTemplate() *WorkflowTemplate { - if x != nil { - return x.WorkflowTemplate - } - return nil -} - -type WorkflowExecutionStatisticReport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - LastExecuted string `protobuf:"bytes,2,opt,name=lastExecuted,proto3" json:"lastExecuted,omitempty"` - Running int32 `protobuf:"varint,3,opt,name=running,proto3" json:"running,omitempty"` - Completed int32 `protobuf:"varint,4,opt,name=completed,proto3" json:"completed,omitempty"` - Failed int32 `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"` - Terminated int32 `protobuf:"varint,6,opt,name=terminated,proto3" json:"terminated,omitempty"` -} - -func (x *WorkflowExecutionStatisticReport) Reset() { - *x = WorkflowExecutionStatisticReport{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowExecutionStatisticReport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowExecutionStatisticReport) ProtoMessage() {} - -func (x *WorkflowExecutionStatisticReport) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 WorkflowExecutionStatisticReport.ProtoReflect.Descriptor instead. -func (*WorkflowExecutionStatisticReport) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{10} -} - -func (x *WorkflowExecutionStatisticReport) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *WorkflowExecutionStatisticReport) GetLastExecuted() string { - if x != nil { - return x.LastExecuted - } - return "" -} - -func (x *WorkflowExecutionStatisticReport) GetRunning() int32 { - if x != nil { - return x.Running - } - return 0 -} - -func (x *WorkflowExecutionStatisticReport) GetCompleted() int32 { - if x != nil { - return x.Completed - } - return 0 -} - -func (x *WorkflowExecutionStatisticReport) GetFailed() int32 { - if x != nil { - return x.Failed - } - return 0 -} - -func (x *WorkflowExecutionStatisticReport) GetTerminated() int32 { - if x != nil { - return x.Terminated - } - return 0 -} - -type CronWorkflowStatisticsReport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` -} - -func (x *CronWorkflowStatisticsReport) Reset() { - *x = CronWorkflowStatisticsReport{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CronWorkflowStatisticsReport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CronWorkflowStatisticsReport) ProtoMessage() {} - -func (x *CronWorkflowStatisticsReport) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 CronWorkflowStatisticsReport.ProtoReflect.Descriptor instead. -func (*CronWorkflowStatisticsReport) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{11} -} - -func (x *CronWorkflowStatisticsReport) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -type WorkflowTemplate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - ModifiedAt string `protobuf:"bytes,2,opt,name=modifiedAt,proto3" json:"modifiedAt,omitempty"` - Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` - Versions int64 `protobuf:"varint,6,opt,name=versions,proto3" json:"versions,omitempty"` - Manifest string `protobuf:"bytes,7,opt,name=manifest,proto3" json:"manifest,omitempty"` - IsLatest bool `protobuf:"varint,8,opt,name=isLatest,proto3" json:"isLatest,omitempty"` - IsArchived bool `protobuf:"varint,9,opt,name=isArchived,proto3" json:"isArchived,omitempty"` - Labels []*KeyValue `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty"` - Stats *WorkflowExecutionStatisticReport `protobuf:"bytes,11,opt,name=stats,proto3" json:"stats,omitempty"` - CronStats *CronWorkflowStatisticsReport `protobuf:"bytes,12,opt,name=cronStats,proto3" json:"cronStats,omitempty"` - Parameters []*Parameter `protobuf:"bytes,13,rep,name=parameters,proto3" json:"parameters,omitempty"` -} - -func (x *WorkflowTemplate) Reset() { - *x = WorkflowTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowTemplate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowTemplate) ProtoMessage() {} - -func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 WorkflowTemplate.ProtoReflect.Descriptor instead. -func (*WorkflowTemplate) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{12} -} - -func (x *WorkflowTemplate) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *WorkflowTemplate) GetModifiedAt() string { - if x != nil { - return x.ModifiedAt - } - return "" -} - -func (x *WorkflowTemplate) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *WorkflowTemplate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WorkflowTemplate) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *WorkflowTemplate) GetVersions() int64 { - if x != nil { - return x.Versions - } - return 0 -} - -func (x *WorkflowTemplate) GetManifest() string { - if x != nil { - return x.Manifest - } - return "" -} - -func (x *WorkflowTemplate) GetIsLatest() bool { - if x != nil { - return x.IsLatest - } - return false -} - -func (x *WorkflowTemplate) GetIsArchived() bool { - if x != nil { - return x.IsArchived - } - return false -} - -func (x *WorkflowTemplate) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -func (x *WorkflowTemplate) GetStats() *WorkflowExecutionStatisticReport { - if x != nil { - return x.Stats - } - return nil -} - -func (x *WorkflowTemplate) GetCronStats() *CronWorkflowStatisticsReport { - if x != nil { - return x.CronStats - } - return nil -} - -func (x *WorkflowTemplate) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -type GetWorkflowTemplateLabelsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *GetWorkflowTemplateLabelsRequest) Reset() { - *x = GetWorkflowTemplateLabelsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workflow_template_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowTemplateLabelsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowTemplateLabelsRequest) ProtoMessage() {} - -func (x *GetWorkflowTemplateLabelsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workflow_template_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 GetWorkflowTemplateLabelsRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowTemplateLabelsRequest) Descriptor() ([]byte, []int) { - return file_workflow_template_proto_rawDescGZIP(), []int{13} -} - -func (x *GetWorkflowTemplateLabelsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkflowTemplateLabelsRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GetWorkflowTemplateLabelsRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -var File_workflow_template_proto protoreflect.FileDescriptor - -var file_workflow_template_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x24, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x1c, - 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x23, 0x4c, 0x69, - 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x81, 0x01, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x43, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x70, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xf6, 0x01, 0x0a, - 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, - 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x50, 0x0a, 0x1e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x1f, 0x41, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xcc, 0x01, - 0x0a, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, - 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x22, 0x34, 0x0a, 0x1c, - 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x22, 0xd9, 0x03, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, - 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, - 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, - 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, - 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x6e, - 0x0a, 0x20, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xbb, - 0x0a, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x22, 0x4c, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x75, 0x69, - 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xd3, 0x01, - 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7d, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, - 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, - 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x95, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x8e, 0x01, 0x12, 0x3f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x4b, 0x12, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, - 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, - 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_workflow_template_proto_rawDescOnce sync.Once - file_workflow_template_proto_rawDescData = file_workflow_template_proto_rawDesc -) - -func file_workflow_template_proto_rawDescGZIP() []byte { - file_workflow_template_proto_rawDescOnce.Do(func() { - file_workflow_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_workflow_template_proto_rawDescData) - }) - return file_workflow_template_proto_rawDescData -} - -var file_workflow_template_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_workflow_template_proto_goTypes = []interface{}{ - (*CreateWorkflowTemplateRequest)(nil), // 0: api.CreateWorkflowTemplateRequest - (*UpdateWorkflowTemplateVersionRequest)(nil), // 1: api.UpdateWorkflowTemplateVersionRequest - (*GetWorkflowTemplateRequest)(nil), // 2: api.GetWorkflowTemplateRequest - (*CloneWorkflowTemplateRequest)(nil), // 3: api.CloneWorkflowTemplateRequest - (*ListWorkflowTemplateVersionsRequest)(nil), // 4: api.ListWorkflowTemplateVersionsRequest - (*ListWorkflowTemplateVersionsResponse)(nil), // 5: api.ListWorkflowTemplateVersionsResponse - (*ListWorkflowTemplatesRequest)(nil), // 6: api.ListWorkflowTemplatesRequest - (*ListWorkflowTemplatesResponse)(nil), // 7: api.ListWorkflowTemplatesResponse - (*ArchiveWorkflowTemplateRequest)(nil), // 8: api.ArchiveWorkflowTemplateRequest - (*ArchiveWorkflowTemplateResponse)(nil), // 9: api.ArchiveWorkflowTemplateResponse - (*WorkflowExecutionStatisticReport)(nil), // 10: api.WorkflowExecutionStatisticReport - (*CronWorkflowStatisticsReport)(nil), // 11: api.CronWorkflowStatisticsReport - (*WorkflowTemplate)(nil), // 12: api.WorkflowTemplate - (*GetWorkflowTemplateLabelsRequest)(nil), // 13: api.GetWorkflowTemplateLabelsRequest - (*KeyValue)(nil), // 14: api.KeyValue - (*Parameter)(nil), // 15: api.Parameter -} -var file_workflow_template_proto_depIdxs = []int32{ - 12, // 0: api.CreateWorkflowTemplateRequest.workflowTemplate:type_name -> api.WorkflowTemplate - 12, // 1: api.UpdateWorkflowTemplateVersionRequest.workflowTemplate:type_name -> api.WorkflowTemplate - 12, // 2: api.ListWorkflowTemplateVersionsResponse.workflowTemplates:type_name -> api.WorkflowTemplate - 12, // 3: api.ListWorkflowTemplatesResponse.workflowTemplates:type_name -> api.WorkflowTemplate - 12, // 4: api.ArchiveWorkflowTemplateResponse.workflowTemplate:type_name -> api.WorkflowTemplate - 14, // 5: api.WorkflowTemplate.labels:type_name -> api.KeyValue - 10, // 6: api.WorkflowTemplate.stats:type_name -> api.WorkflowExecutionStatisticReport - 11, // 7: api.WorkflowTemplate.cronStats:type_name -> api.CronWorkflowStatisticsReport - 15, // 8: api.WorkflowTemplate.parameters:type_name -> api.Parameter - 0, // 9: api.WorkflowTemplateService.CreateWorkflowTemplate:input_type -> api.CreateWorkflowTemplateRequest - 0, // 10: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:input_type -> api.CreateWorkflowTemplateRequest - 2, // 11: api.WorkflowTemplateService.GetWorkflowTemplate:input_type -> api.GetWorkflowTemplateRequest - 4, // 12: api.WorkflowTemplateService.ListWorkflowTemplateVersions:input_type -> api.ListWorkflowTemplateVersionsRequest - 6, // 13: api.WorkflowTemplateService.ListWorkflowTemplates:input_type -> api.ListWorkflowTemplatesRequest - 3, // 14: api.WorkflowTemplateService.CloneWorkflowTemplate:input_type -> api.CloneWorkflowTemplateRequest - 8, // 15: api.WorkflowTemplateService.ArchiveWorkflowTemplate:input_type -> api.ArchiveWorkflowTemplateRequest - 12, // 16: api.WorkflowTemplateService.CreateWorkflowTemplate:output_type -> api.WorkflowTemplate - 12, // 17: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:output_type -> api.WorkflowTemplate - 12, // 18: api.WorkflowTemplateService.GetWorkflowTemplate:output_type -> api.WorkflowTemplate - 5, // 19: api.WorkflowTemplateService.ListWorkflowTemplateVersions:output_type -> api.ListWorkflowTemplateVersionsResponse - 7, // 20: api.WorkflowTemplateService.ListWorkflowTemplates:output_type -> api.ListWorkflowTemplatesResponse - 12, // 21: api.WorkflowTemplateService.CloneWorkflowTemplate:output_type -> api.WorkflowTemplate - 9, // 22: api.WorkflowTemplateService.ArchiveWorkflowTemplate:output_type -> api.ArchiveWorkflowTemplateResponse - 16, // [16:23] is the sub-list for method output_type - 9, // [9:16] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_workflow_template_proto_init() } -func file_workflow_template_proto_init() { - if File_workflow_template_proto != nil { - return - } - file_label_proto_init() - file_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_workflow_template_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkflowTemplateVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CloneWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowTemplateVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowTemplateVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveWorkflowTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowExecutionStatisticReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CronWorkflowStatisticsReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workflow_template_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowTemplateLabelsRequest); 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_workflow_template_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_workflow_template_proto_goTypes, - DependencyIndexes: file_workflow_template_proto_depIdxs, - MessageInfos: file_workflow_template_proto_msgTypes, - }.Build() - File_workflow_template_proto = out.File - file_workflow_template_proto_rawDesc = nil - file_workflow_template_proto_goTypes = nil - file_workflow_template_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// WorkflowTemplateServiceClient is the client API for WorkflowTemplateService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WorkflowTemplateServiceClient interface { - CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error) - ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error) - CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error) -} - -type workflowTemplateServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewWorkflowTemplateServiceClient(cc grpc.ClientConnInterface) WorkflowTemplateServiceClient { - return &workflowTemplateServiceClient{cc} -} - -func (c *workflowTemplateServiceClient) CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - out := new(WorkflowTemplate) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CreateWorkflowTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowTemplateServiceClient) CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - out := new(WorkflowTemplate) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowTemplateServiceClient) GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - out := new(WorkflowTemplate) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/GetWorkflowTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowTemplateServiceClient) ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error) { - out := new(ListWorkflowTemplateVersionsResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplateVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowTemplateServiceClient) ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error) { - out := new(ListWorkflowTemplatesResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplates", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowTemplateServiceClient) CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - out := new(WorkflowTemplate) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CloneWorkflowTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workflowTemplateServiceClient) ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error) { - out := new(ArchiveWorkflowTemplateResponse) - err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ArchiveWorkflowTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WorkflowTemplateServiceServer is the server API for WorkflowTemplateService service. -type WorkflowTemplateServiceServer interface { - CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) - CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) - GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error) - ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error) - ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error) - CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error) - ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error) -} - -// UnimplementedWorkflowTemplateServiceServer can be embedded to have forward compatible implementations. -type UnimplementedWorkflowTemplateServiceServer struct { -} - -func (*UnimplementedWorkflowTemplateServiceServer) CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplate not implemented") -} -func (*UnimplementedWorkflowTemplateServiceServer) CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplateVersion not implemented") -} -func (*UnimplementedWorkflowTemplateServiceServer) GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowTemplate not implemented") -} -func (*UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplateVersions not implemented") -} -func (*UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplates not implemented") -} -func (*UnimplementedWorkflowTemplateServiceServer) CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowTemplate not implemented") -} -func (*UnimplementedWorkflowTemplateServiceServer) ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkflowTemplate not implemented") -} - -func RegisterWorkflowTemplateServiceServer(s *grpc.Server, srv WorkflowTemplateServiceServer) { - s.RegisterService(&_WorkflowTemplateService_serviceDesc, srv) -} - -func _WorkflowTemplateService_CreateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWorkflowTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/CreateWorkflowTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplate(ctx, req.(*CreateWorkflowTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowTemplateService_CreateWorkflowTemplateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWorkflowTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplateVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplateVersion(ctx, req.(*CreateWorkflowTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowTemplateService_GetWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkflowTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).GetWorkflowTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/GetWorkflowTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).GetWorkflowTemplate(ctx, req.(*GetWorkflowTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowTemplateService_ListWorkflowTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkflowTemplateVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplateVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplateVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplateVersions(ctx, req.(*ListWorkflowTemplateVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowTemplateService_ListWorkflowTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkflowTemplatesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplates(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplates", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplates(ctx, req.(*ListWorkflowTemplatesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowTemplateService_CloneWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CloneWorkflowTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).CloneWorkflowTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/CloneWorkflowTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).CloneWorkflowTemplate(ctx, req.(*CloneWorkflowTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveWorkflowTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkflowTemplateServiceServer).ArchiveWorkflowTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkflowTemplateService/ArchiveWorkflowTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkflowTemplateServiceServer).ArchiveWorkflowTemplate(ctx, req.(*ArchiveWorkflowTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _WorkflowTemplateService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.WorkflowTemplateService", - HandlerType: (*WorkflowTemplateServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateWorkflowTemplate", - Handler: _WorkflowTemplateService_CreateWorkflowTemplate_Handler, - }, - { - MethodName: "CreateWorkflowTemplateVersion", - Handler: _WorkflowTemplateService_CreateWorkflowTemplateVersion_Handler, - }, - { - MethodName: "GetWorkflowTemplate", - Handler: _WorkflowTemplateService_GetWorkflowTemplate_Handler, - }, - { - MethodName: "ListWorkflowTemplateVersions", - Handler: _WorkflowTemplateService_ListWorkflowTemplateVersions_Handler, - }, - { - MethodName: "ListWorkflowTemplates", - Handler: _WorkflowTemplateService_ListWorkflowTemplates_Handler, - }, - { - MethodName: "CloneWorkflowTemplate", - Handler: _WorkflowTemplateService_CloneWorkflowTemplate_Handler, - }, - { - MethodName: "ArchiveWorkflowTemplate", - Handler: _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "workflow_template.proto", -} diff --git a/api/workflow_template.pb.gw.go b/api/workflow_template.pb.gw.go deleted file mode 100644 index 78e735ce..00000000 --- a/api/workflow_template.pb.gw.go +++ /dev/null @@ -1,1286 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: workflow_template.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.CreateWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.CreateWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["workflowTemplate.uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflowTemplate.uid") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "workflowTemplate.uid", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflowTemplate.uid", err) - } - - msg, err := client.CreateWorkflowTemplateVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["workflowTemplate.uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflowTemplate.uid") - } - - err = runtime.PopulateFieldFromPath(&protoReq, "workflowTemplate.uid", val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflowTemplate.uid", err) - } - - msg, err := server.CreateWorkflowTemplateVersion(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkflowTemplateService_GetWorkflowTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_WorkflowTemplateService_GetWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_GetWorkflowTemplate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_GetWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkflowTemplateService_GetWorkflowTemplate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowTemplateService_GetWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["version"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") - } - - protoReq.Version, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) - } - - msg, err := client.GetWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_GetWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["version"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") - } - - protoReq.Version, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) - } - - msg, err := server.GetWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkflowTemplateVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ListWorkflowTemplateVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkflowTemplateVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ListWorkflowTemplateVersions(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkflowTemplateService_ListWorkflowTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_WorkflowTemplateService_ListWorkflowTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkflowTemplatesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_ListWorkflowTemplates_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListWorkflowTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_ListWorkflowTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkflowTemplatesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkflowTemplateService_ListWorkflowTemplates_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListWorkflowTemplates(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkflowTemplateService_CloneWorkflowTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1, "name": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} -) - -func request_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CloneWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_CloneWorkflowTemplate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CloneWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CloneWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkflowTemplateService_CloneWorkflowTemplate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CloneWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CloneWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - val, ok = pathParams["version"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") - } - - protoReq.Version, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) - } - - msg, err := client.CloneWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CloneWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - val, ok = pathParams["version"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") - } - - protoReq.Version, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) - } - - msg, err := server.CloneWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ArchiveWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ArchiveWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterWorkflowTemplateServiceHandlerServer registers the http handlers for service WorkflowTemplateService to "mux". -// UnaryRPC :call WorkflowTemplateServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterWorkflowTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkflowTemplateServiceServer) error { - - mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_CreateWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplateVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_GetWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_GetWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_GetWorkflowTemplate_1(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_GetWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_ListWorkflowTemplates_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_ListWorkflowTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_CloneWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_CloneWorkflowTemplate_1(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterWorkflowTemplateServiceHandlerFromEndpoint is same as RegisterWorkflowTemplateServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterWorkflowTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterWorkflowTemplateServiceHandler(ctx, mux, conn) -} - -// RegisterWorkflowTemplateServiceHandler registers the http handlers for service WorkflowTemplateService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWorkflowTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterWorkflowTemplateServiceHandlerClient(ctx, mux, NewWorkflowTemplateServiceClient(conn)) -} - -// RegisterWorkflowTemplateServiceHandlerClient registers the http handlers for service WorkflowTemplateService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkflowTemplateServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkflowTemplateServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WorkflowTemplateServiceClient" to call the correct interceptors. -func RegisterWorkflowTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkflowTemplateServiceClient) error { - - mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_CreateWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplateVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_GetWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_GetWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_GetWorkflowTemplate_1(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_GetWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_ListWorkflowTemplates_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_ListWorkflowTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_CloneWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_CloneWorkflowTemplate_1(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_WorkflowTemplateService_CreateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_templates"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_CreateWorkflowTemplateVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "workflowTemplate.uid", "versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_GetWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_GetWorkflowTemplate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "versions", "version"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_ListWorkflowTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_ListWorkflowTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_templates"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_CloneWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "clone", "name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_CloneWorkflowTemplate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "clone", "name", "version"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "archive"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_WorkflowTemplateService_CreateWorkflowTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_CreateWorkflowTemplateVersion_0 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_GetWorkflowTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_GetWorkflowTemplate_1 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_ListWorkflowTemplateVersions_0 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_ListWorkflowTemplates_0 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_CloneWorkflowTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_CloneWorkflowTemplate_1 = runtime.ForwardResponseMessage - - forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0 = runtime.ForwardResponseMessage -) diff --git a/api/workspace.pb.go b/api/workspace.pb.go deleted file mode 100644 index a9e7f0e3..00000000 --- a/api/workspace.pb.go +++ /dev/null @@ -1,2213 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: workspace.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Workspace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - CreatedAt string `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - Parameters []*Parameter `protobuf:"bytes,5,rep,name=parameters,proto3" json:"parameters,omitempty"` - WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,6,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` - Status *WorkspaceStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` - Labels []*KeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` - Url string `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"` - TemplateParameters []*Parameter `protobuf:"bytes,10,rep,name=templateParameters,proto3" json:"templateParameters,omitempty"` -} - -func (x *Workspace) Reset() { - *x = Workspace{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Workspace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Workspace) ProtoMessage() {} - -func (x *Workspace) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 Workspace.ProtoReflect.Descriptor instead. -func (*Workspace) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{0} -} - -func (x *Workspace) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *Workspace) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Workspace) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *Workspace) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *Workspace) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *Workspace) GetWorkspaceTemplate() *WorkspaceTemplate { - if x != nil { - return x.WorkspaceTemplate - } - return nil -} - -func (x *Workspace) GetStatus() *WorkspaceStatus { - if x != nil { - return x.Status - } - return nil -} - -func (x *Workspace) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -func (x *Workspace) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Workspace) GetTemplateParameters() []*Parameter { - if x != nil { - return x.TemplateParameters - } - return nil -} - -type WorkspaceStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Phase string `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"` - StartedAt string `protobuf:"bytes,2,opt,name=startedAt,proto3" json:"startedAt,omitempty"` - PausedAt string `protobuf:"bytes,3,opt,name=pausedAt,proto3" json:"pausedAt,omitempty"` - TerminatedAt string `protobuf:"bytes,4,opt,name=terminatedAt,proto3" json:"terminatedAt,omitempty"` -} - -func (x *WorkspaceStatus) Reset() { - *x = WorkspaceStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkspaceStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkspaceStatus) ProtoMessage() {} - -func (x *WorkspaceStatus) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 WorkspaceStatus.ProtoReflect.Descriptor instead. -func (*WorkspaceStatus) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{1} -} - -func (x *WorkspaceStatus) GetPhase() string { - if x != nil { - return x.Phase - } - return "" -} - -func (x *WorkspaceStatus) GetStartedAt() string { - if x != nil { - return x.StartedAt - } - return "" -} - -func (x *WorkspaceStatus) GetPausedAt() string { - if x != nil { - return x.PausedAt - } - return "" -} - -func (x *WorkspaceStatus) GetTerminatedAt() string { - if x != nil { - return x.TerminatedAt - } - return "" -} - -type CreateWorkspaceBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WorkspaceTemplateUid string `protobuf:"bytes,1,opt,name=workspaceTemplateUid,proto3" json:"workspaceTemplateUid,omitempty"` - WorkspaceTemplateVersion int64 `protobuf:"varint,2,opt,name=workspaceTemplateVersion,proto3" json:"workspaceTemplateVersion,omitempty"` - Parameters []*Parameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"` - Labels []*KeyValue `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *CreateWorkspaceBody) Reset() { - *x = CreateWorkspaceBody{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkspaceBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkspaceBody) ProtoMessage() {} - -func (x *CreateWorkspaceBody) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 CreateWorkspaceBody.ProtoReflect.Descriptor instead. -func (*CreateWorkspaceBody) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateWorkspaceBody) GetWorkspaceTemplateUid() string { - if x != nil { - return x.WorkspaceTemplateUid - } - return "" -} - -func (x *CreateWorkspaceBody) GetWorkspaceTemplateVersion() int64 { - if x != nil { - return x.WorkspaceTemplateVersion - } - return 0 -} - -func (x *CreateWorkspaceBody) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *CreateWorkspaceBody) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -type CreateWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Body *CreateWorkspaceBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *CreateWorkspaceRequest) Reset() { - *x = CreateWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkspaceRequest) ProtoMessage() {} - -func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 CreateWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*CreateWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{3} -} - -func (x *CreateWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateWorkspaceRequest) GetBody() *CreateWorkspaceBody { - if x != nil { - return x.Body - } - return nil -} - -type GetWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *GetWorkspaceRequest) Reset() { - *x = GetWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkspaceRequest) ProtoMessage() {} - -func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 GetWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{4} -} - -func (x *GetWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkspaceRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type UpdateWorkspaceStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Status *WorkspaceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *UpdateWorkspaceStatusRequest) Reset() { - *x = UpdateWorkspaceStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkspaceStatusRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkspaceStatusRequest) ProtoMessage() {} - -func (x *UpdateWorkspaceStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 UpdateWorkspaceStatusRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkspaceStatusRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{5} -} - -func (x *UpdateWorkspaceStatusRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateWorkspaceStatusRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UpdateWorkspaceStatusRequest) GetStatus() *WorkspaceStatus { - if x != nil { - return x.Status - } - return nil -} - -type UpdateWorkspaceBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Parameters []*Parameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"` - Labels []*KeyValue `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` -} - -func (x *UpdateWorkspaceBody) Reset() { - *x = UpdateWorkspaceBody{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkspaceBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkspaceBody) ProtoMessage() {} - -func (x *UpdateWorkspaceBody) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 UpdateWorkspaceBody.ProtoReflect.Descriptor instead. -func (*UpdateWorkspaceBody) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdateWorkspaceBody) GetParameters() []*Parameter { - if x != nil { - return x.Parameters - } - return nil -} - -func (x *UpdateWorkspaceBody) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -type UpdateWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Body *UpdateWorkspaceBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *UpdateWorkspaceRequest) Reset() { - *x = UpdateWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkspaceRequest) ProtoMessage() {} - -func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 UpdateWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateWorkspaceRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UpdateWorkspaceRequest) GetBody() *UpdateWorkspaceBody { - if x != nil { - return x.Body - } - return nil -} - -type ListWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` - Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"` - Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"` -} - -func (x *ListWorkspaceRequest) Reset() { - *x = ListWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceRequest) ProtoMessage() {} - -func (x *ListWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 ListWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*ListWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{8} -} - -func (x *ListWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListWorkspaceRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListWorkspaceRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkspaceRequest) GetOrder() string { - if x != nil { - return x.Order - } - return "" -} - -func (x *ListWorkspaceRequest) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -func (x *ListWorkspaceRequest) GetPhase() string { - if x != nil { - return x.Phase - } - return "" -} - -type ListWorkspaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - Workspaces []*Workspace `protobuf:"bytes,2,rep,name=workspaces,proto3" json:"workspaces,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` - TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` -} - -func (x *ListWorkspaceResponse) Reset() { - *x = ListWorkspaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceResponse) ProtoMessage() {} - -func (x *ListWorkspaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 ListWorkspaceResponse.ProtoReflect.Descriptor instead. -func (*ListWorkspaceResponse) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{9} -} - -func (x *ListWorkspaceResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListWorkspaceResponse) GetWorkspaces() []*Workspace { - if x != nil { - return x.Workspaces - } - return nil -} - -func (x *ListWorkspaceResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkspaceResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListWorkspaceResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -func (x *ListWorkspaceResponse) GetTotalAvailableCount() int32 { - if x != nil { - return x.TotalAvailableCount - } - return 0 -} - -type PauseWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *PauseWorkspaceRequest) Reset() { - *x = PauseWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PauseWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PauseWorkspaceRequest) ProtoMessage() {} - -func (x *PauseWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 PauseWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*PauseWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{10} -} - -func (x *PauseWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *PauseWorkspaceRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ResumeWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ResumeWorkspaceRequest) Reset() { - *x = ResumeWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResumeWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResumeWorkspaceRequest) ProtoMessage() {} - -func (x *ResumeWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 ResumeWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*ResumeWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{11} -} - -func (x *ResumeWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ResumeWorkspaceRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type DeleteWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *DeleteWorkspaceRequest) Reset() { - *x = DeleteWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteWorkspaceRequest) ProtoMessage() {} - -func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 DeleteWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*DeleteWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{12} -} - -func (x *DeleteWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *DeleteWorkspaceRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type RetryActionWorkspaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *RetryActionWorkspaceRequest) Reset() { - *x = RetryActionWorkspaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryActionWorkspaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryActionWorkspaceRequest) ProtoMessage() {} - -func (x *RetryActionWorkspaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 RetryActionWorkspaceRequest.ProtoReflect.Descriptor instead. -func (*RetryActionWorkspaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{13} -} - -func (x *RetryActionWorkspaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *RetryActionWorkspaceRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type WorkspaceStatisticReport struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - LastCreated string `protobuf:"bytes,2,opt,name=lastCreated,proto3" json:"lastCreated,omitempty"` - Launching int32 `protobuf:"varint,3,opt,name=launching,proto3" json:"launching,omitempty"` - Running int32 `protobuf:"varint,4,opt,name=running,proto3" json:"running,omitempty"` - Updating int32 `protobuf:"varint,5,opt,name=updating,proto3" json:"updating,omitempty"` - Pausing int32 `protobuf:"varint,6,opt,name=pausing,proto3" json:"pausing,omitempty"` - Paused int32 `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"` - Terminating int32 `protobuf:"varint,8,opt,name=terminating,proto3" json:"terminating,omitempty"` - Terminated int32 `protobuf:"varint,9,opt,name=terminated,proto3" json:"terminated,omitempty"` - FailedToPause int32 `protobuf:"varint,10,opt,name=failedToPause,proto3" json:"failedToPause,omitempty"` - FailedToResume int32 `protobuf:"varint,11,opt,name=failedToResume,proto3" json:"failedToResume,omitempty"` - FailedToTerminate int32 `protobuf:"varint,12,opt,name=failedToTerminate,proto3" json:"failedToTerminate,omitempty"` - FailedToLaunch int32 `protobuf:"varint,13,opt,name=failedToLaunch,proto3" json:"failedToLaunch,omitempty"` - FailedToUpdate int32 `protobuf:"varint,14,opt,name=failedToUpdate,proto3" json:"failedToUpdate,omitempty"` - Failed int32 `protobuf:"varint,15,opt,name=failed,proto3" json:"failed,omitempty"` -} - -func (x *WorkspaceStatisticReport) Reset() { - *x = WorkspaceStatisticReport{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkspaceStatisticReport) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkspaceStatisticReport) ProtoMessage() {} - -func (x *WorkspaceStatisticReport) ProtoReflect() protoreflect.Message { - mi := &file_workspace_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 WorkspaceStatisticReport.ProtoReflect.Descriptor instead. -func (*WorkspaceStatisticReport) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{14} -} - -func (x *WorkspaceStatisticReport) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetLastCreated() string { - if x != nil { - return x.LastCreated - } - return "" -} - -func (x *WorkspaceStatisticReport) GetLaunching() int32 { - if x != nil { - return x.Launching - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetRunning() int32 { - if x != nil { - return x.Running - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetUpdating() int32 { - if x != nil { - return x.Updating - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetPausing() int32 { - if x != nil { - return x.Pausing - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetPaused() int32 { - if x != nil { - return x.Paused - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetTerminating() int32 { - if x != nil { - return x.Terminating - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetTerminated() int32 { - if x != nil { - return x.Terminated - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetFailedToPause() int32 { - if x != nil { - return x.FailedToPause - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetFailedToResume() int32 { - if x != nil { - return x.FailedToResume - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetFailedToTerminate() int32 { - if x != nil { - return x.FailedToTerminate - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetFailedToLaunch() int32 { - if x != nil { - return x.FailedToLaunch - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetFailedToUpdate() int32 { - if x != nil { - return x.FailedToUpdate - } - return 0 -} - -func (x *WorkspaceStatisticReport) GetFailed() int32 { - if x != nil { - return x.Failed - } - return 0 -} - -type GetWorkspaceStatisticsForNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *GetWorkspaceStatisticsForNamespaceRequest) Reset() { - *x = GetWorkspaceStatisticsForNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkspaceStatisticsForNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkspaceStatisticsForNamespaceRequest) ProtoMessage() {} - -func (x *GetWorkspaceStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_proto_msgTypes[15] - 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 GetWorkspaceStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead. -func (*GetWorkspaceStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{15} -} - -func (x *GetWorkspaceStatisticsForNamespaceRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -type GetWorkspaceStatisticsForNamespaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Stats *WorkspaceStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` -} - -func (x *GetWorkspaceStatisticsForNamespaceResponse) Reset() { - *x = GetWorkspaceStatisticsForNamespaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkspaceStatisticsForNamespaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkspaceStatisticsForNamespaceResponse) ProtoMessage() {} - -func (x *GetWorkspaceStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_workspace_proto_msgTypes[16] - 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 GetWorkspaceStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead. -func (*GetWorkspaceStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) { - return file_workspace_proto_rawDescGZIP(), []int{16} -} - -func (x *GetWorkspaceStatisticsForNamespaceResponse) GetStats() *WorkspaceStatisticReport { - if x != nil { - return x.Stats - } - return nil -} - -var File_workspace_proto protoreflect.FileDescriptor - -var file_workspace_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x03, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, - 0x3e, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x12, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, - 0x85, 0x01, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x75, 0x73, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x75, 0x73, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x32, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x55, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x64, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, - 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x45, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x22, 0x7c, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x6c, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, - 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, - 0x76, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64, - 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, - 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, - 0x0a, 0x15, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xfe, 0x03, 0x0a, 0x18, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, - 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, - 0x61, 0x75, 0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x26, 0x0a, - 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, - 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, - 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, - 0x61, 0x75, 0x6e, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x29, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0xd7, 0x0a, 0x0a, 0x10, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, - 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0xbd, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x12, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x12, 0x75, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x80, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, - 0x1a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x12, 0x7e, 0x0a, 0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, - 0x1a, 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, - 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, - 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x33, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, - 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x2a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, - 0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x61, 0x73, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x32, 0x1a, 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_workspace_proto_rawDescOnce sync.Once - file_workspace_proto_rawDescData = file_workspace_proto_rawDesc -) - -func file_workspace_proto_rawDescGZIP() []byte { - file_workspace_proto_rawDescOnce.Do(func() { - file_workspace_proto_rawDescData = protoimpl.X.CompressGZIP(file_workspace_proto_rawDescData) - }) - return file_workspace_proto_rawDescData -} - -var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_workspace_proto_goTypes = []interface{}{ - (*Workspace)(nil), // 0: api.Workspace - (*WorkspaceStatus)(nil), // 1: api.WorkspaceStatus - (*CreateWorkspaceBody)(nil), // 2: api.CreateWorkspaceBody - (*CreateWorkspaceRequest)(nil), // 3: api.CreateWorkspaceRequest - (*GetWorkspaceRequest)(nil), // 4: api.GetWorkspaceRequest - (*UpdateWorkspaceStatusRequest)(nil), // 5: api.UpdateWorkspaceStatusRequest - (*UpdateWorkspaceBody)(nil), // 6: api.UpdateWorkspaceBody - (*UpdateWorkspaceRequest)(nil), // 7: api.UpdateWorkspaceRequest - (*ListWorkspaceRequest)(nil), // 8: api.ListWorkspaceRequest - (*ListWorkspaceResponse)(nil), // 9: api.ListWorkspaceResponse - (*PauseWorkspaceRequest)(nil), // 10: api.PauseWorkspaceRequest - (*ResumeWorkspaceRequest)(nil), // 11: api.ResumeWorkspaceRequest - (*DeleteWorkspaceRequest)(nil), // 12: api.DeleteWorkspaceRequest - (*RetryActionWorkspaceRequest)(nil), // 13: api.RetryActionWorkspaceRequest - (*WorkspaceStatisticReport)(nil), // 14: api.WorkspaceStatisticReport - (*GetWorkspaceStatisticsForNamespaceRequest)(nil), // 15: api.GetWorkspaceStatisticsForNamespaceRequest - (*GetWorkspaceStatisticsForNamespaceResponse)(nil), // 16: api.GetWorkspaceStatisticsForNamespaceResponse - (*Parameter)(nil), // 17: api.Parameter - (*WorkspaceTemplate)(nil), // 18: api.WorkspaceTemplate - (*KeyValue)(nil), // 19: api.KeyValue - (*empty.Empty)(nil), // 20: google.protobuf.Empty -} -var file_workspace_proto_depIdxs = []int32{ - 17, // 0: api.Workspace.parameters:type_name -> api.Parameter - 18, // 1: api.Workspace.workspaceTemplate:type_name -> api.WorkspaceTemplate - 1, // 2: api.Workspace.status:type_name -> api.WorkspaceStatus - 19, // 3: api.Workspace.labels:type_name -> api.KeyValue - 17, // 4: api.Workspace.templateParameters:type_name -> api.Parameter - 17, // 5: api.CreateWorkspaceBody.parameters:type_name -> api.Parameter - 19, // 6: api.CreateWorkspaceBody.labels:type_name -> api.KeyValue - 2, // 7: api.CreateWorkspaceRequest.body:type_name -> api.CreateWorkspaceBody - 1, // 8: api.UpdateWorkspaceStatusRequest.status:type_name -> api.WorkspaceStatus - 17, // 9: api.UpdateWorkspaceBody.parameters:type_name -> api.Parameter - 19, // 10: api.UpdateWorkspaceBody.labels:type_name -> api.KeyValue - 6, // 11: api.UpdateWorkspaceRequest.body:type_name -> api.UpdateWorkspaceBody - 0, // 12: api.ListWorkspaceResponse.workspaces:type_name -> api.Workspace - 14, // 13: api.GetWorkspaceStatisticsForNamespaceResponse.stats:type_name -> api.WorkspaceStatisticReport - 3, // 14: api.WorkspaceService.CreateWorkspace:input_type -> api.CreateWorkspaceRequest - 15, // 15: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:input_type -> api.GetWorkspaceStatisticsForNamespaceRequest - 4, // 16: api.WorkspaceService.GetWorkspace:input_type -> api.GetWorkspaceRequest - 8, // 17: api.WorkspaceService.ListWorkspaces:input_type -> api.ListWorkspaceRequest - 5, // 18: api.WorkspaceService.UpdateWorkspaceStatus:input_type -> api.UpdateWorkspaceStatusRequest - 7, // 19: api.WorkspaceService.UpdateWorkspace:input_type -> api.UpdateWorkspaceRequest - 10, // 20: api.WorkspaceService.PauseWorkspace:input_type -> api.PauseWorkspaceRequest - 11, // 21: api.WorkspaceService.ResumeWorkspace:input_type -> api.ResumeWorkspaceRequest - 12, // 22: api.WorkspaceService.DeleteWorkspace:input_type -> api.DeleteWorkspaceRequest - 13, // 23: api.WorkspaceService.RetryLastWorkspaceAction:input_type -> api.RetryActionWorkspaceRequest - 0, // 24: api.WorkspaceService.CreateWorkspace:output_type -> api.Workspace - 16, // 25: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:output_type -> api.GetWorkspaceStatisticsForNamespaceResponse - 0, // 26: api.WorkspaceService.GetWorkspace:output_type -> api.Workspace - 9, // 27: api.WorkspaceService.ListWorkspaces:output_type -> api.ListWorkspaceResponse - 20, // 28: api.WorkspaceService.UpdateWorkspaceStatus:output_type -> google.protobuf.Empty - 20, // 29: api.WorkspaceService.UpdateWorkspace:output_type -> google.protobuf.Empty - 20, // 30: api.WorkspaceService.PauseWorkspace:output_type -> google.protobuf.Empty - 20, // 31: api.WorkspaceService.ResumeWorkspace:output_type -> google.protobuf.Empty - 20, // 32: api.WorkspaceService.DeleteWorkspace:output_type -> google.protobuf.Empty - 20, // 33: api.WorkspaceService.RetryLastWorkspaceAction:output_type -> google.protobuf.Empty - 24, // [24:34] is the sub-list for method output_type - 14, // [14:24] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name -} - -func init() { file_workspace_proto_init() } -func file_workspace_proto_init() { - if File_workspace_proto != nil { - return - } - file_workspace_template_proto_init() - file_common_proto_init() - file_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_workspace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Workspace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkspaceBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkspaceStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkspaceBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PauseWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResumeWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryActionWorkspaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceStatisticReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkspaceStatisticsForNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkspaceStatisticsForNamespaceResponse); 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_workspace_proto_rawDesc, - NumEnums: 0, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_workspace_proto_goTypes, - DependencyIndexes: file_workspace_proto_depIdxs, - MessageInfos: file_workspace_proto_msgTypes, - }.Build() - File_workspace_proto = out.File - file_workspace_proto_rawDesc = nil - file_workspace_proto_goTypes = nil - file_workspace_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// WorkspaceServiceClient is the client API for WorkspaceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WorkspaceServiceClient interface { - CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) - GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error) - GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) - ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error) - UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error) - UpdateWorkspace(ctx context.Context, in *UpdateWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) - PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) - ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) - DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) - RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) -} - -type workspaceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient { - return &workspaceServiceClient{cc} -} - -func (c *workspaceServiceClient) CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { - out := new(Workspace) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/CreateWorkspace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error) { - out := new(GetWorkspaceStatisticsForNamespaceResponse) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { - out := new(Workspace) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error) { - out := new(ListWorkspaceResponse) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/ListWorkspaces", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/UpdateWorkspaceStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) UpdateWorkspace(ctx context.Context, in *UpdateWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/UpdateWorkspace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/PauseWorkspace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/ResumeWorkspace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/DeleteWorkspace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceServiceClient) RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/api.WorkspaceService/RetryLastWorkspaceAction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WorkspaceServiceServer is the server API for WorkspaceService service. -type WorkspaceServiceServer interface { - CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) - GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error) - GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) - ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error) - UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*empty.Empty, error) - UpdateWorkspace(context.Context, *UpdateWorkspaceRequest) (*empty.Empty, error) - PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*empty.Empty, error) - ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*empty.Empty, error) - DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*empty.Empty, error) - RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*empty.Empty, error) -} - -// UnimplementedWorkspaceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedWorkspaceServiceServer struct { -} - -func (*UnimplementedWorkspaceServiceServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceStatisticsForNamespace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaces not implemented") -} -func (*UnimplementedWorkspaceServiceServer) UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceStatus not implemented") -} -func (*UnimplementedWorkspaceServiceServer) UpdateWorkspace(context.Context, *UpdateWorkspaceRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method PauseWorkspace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResumeWorkspace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented") -} -func (*UnimplementedWorkspaceServiceServer) RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method RetryLastWorkspaceAction not implemented") -} - -func RegisterWorkspaceServiceServer(s *grpc.Server, srv WorkspaceServiceServer) { - s.RegisterService(&_WorkspaceService_serviceDesc, srv) -} - -func _WorkspaceService_CreateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).CreateWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/CreateWorkspace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).CreateWorkspace(ctx, req.(*CreateWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkspaceStatisticsForNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, req.(*GetWorkspaceStatisticsForNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).GetWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/GetWorkspace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).ListWorkspaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/ListWorkspaces", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).ListWorkspaces(ctx, req.(*ListWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_UpdateWorkspaceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateWorkspaceStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).UpdateWorkspaceStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/UpdateWorkspaceStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).UpdateWorkspaceStatus(ctx, req.(*UpdateWorkspaceStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_UpdateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).UpdateWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/UpdateWorkspace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).UpdateWorkspace(ctx, req.(*UpdateWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_PauseWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PauseWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).PauseWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/PauseWorkspace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).PauseWorkspace(ctx, req.(*PauseWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_ResumeWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResumeWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).ResumeWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/ResumeWorkspace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).ResumeWorkspace(ctx, req.(*ResumeWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/DeleteWorkspace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, req.(*DeleteWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceService_RetryLastWorkspaceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RetryActionWorkspaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceService/RetryLastWorkspaceAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, req.(*RetryActionWorkspaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _WorkspaceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.WorkspaceService", - HandlerType: (*WorkspaceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateWorkspace", - Handler: _WorkspaceService_CreateWorkspace_Handler, - }, - { - MethodName: "GetWorkspaceStatisticsForNamespace", - Handler: _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler, - }, - { - MethodName: "GetWorkspace", - Handler: _WorkspaceService_GetWorkspace_Handler, - }, - { - MethodName: "ListWorkspaces", - Handler: _WorkspaceService_ListWorkspaces_Handler, - }, - { - MethodName: "UpdateWorkspaceStatus", - Handler: _WorkspaceService_UpdateWorkspaceStatus_Handler, - }, - { - MethodName: "UpdateWorkspace", - Handler: _WorkspaceService_UpdateWorkspace_Handler, - }, - { - MethodName: "PauseWorkspace", - Handler: _WorkspaceService_PauseWorkspace_Handler, - }, - { - MethodName: "ResumeWorkspace", - Handler: _WorkspaceService_ResumeWorkspace_Handler, - }, - { - MethodName: "DeleteWorkspace", - Handler: _WorkspaceService_DeleteWorkspace_Handler, - }, - { - MethodName: "RetryLastWorkspaceAction", - Handler: _WorkspaceService_RetryLastWorkspaceAction_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "workspace.proto", -} diff --git a/api/workspace.pb.gw.go b/api/workspace.pb.gw.go deleted file mode 100644 index f1b598e4..00000000 --- a/api/workspace.pb.gw.go +++ /dev/null @@ -1,1282 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: workspace.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkspaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.CreateWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkspaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.CreateWorkspace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkspaceStatisticsForNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.GetWorkspaceStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkspaceStatisticsForNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.GetWorkspaceStatisticsForNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.GetWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.GetWorkspace(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkspaceService_ListWorkspaces_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceService_ListWorkspaces_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListWorkspaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkspaceService_ListWorkspaces_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListWorkspaces(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_UpdateWorkspaceStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkspaceStatusRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.UpdateWorkspaceStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_UpdateWorkspaceStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkspaceStatusRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.UpdateWorkspaceStatus(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_UpdateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkspaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.UpdateWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_UpdateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkspaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.UpdateWorkspace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_PauseWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PauseWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.PauseWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_PauseWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PauseWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.PauseWorkspace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_ResumeWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResumeWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ResumeWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_ResumeWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResumeWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ResumeWorkspace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.DeleteWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.DeleteWorkspace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryActionWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.RetryLastWorkspaceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryActionWorkspaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.RetryLastWorkspaceAction(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterWorkspaceServiceHandlerServer registers the http handlers for service WorkspaceService to "mux". -// UnaryRPC :call WorkspaceServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceServiceServer) error { - - mux.Handle("POST", pattern_WorkspaceService_CreateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_CreateWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_CreateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_GetWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_GetWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_ListWorkspaces_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_ListWorkspaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspaceStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_UpdateWorkspaceStatus_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_UpdateWorkspaceStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_UpdateWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_UpdateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_PauseWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_PauseWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_PauseWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_ResumeWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_ResumeWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_ResumeWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_WorkspaceService_DeleteWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_DeleteWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_DeleteWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceService_RetryLastWorkspaceAction_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterWorkspaceServiceHandlerFromEndpoint is same as RegisterWorkspaceServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterWorkspaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterWorkspaceServiceHandler(ctx, mux, conn) -} - -// RegisterWorkspaceServiceHandler registers the http handlers for service WorkspaceService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWorkspaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterWorkspaceServiceHandlerClient(ctx, mux, NewWorkspaceServiceClient(conn)) -} - -// RegisterWorkspaceServiceHandlerClient registers the http handlers for service WorkspaceService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WorkspaceServiceClient" to call the correct interceptors. -func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceServiceClient) error { - - mux.Handle("POST", pattern_WorkspaceService_CreateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_CreateWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_CreateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_GetWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_GetWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_ListWorkspaces_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_ListWorkspaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspaceStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_UpdateWorkspaceStatus_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_UpdateWorkspaceStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_UpdateWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_UpdateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_PauseWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_PauseWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_PauseWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_ResumeWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_ResumeWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_ResumeWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_WorkspaceService_DeleteWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_DeleteWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_DeleteWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceService_RetryLastWorkspaceAction_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceService_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_WorkspaceService_CreateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workspace", "statistics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_GetWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_ListWorkspaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_UpdateWorkspaceStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "status"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_UpdateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_PauseWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "pause"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_ResumeWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "resume"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_DeleteWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "retry"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_WorkspaceService_CreateWorkspace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_GetWorkspace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_ListWorkspaces_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_UpdateWorkspaceStatus_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_UpdateWorkspace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_PauseWorkspace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_ResumeWorkspace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessage - - forward_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.ForwardResponseMessage -) diff --git a/api/workspace_template.pb.go b/api/workspace_template.pb.go deleted file mode 100644 index 386f1282..00000000 --- a/api/workspace_template.pb.go +++ /dev/null @@ -1,1428 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.22.0 -// protoc v3.11.4 -// source: workspace_template.proto - -package api - -import ( - context "context" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/empty" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type WorkspaceTemplate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"` - IsLatest bool `protobuf:"varint,5,opt,name=isLatest,proto3" json:"isLatest,omitempty"` - CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` - WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,7,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` - Labels []*KeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` - IsArchived bool `protobuf:"varint,9,opt,name=isArchived,proto3" json:"isArchived,omitempty"` - Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *WorkspaceTemplate) Reset() { - *x = WorkspaceTemplate{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkspaceTemplate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkspaceTemplate) ProtoMessage() {} - -func (x *WorkspaceTemplate) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 WorkspaceTemplate.ProtoReflect.Descriptor instead. -func (*WorkspaceTemplate) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{0} -} - -func (x *WorkspaceTemplate) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *WorkspaceTemplate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WorkspaceTemplate) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *WorkspaceTemplate) GetManifest() string { - if x != nil { - return x.Manifest - } - return "" -} - -func (x *WorkspaceTemplate) GetIsLatest() bool { - if x != nil { - return x.IsLatest - } - return false -} - -func (x *WorkspaceTemplate) GetCreatedAt() string { - if x != nil { - return x.CreatedAt - } - return "" -} - -func (x *WorkspaceTemplate) GetWorkflowTemplate() *WorkflowTemplate { - if x != nil { - return x.WorkflowTemplate - } - return nil -} - -func (x *WorkspaceTemplate) GetLabels() []*KeyValue { - if x != nil { - return x.Labels - } - return nil -} - -func (x *WorkspaceTemplate) GetIsArchived() bool { - if x != nil { - return x.IsArchived - } - return false -} - -func (x *WorkspaceTemplate) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type GenerateWorkspaceTemplateWorkflowTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,3,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` -} - -func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) Reset() { - *x = GenerateWorkspaceTemplateWorkflowTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateWorkspaceTemplateWorkflowTemplateRequest) ProtoMessage() {} - -func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 GenerateWorkspaceTemplateWorkflowTemplateRequest.ProtoReflect.Descriptor instead. -func (*GenerateWorkspaceTemplateWorkflowTemplateRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{1} -} - -func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) GetWorkspaceTemplate() *WorkspaceTemplate { - if x != nil { - return x.WorkspaceTemplate - } - return nil -} - -type CreateWorkspaceTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,2,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` -} - -func (x *CreateWorkspaceTemplateRequest) Reset() { - *x = CreateWorkspaceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkspaceTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkspaceTemplateRequest) ProtoMessage() {} - -func (x *CreateWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 CreateWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. -func (*CreateWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateWorkspaceTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *CreateWorkspaceTemplateRequest) GetWorkspaceTemplate() *WorkspaceTemplate { - if x != nil { - return x.WorkspaceTemplate - } - return nil -} - -type UpdateWorkspaceTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,3,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` -} - -func (x *UpdateWorkspaceTemplateRequest) Reset() { - *x = UpdateWorkspaceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateWorkspaceTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateWorkspaceTemplateRequest) ProtoMessage() {} - -func (x *UpdateWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 UpdateWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. -func (*UpdateWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{3} -} - -func (x *UpdateWorkspaceTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *UpdateWorkspaceTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *UpdateWorkspaceTemplateRequest) GetWorkspaceTemplate() *WorkspaceTemplate { - if x != nil { - return x.WorkspaceTemplate - } - return nil -} - -type GetWorkspaceTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *GetWorkspaceTemplateRequest) Reset() { - *x = GetWorkspaceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkspaceTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkspaceTemplateRequest) ProtoMessage() {} - -func (x *GetWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 GetWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. -func (*GetWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{4} -} - -func (x *GetWorkspaceTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *GetWorkspaceTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *GetWorkspaceTemplateRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type ArchiveWorkspaceTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ArchiveWorkspaceTemplateRequest) Reset() { - *x = ArchiveWorkspaceTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ArchiveWorkspaceTemplateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ArchiveWorkspaceTemplateRequest) ProtoMessage() {} - -func (x *ArchiveWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 ArchiveWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. -func (*ArchiveWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{5} -} - -func (x *ArchiveWorkspaceTemplateRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ArchiveWorkspaceTemplateRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ListWorkspaceTemplatesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` - Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"` - Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ListWorkspaceTemplatesRequest) Reset() { - *x = ListWorkspaceTemplatesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceTemplatesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceTemplatesRequest) ProtoMessage() {} - -func (x *ListWorkspaceTemplatesRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 ListWorkspaceTemplatesRequest.ProtoReflect.Descriptor instead. -func (*ListWorkspaceTemplatesRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{6} -} - -func (x *ListWorkspaceTemplatesRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListWorkspaceTemplatesRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListWorkspaceTemplatesRequest) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkspaceTemplatesRequest) GetOrder() string { - if x != nil { - return x.Order - } - return "" -} - -func (x *ListWorkspaceTemplatesRequest) GetLabels() string { - if x != nil { - return x.Labels - } - return "" -} - -func (x *ListWorkspaceTemplatesRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ListWorkspaceTemplatesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkspaceTemplates []*WorkspaceTemplate `protobuf:"bytes,2,rep,name=workspaceTemplates,proto3" json:"workspaceTemplates,omitempty"` - Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` - Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` - TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` -} - -func (x *ListWorkspaceTemplatesResponse) Reset() { - *x = ListWorkspaceTemplatesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceTemplatesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceTemplatesResponse) ProtoMessage() {} - -func (x *ListWorkspaceTemplatesResponse) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 ListWorkspaceTemplatesResponse.ProtoReflect.Descriptor instead. -func (*ListWorkspaceTemplatesResponse) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{7} -} - -func (x *ListWorkspaceTemplatesResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListWorkspaceTemplatesResponse) GetWorkspaceTemplates() []*WorkspaceTemplate { - if x != nil { - return x.WorkspaceTemplates - } - return nil -} - -func (x *ListWorkspaceTemplatesResponse) GetPage() int32 { - if x != nil { - return x.Page - } - return 0 -} - -func (x *ListWorkspaceTemplatesResponse) GetPages() int32 { - if x != nil { - return x.Pages - } - return 0 -} - -func (x *ListWorkspaceTemplatesResponse) GetTotalCount() int32 { - if x != nil { - return x.TotalCount - } - return 0 -} - -type ListWorkspaceTemplateVersionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` -} - -func (x *ListWorkspaceTemplateVersionsRequest) Reset() { - *x = ListWorkspaceTemplateVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceTemplateVersionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceTemplateVersionsRequest) ProtoMessage() {} - -func (x *ListWorkspaceTemplateVersionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 ListWorkspaceTemplateVersionsRequest.ProtoReflect.Descriptor instead. -func (*ListWorkspaceTemplateVersionsRequest) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{8} -} - -func (x *ListWorkspaceTemplateVersionsRequest) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ListWorkspaceTemplateVersionsRequest) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -type ListWorkspaceTemplateVersionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - WorkspaceTemplates []*WorkspaceTemplate `protobuf:"bytes,2,rep,name=workspaceTemplates,proto3" json:"workspaceTemplates,omitempty"` -} - -func (x *ListWorkspaceTemplateVersionsResponse) Reset() { - *x = ListWorkspaceTemplateVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_workspace_template_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceTemplateVersionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceTemplateVersionsResponse) ProtoMessage() {} - -func (x *ListWorkspaceTemplateVersionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_workspace_template_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 ListWorkspaceTemplateVersionsResponse.ProtoReflect.Descriptor instead. -func (*ListWorkspaceTemplateVersionsResponse) Descriptor() ([]byte, []int) { - return file_workspace_template_proto_rawDescGZIP(), []int{9} -} - -func (x *ListWorkspaceTemplateVersionsResponse) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ListWorkspaceTemplateVersionsResponse) GetWorkspaceTemplates() []*WorkspaceTemplate { - if x != nil { - return x.WorkspaceTemplates - } - return nil -} - -var File_workspace_template_proto protoreflect.FileDescriptor - -var file_workspace_template_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xd5, 0x02, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x41, 0x0a, 0x10, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, - 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x41, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa8, 0x01, 0x0a, 0x30, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x44, 0x0a, - 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x1e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x44, 0x0a, - 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x22, 0x67, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x1f, - 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, - 0xad, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, - 0xc8, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x24, 0x4c, 0x69, - 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x32, 0xce, 0x09, 0x0a, 0x18, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x29, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x22, 0x45, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x48, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x1a, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x11, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x24, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x43, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, - 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, - 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xbc, 0x01, 0x0a, - 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, - 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_workspace_template_proto_rawDescOnce sync.Once - file_workspace_template_proto_rawDescData = file_workspace_template_proto_rawDesc -) - -func file_workspace_template_proto_rawDescGZIP() []byte { - file_workspace_template_proto_rawDescOnce.Do(func() { - file_workspace_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_workspace_template_proto_rawDescData) - }) - return file_workspace_template_proto_rawDescData -} - -var file_workspace_template_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_workspace_template_proto_goTypes = []interface{}{ - (*WorkspaceTemplate)(nil), // 0: api.WorkspaceTemplate - (*GenerateWorkspaceTemplateWorkflowTemplateRequest)(nil), // 1: api.GenerateWorkspaceTemplateWorkflowTemplateRequest - (*CreateWorkspaceTemplateRequest)(nil), // 2: api.CreateWorkspaceTemplateRequest - (*UpdateWorkspaceTemplateRequest)(nil), // 3: api.UpdateWorkspaceTemplateRequest - (*GetWorkspaceTemplateRequest)(nil), // 4: api.GetWorkspaceTemplateRequest - (*ArchiveWorkspaceTemplateRequest)(nil), // 5: api.ArchiveWorkspaceTemplateRequest - (*ListWorkspaceTemplatesRequest)(nil), // 6: api.ListWorkspaceTemplatesRequest - (*ListWorkspaceTemplatesResponse)(nil), // 7: api.ListWorkspaceTemplatesResponse - (*ListWorkspaceTemplateVersionsRequest)(nil), // 8: api.ListWorkspaceTemplateVersionsRequest - (*ListWorkspaceTemplateVersionsResponse)(nil), // 9: api.ListWorkspaceTemplateVersionsResponse - (*WorkflowTemplate)(nil), // 10: api.WorkflowTemplate - (*KeyValue)(nil), // 11: api.KeyValue -} -var file_workspace_template_proto_depIdxs = []int32{ - 10, // 0: api.WorkspaceTemplate.workflowTemplate:type_name -> api.WorkflowTemplate - 11, // 1: api.WorkspaceTemplate.labels:type_name -> api.KeyValue - 0, // 2: api.GenerateWorkspaceTemplateWorkflowTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate - 0, // 3: api.CreateWorkspaceTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate - 0, // 4: api.UpdateWorkspaceTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate - 0, // 5: api.ListWorkspaceTemplatesResponse.workspaceTemplates:type_name -> api.WorkspaceTemplate - 0, // 6: api.ListWorkspaceTemplateVersionsResponse.workspaceTemplates:type_name -> api.WorkspaceTemplate - 1, // 7: api.WorkspaceTemplateService.GenerateWorkspaceTemplateWorkflowTemplate:input_type -> api.GenerateWorkspaceTemplateWorkflowTemplateRequest - 2, // 8: api.WorkspaceTemplateService.CreateWorkspaceTemplate:input_type -> api.CreateWorkspaceTemplateRequest - 3, // 9: api.WorkspaceTemplateService.UpdateWorkspaceTemplate:input_type -> api.UpdateWorkspaceTemplateRequest - 5, // 10: api.WorkspaceTemplateService.ArchiveWorkspaceTemplate:input_type -> api.ArchiveWorkspaceTemplateRequest - 4, // 11: api.WorkspaceTemplateService.GetWorkspaceTemplate:input_type -> api.GetWorkspaceTemplateRequest - 6, // 12: api.WorkspaceTemplateService.ListWorkspaceTemplates:input_type -> api.ListWorkspaceTemplatesRequest - 8, // 13: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:input_type -> api.ListWorkspaceTemplateVersionsRequest - 10, // 14: api.WorkspaceTemplateService.GenerateWorkspaceTemplateWorkflowTemplate:output_type -> api.WorkflowTemplate - 0, // 15: api.WorkspaceTemplateService.CreateWorkspaceTemplate:output_type -> api.WorkspaceTemplate - 0, // 16: api.WorkspaceTemplateService.UpdateWorkspaceTemplate:output_type -> api.WorkspaceTemplate - 0, // 17: api.WorkspaceTemplateService.ArchiveWorkspaceTemplate:output_type -> api.WorkspaceTemplate - 0, // 18: api.WorkspaceTemplateService.GetWorkspaceTemplate:output_type -> api.WorkspaceTemplate - 7, // 19: api.WorkspaceTemplateService.ListWorkspaceTemplates:output_type -> api.ListWorkspaceTemplatesResponse - 9, // 20: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:output_type -> api.ListWorkspaceTemplateVersionsResponse - 14, // [14:21] is the sub-list for method output_type - 7, // [7:14] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_workspace_template_proto_init() } -func file_workspace_template_proto_init() { - if File_workspace_template_proto != nil { - return - } - file_workflow_template_proto_init() - file_label_proto_init() - if !protoimpl.UnsafeEnabled { - file_workspace_template_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceTemplate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateWorkspaceTemplateWorkflowTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkspaceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateWorkspaceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkspaceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveWorkspaceTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceTemplatesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceTemplatesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceTemplateVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_workspace_template_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceTemplateVersionsResponse); 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_workspace_template_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_workspace_template_proto_goTypes, - DependencyIndexes: file_workspace_template_proto_depIdxs, - MessageInfos: file_workspace_template_proto_msgTypes, - }.Build() - File_workspace_template_proto = out.File - file_workspace_template_proto_rawDesc = nil - file_workspace_template_proto_goTypes = nil - file_workspace_template_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// WorkspaceTemplateServiceClient is the client API for WorkspaceTemplateService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WorkspaceTemplateServiceClient interface { - // Get the generated WorkflowTemplate for a WorkspaceTemplate - GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, in *GenerateWorkspaceTemplateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) - // Creates a WorkspaceTemplate - CreateWorkspaceTemplate(ctx context.Context, in *CreateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) - // Updates a WorkspaceTemplate - UpdateWorkspaceTemplate(ctx context.Context, in *UpdateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) - // Archives a WorkspaceTemplate - ArchiveWorkspaceTemplate(ctx context.Context, in *ArchiveWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) - // Get a WorkspaceTemplate - GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) - ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error) - ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error) -} - -type workspaceTemplateServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewWorkspaceTemplateServiceClient(cc grpc.ClientConnInterface) WorkspaceTemplateServiceClient { - return &workspaceTemplateServiceClient{cc} -} - -func (c *workspaceTemplateServiceClient) GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, in *GenerateWorkspaceTemplateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { - out := new(WorkflowTemplate) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceTemplateServiceClient) CreateWorkspaceTemplate(ctx context.Context, in *CreateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { - out := new(WorkspaceTemplate) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceTemplateServiceClient) UpdateWorkspaceTemplate(ctx context.Context, in *UpdateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { - out := new(WorkspaceTemplate) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceTemplateServiceClient) ArchiveWorkspaceTemplate(ctx context.Context, in *ArchiveWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { - out := new(WorkspaceTemplate) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceTemplateServiceClient) GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { - out := new(WorkspaceTemplate) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/GetWorkspaceTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceTemplateServiceClient) ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error) { - out := new(ListWorkspaceTemplatesResponse) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplates", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *workspaceTemplateServiceClient) ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error) { - out := new(ListWorkspaceTemplateVersionsResponse) - err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WorkspaceTemplateServiceServer is the server API for WorkspaceTemplateService service. -type WorkspaceTemplateServiceServer interface { - // Get the generated WorkflowTemplate for a WorkspaceTemplate - GenerateWorkspaceTemplateWorkflowTemplate(context.Context, *GenerateWorkspaceTemplateWorkflowTemplateRequest) (*WorkflowTemplate, error) - // Creates a WorkspaceTemplate - CreateWorkspaceTemplate(context.Context, *CreateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) - // Updates a WorkspaceTemplate - UpdateWorkspaceTemplate(context.Context, *UpdateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) - // Archives a WorkspaceTemplate - ArchiveWorkspaceTemplate(context.Context, *ArchiveWorkspaceTemplateRequest) (*WorkspaceTemplate, error) - // Get a WorkspaceTemplate - GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error) - ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error) - ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error) -} - -// UnimplementedWorkspaceTemplateServiceServer can be embedded to have forward compatible implementations. -type UnimplementedWorkspaceTemplateServiceServer struct { -} - -func (*UnimplementedWorkspaceTemplateServiceServer) GenerateWorkspaceTemplateWorkflowTemplate(context.Context, *GenerateWorkspaceTemplateWorkflowTemplateRequest) (*WorkflowTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateWorkspaceTemplateWorkflowTemplate not implemented") -} -func (*UnimplementedWorkspaceTemplateServiceServer) CreateWorkspaceTemplate(context.Context, *CreateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspaceTemplate not implemented") -} -func (*UnimplementedWorkspaceTemplateServiceServer) UpdateWorkspaceTemplate(context.Context, *UpdateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceTemplate not implemented") -} -func (*UnimplementedWorkspaceTemplateServiceServer) ArchiveWorkspaceTemplate(context.Context, *ArchiveWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkspaceTemplate not implemented") -} -func (*UnimplementedWorkspaceTemplateServiceServer) GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceTemplate not implemented") -} -func (*UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplates not implemented") -} -func (*UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplateVersions not implemented") -} - -func RegisterWorkspaceTemplateServiceServer(s *grpc.Server, srv WorkspaceTemplateServiceServer) { - s.RegisterService(&_WorkspaceTemplateService_serviceDesc, srv) -} - -func _WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateWorkspaceTemplateWorkflowTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).GenerateWorkspaceTemplateWorkflowTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).GenerateWorkspaceTemplateWorkflowTemplate(ctx, req.(*GenerateWorkspaceTemplateWorkflowTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceTemplateService_CreateWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWorkspaceTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).CreateWorkspaceTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/CreateWorkspaceTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).CreateWorkspaceTemplate(ctx, req.(*CreateWorkspaceTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceTemplateService_UpdateWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateWorkspaceTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).UpdateWorkspaceTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).UpdateWorkspaceTemplate(ctx, req.(*UpdateWorkspaceTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceTemplateService_ArchiveWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveWorkspaceTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).ArchiveWorkspaceTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).ArchiveWorkspaceTemplate(ctx, req.(*ArchiveWorkspaceTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceTemplateService_GetWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetWorkspaceTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).GetWorkspaceTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/GetWorkspaceTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).GetWorkspaceTemplate(ctx, req.(*GetWorkspaceTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceTemplateService_ListWorkspaceTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkspaceTemplatesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplates(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplates", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplates(ctx, req.(*ListWorkspaceTemplatesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkspaceTemplateVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplateVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplateVersions(ctx, req.(*ListWorkspaceTemplateVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _WorkspaceTemplateService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.WorkspaceTemplateService", - HandlerType: (*WorkspaceTemplateServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GenerateWorkspaceTemplateWorkflowTemplate", - Handler: _WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_Handler, - }, - { - MethodName: "CreateWorkspaceTemplate", - Handler: _WorkspaceTemplateService_CreateWorkspaceTemplate_Handler, - }, - { - MethodName: "UpdateWorkspaceTemplate", - Handler: _WorkspaceTemplateService_UpdateWorkspaceTemplate_Handler, - }, - { - MethodName: "ArchiveWorkspaceTemplate", - Handler: _WorkspaceTemplateService_ArchiveWorkspaceTemplate_Handler, - }, - { - MethodName: "GetWorkspaceTemplate", - Handler: _WorkspaceTemplateService_GetWorkspaceTemplate_Handler, - }, - { - MethodName: "ListWorkspaceTemplates", - Handler: _WorkspaceTemplateService_ListWorkspaceTemplates_Handler, - }, - { - MethodName: "ListWorkspaceTemplateVersions", - Handler: _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "workspace_template.proto", -} diff --git a/api/workspace_template.pb.gw.go b/api/workspace_template.pb.gw.go deleted file mode 100644 index 441e345e..00000000 --- a/api/workspace_template.pb.gw.go +++ /dev/null @@ -1,959 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: workspace_template.proto - -/* -Package api is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package api - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenerateWorkspaceTemplateWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.GenerateWorkspaceTemplateWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GenerateWorkspaceTemplateWorkflowTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.GenerateWorkspaceTemplateWorkflowTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := client.CreateWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - msg, err := server.CreateWorkspaceTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.UpdateWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.UpdateWorkspaceTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ArchiveWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ArchiveWorkspaceTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkspaceTemplateService_GetWorkspaceTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} -) - -func request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_GetWorkspaceTemplate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetWorkspaceTemplateRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkspaceTemplateService_GetWorkspaceTemplate_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetWorkspaceTemplate(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_WorkspaceTemplateService_ListWorkspaceTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceTemplatesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_ListWorkspaceTemplates_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListWorkspaceTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceTemplatesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkspaceTemplateService_ListWorkspaceTemplates_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListWorkspaceTemplates(ctx, &protoReq) - return msg, metadata, err - -} - -func request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceTemplateVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := client.ListWorkspaceTemplateVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceTemplateVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") - } - - protoReq.Namespace, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) - } - - val, ok = pathParams["uid"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") - } - - protoReq.Uid, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) - } - - msg, err := server.ListWorkspaceTemplateVersions(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterWorkspaceTemplateServiceHandlerServer registers the http handlers for service WorkspaceTemplateService to "mux". -// UnaryRPC :call WorkspaceTemplateServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceTemplateServiceServer) error { - - mux.Handle("POST", pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplates_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterWorkspaceTemplateServiceHandlerFromEndpoint is same as RegisterWorkspaceTemplateServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterWorkspaceTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterWorkspaceTemplateServiceHandler(ctx, mux, conn) -} - -// RegisterWorkspaceTemplateServiceHandler registers the http handlers for service WorkspaceTemplateService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWorkspaceTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterWorkspaceTemplateServiceHandlerClient(ctx, mux, NewWorkspaceTemplateServiceClient(conn)) -} - -// RegisterWorkspaceTemplateServiceHandlerClient registers the http handlers for service WorkspaceTemplateService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceTemplateServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceTemplateServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WorkspaceTemplateServiceClient" to call the correct interceptors. -func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceTemplateServiceClient) error { - - mux.Handle("POST", pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_GetWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_ListWorkspaceTemplates_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "workflow_template"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "archive"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "versions"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkspaceTemplateService_CreateWorkspaceTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.ForwardResponseMessage - - forward_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.ForwardResponseMessage - - forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.ForwardResponseMessage -) diff --git a/main.go b/main.go index f60c8f4c..0a2665e2 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,7 @@ import ( grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/jmoiron/sqlx" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" migrations "github.com/onepanelio/core/db/go" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util/env" diff --git a/server/auth/auth.go b/server/auth/auth.go index 7ba02a38..c402c5a1 100644 --- a/server/auth/auth.go +++ b/server/auth/auth.go @@ -6,7 +6,7 @@ import ( "encoding/hex" "errors" "fmt" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" "github.com/onepanelio/core/pkg/util" log "github.com/sirupsen/logrus" v12 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/server/auth_server.go b/server/auth_server.go index 0fc52bf9..354fa1fb 100644 --- a/server/auth_server.go +++ b/server/auth_server.go @@ -3,7 +3,7 @@ package server import ( "context" "fmt" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util" "github.com/onepanelio/core/server/auth" diff --git a/server/config_server.go b/server/config_server.go index a4ba63da..f32bc3e7 100644 --- a/server/config_server.go +++ b/server/config_server.go @@ -3,7 +3,7 @@ package server import ( "context" "github.com/golang/protobuf/ptypes/empty" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" "github.com/onepanelio/core/server/auth" ) diff --git a/server/converter/converter.go b/server/converter/converter.go index 3d46e573..f95248be 100644 --- a/server/converter/converter.go +++ b/server/converter/converter.go @@ -1,7 +1,7 @@ package converter import ( - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "sort" "time" diff --git a/server/cron_workflow_server.go b/server/cron_workflow_server.go index a75a3c79..384028b5 100644 --- a/server/cron_workflow_server.go +++ b/server/cron_workflow_server.go @@ -3,7 +3,7 @@ package server import ( "context" "github.com/golang/protobuf/ptypes/empty" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util/ptr" "github.com/onepanelio/core/pkg/util/request/pagination" diff --git a/server/label_server.go b/server/label_server.go index debd26c9..37e5a43d 100644 --- a/server/label_server.go +++ b/server/label_server.go @@ -2,7 +2,7 @@ package server import ( "context" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/server/auth" "github.com/onepanelio/core/server/converter" diff --git a/server/namespace_server.go b/server/namespace_server.go index 9bcd09de..1f89b06c 100644 --- a/server/namespace_server.go +++ b/server/namespace_server.go @@ -5,7 +5,7 @@ import ( "math" "strings" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/server/auth" ) diff --git a/server/secret_server.go b/server/secret_server.go index 4aabc2ff..556c0289 100644 --- a/server/secret_server.go +++ b/server/secret_server.go @@ -4,7 +4,7 @@ import ( "context" "github.com/golang/protobuf/ptypes/empty" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/server/auth" ) diff --git a/server/service_server.go b/server/service_server.go index 130660db..a259fb7b 100644 --- a/server/service_server.go +++ b/server/service_server.go @@ -2,7 +2,7 @@ package server import ( "context" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/server/auth" ) diff --git a/server/workflow_server.go b/server/workflow_server.go index 57747573..bfef8857 100644 --- a/server/workflow_server.go +++ b/server/workflow_server.go @@ -17,7 +17,7 @@ import ( "time" "github.com/golang/protobuf/ptypes/empty" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util/ptr" "github.com/onepanelio/core/server/auth" diff --git a/server/workflow_template_server.go b/server/workflow_template_server.go index 065e115c..c3a049b7 100644 --- a/server/workflow_template_server.go +++ b/server/workflow_template_server.go @@ -3,7 +3,7 @@ package server import ( "context" "errors" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util/request" "github.com/onepanelio/core/pkg/util/request/pagination" diff --git a/server/workspace_server.go b/server/workspace_server.go index eb321409..a8eeeb48 100644 --- a/server/workspace_server.go +++ b/server/workspace_server.go @@ -3,7 +3,7 @@ package server import ( "context" "github.com/golang/protobuf/ptypes/empty" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util" "github.com/onepanelio/core/pkg/util/ptr" diff --git a/server/workspace_template_server.go b/server/workspace_template_server.go index 6d72d44e..7d48fb46 100644 --- a/server/workspace_template_server.go +++ b/server/workspace_template_server.go @@ -2,7 +2,7 @@ package server import ( "context" - "github.com/onepanelio/core/api" + api "github.com/onepanelio/core/api/gen" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/pkg/util" "github.com/onepanelio/core/pkg/util/request" From 1257ab101eb733c450862bb355049deaeffcd899 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 15:46:55 -0800 Subject: [PATCH 58/80] chore: generate new files from proto --- api/gen/api.pb.go | 88 + api/gen/auth.pb.go | 662 ++++++ api/gen/auth.pb.gw.go | 329 +++ api/gen/auth_grpc.pb.go | 172 ++ api/gen/common.pb.go | 289 +++ api/gen/config.pb.go | 340 +++ api/gen/config.pb.gw.go | 152 ++ api/gen/config_grpc.pb.go | 98 + api/gen/cron_workflow.pb.go | 777 +++++++ api/gen/cron_workflow.pb.gw.go | 828 +++++++ api/gen/cron_workflow_grpc.pb.go | 242 ++ api/gen/label.pb.go | 793 +++++++ api/gen/label.pb.gw.go | 831 +++++++ api/gen/label_grpc.pb.go | 241 ++ api/gen/metric.pb.go | 166 ++ api/gen/namespace.pb.go | 421 ++++ api/gen/namespace.pb.gw.go | 250 +++ api/gen/namespace_grpc.pb.go | 133 ++ api/gen/secret.pb.go | 1231 ++++++++++ api/gen/secret.pb.gw.go | 1066 +++++++++ api/gen/secret_grpc.pb.go | 350 +++ api/gen/services.pb.go | 436 ++++ api/gen/services.pb.gw.go | 322 +++ api/gen/services_grpc.pb.go | 133 ++ api/gen/workflow.pb.go | 2965 +++++++++++++++++++++++++ api/gen/workflow.pb.gw.go | 2155 ++++++++++++++++++ api/gen/workflow_grpc.pb.go | 733 ++++++ api/gen/workflow_template.pb.go | 1471 ++++++++++++ api/gen/workflow_template.pb.gw.go | 1283 +++++++++++ api/gen/workflow_template_grpc.pb.go | 314 +++ api/gen/workspace.pb.go | 1808 +++++++++++++++ api/gen/workspace.pb.gw.go | 1282 +++++++++++ api/gen/workspace_grpc.pb.go | 422 ++++ api/gen/workspace_template.pb.go | 1117 ++++++++++ api/gen/workspace_template.pb.gw.go | 963 ++++++++ api/gen/workspace_template_grpc.pb.go | 324 +++ 36 files changed, 25187 insertions(+) create mode 100644 api/gen/api.pb.go create mode 100644 api/gen/auth.pb.go create mode 100644 api/gen/auth.pb.gw.go create mode 100644 api/gen/auth_grpc.pb.go create mode 100644 api/gen/common.pb.go create mode 100644 api/gen/config.pb.go create mode 100644 api/gen/config.pb.gw.go create mode 100644 api/gen/config_grpc.pb.go create mode 100644 api/gen/cron_workflow.pb.go create mode 100644 api/gen/cron_workflow.pb.gw.go create mode 100644 api/gen/cron_workflow_grpc.pb.go create mode 100644 api/gen/label.pb.go create mode 100644 api/gen/label.pb.gw.go create mode 100644 api/gen/label_grpc.pb.go create mode 100644 api/gen/metric.pb.go create mode 100644 api/gen/namespace.pb.go create mode 100644 api/gen/namespace.pb.gw.go create mode 100644 api/gen/namespace_grpc.pb.go create mode 100644 api/gen/secret.pb.go create mode 100644 api/gen/secret.pb.gw.go create mode 100644 api/gen/secret_grpc.pb.go create mode 100644 api/gen/services.pb.go create mode 100644 api/gen/services.pb.gw.go create mode 100644 api/gen/services_grpc.pb.go create mode 100644 api/gen/workflow.pb.go create mode 100644 api/gen/workflow.pb.gw.go create mode 100644 api/gen/workflow_grpc.pb.go create mode 100644 api/gen/workflow_template.pb.go create mode 100644 api/gen/workflow_template.pb.gw.go create mode 100644 api/gen/workflow_template_grpc.pb.go create mode 100644 api/gen/workspace.pb.go create mode 100644 api/gen/workspace.pb.gw.go create mode 100644 api/gen/workspace_grpc.pb.go create mode 100644 api/gen/workspace_template.pb.go create mode 100644 api/gen/workspace_template.pb.gw.go create mode 100644 api/gen/workspace_template_grpc.pb.go diff --git a/api/gen/api.pb.go b/api/gen/api.pb.go new file mode 100644 index 00000000..550ad04c --- /dev/null +++ b/api/gen/api.pb.go @@ -0,0 +1,88 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: api.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +var File_api_proto protoreflect.FileDescriptor + +var file_api_proto_rawDesc = []byte{ + 0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x42, 0xad, 0x02, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x92, 0x41, 0x85, 0x02, 0x12, 0x58, 0x0a, 0x08, 0x4f, + 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x12, 0x0c, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, + 0x6c, 0x20, 0x41, 0x50, 0x49, 0x22, 0x36, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, + 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, + 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x32, 0x06, 0x30, + 0x2e, 0x31, 0x30, 0x2e, 0x30, 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, + 0x3a, 0x38, 0x38, 0x38, 0x38, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x18, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, + 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x49, 0x0a, 0x47, 0x0a, 0x06, 0x42, 0x65, 0x61, + 0x72, 0x65, 0x72, 0x12, 0x3d, 0x08, 0x02, 0x12, 0x28, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, + 0x72, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_api_proto_goTypes = []interface{}{} +var file_api_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_proto_init() } +func file_api_proto_init() { + if File_api_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_api_proto_goTypes, + DependencyIndexes: file_api_proto_depIdxs, + }.Build() + File_api_proto = out.File + file_api_proto_rawDesc = nil + file_api_proto_goTypes = nil + file_api_proto_depIdxs = nil +} diff --git a/api/gen/auth.pb.go b/api/gen/auth.pb.go new file mode 100644 index 00000000..eb60f143 --- /dev/null +++ b/api/gen/auth.pb.go @@ -0,0 +1,662 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: auth.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type IsValidTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *IsValidTokenRequest) Reset() { + *x = IsValidTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsValidTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsValidTokenRequest) ProtoMessage() {} + +func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 IsValidTokenRequest.ProtoReflect.Descriptor instead. +func (*IsValidTokenRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{0} +} + +func (x *IsValidTokenRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *IsValidTokenRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type IsValidTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` +} + +func (x *IsValidTokenResponse) Reset() { + *x = IsValidTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsValidTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsValidTokenResponse) ProtoMessage() {} + +func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 IsValidTokenResponse.ProtoReflect.Descriptor instead. +func (*IsValidTokenResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{1} +} + +func (x *IsValidTokenResponse) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *IsValidTokenResponse) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *IsValidTokenResponse) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +type IsAuthorized struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Verb string `protobuf:"bytes,2,opt,name=verb,proto3" json:"verb,omitempty"` + Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` + Resource string `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"` + ResourceName string `protobuf:"bytes,5,opt,name=resourceName,proto3" json:"resourceName,omitempty"` +} + +func (x *IsAuthorized) Reset() { + *x = IsAuthorized{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsAuthorized) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsAuthorized) ProtoMessage() {} + +func (x *IsAuthorized) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 IsAuthorized.ProtoReflect.Descriptor instead. +func (*IsAuthorized) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{2} +} + +func (x *IsAuthorized) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *IsAuthorized) GetVerb() string { + if x != nil { + return x.Verb + } + return "" +} + +func (x *IsAuthorized) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +func (x *IsAuthorized) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *IsAuthorized) GetResourceName() string { + if x != nil { + return x.ResourceName + } + return "" +} + +type IsAuthorizedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsAuthorized *IsAuthorized `protobuf:"bytes,1,opt,name=isAuthorized,proto3" json:"isAuthorized,omitempty"` +} + +func (x *IsAuthorizedRequest) Reset() { + *x = IsAuthorizedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsAuthorizedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsAuthorizedRequest) ProtoMessage() {} + +func (x *IsAuthorizedRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 IsAuthorizedRequest.ProtoReflect.Descriptor instead. +func (*IsAuthorizedRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{3} +} + +func (x *IsAuthorizedRequest) GetIsAuthorized() *IsAuthorized { + if x != nil { + return x.IsAuthorized + } + return nil +} + +type IsAuthorizedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"` +} + +func (x *IsAuthorizedResponse) Reset() { + *x = IsAuthorizedResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsAuthorizedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsAuthorizedResponse) ProtoMessage() {} + +func (x *IsAuthorizedResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 IsAuthorizedResponse.ProtoReflect.Descriptor instead. +func (*IsAuthorizedResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{4} +} + +func (x *IsAuthorizedResponse) GetAuthorized() bool { + if x != nil { + return x.Authorized + } + return false +} + +type GetAccessTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *GetAccessTokenRequest) Reset() { + *x = GetAccessTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccessTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccessTokenRequest) ProtoMessage() {} + +func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 GetAccessTokenRequest.ProtoReflect.Descriptor instead. +func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{5} +} + +func (x *GetAccessTokenRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *GetAccessTokenRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type GetAccessTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` +} + +func (x *GetAccessTokenResponse) Reset() { + *x = GetAccessTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_auth_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccessTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccessTokenResponse) ProtoMessage() {} + +func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_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 GetAccessTokenResponse.ProtoReflect.Descriptor instead. +func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{6} +} + +func (x *GetAccessTokenResponse) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *GetAccessTokenResponse) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *GetAccessTokenResponse) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +var File_auth_proto protoreflect.FileDescriptor + +var file_auth_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, + 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x47, 0x0a, 0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x60, 0x0a, 0x14, 0x49, 0x73, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x49, + 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x65, 0x72, + 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x14, 0x0a, + 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x13, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0c, 0x69, 0x73, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x65, 0x64, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x64, 0x22, 0x36, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x88, 0x02, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, + 0x2a, 0x12, 0x7e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, 0x2a, 0x92, 0x41, 0x02, 0x62, + 0x00, 0x12, 0x6d, 0x0a, 0x0c, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x64, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x12, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x3a, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, + 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_auth_proto_rawDescOnce sync.Once + file_auth_proto_rawDescData = file_auth_proto_rawDesc +) + +func file_auth_proto_rawDescGZIP() []byte { + file_auth_proto_rawDescOnce.Do(func() { + file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData) + }) + return file_auth_proto_rawDescData +} + +var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_auth_proto_goTypes = []interface{}{ + (*IsValidTokenRequest)(nil), // 0: api.IsValidTokenRequest + (*IsValidTokenResponse)(nil), // 1: api.IsValidTokenResponse + (*IsAuthorized)(nil), // 2: api.IsAuthorized + (*IsAuthorizedRequest)(nil), // 3: api.IsAuthorizedRequest + (*IsAuthorizedResponse)(nil), // 4: api.IsAuthorizedResponse + (*GetAccessTokenRequest)(nil), // 5: api.GetAccessTokenRequest + (*GetAccessTokenResponse)(nil), // 6: api.GetAccessTokenResponse +} +var file_auth_proto_depIdxs = []int32{ + 2, // 0: api.IsAuthorizedRequest.isAuthorized:type_name -> api.IsAuthorized + 0, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest + 5, // 2: api.AuthService.GetAccessToken:input_type -> api.GetAccessTokenRequest + 3, // 3: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest + 1, // 4: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse + 6, // 5: api.AuthService.GetAccessToken:output_type -> api.GetAccessTokenResponse + 4, // 6: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_auth_proto_init() } +func file_auth_proto_init() { + if File_auth_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsValidTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsValidTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsAuthorized); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsAuthorizedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsAuthorizedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccessTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccessTokenResponse); 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_auth_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_auth_proto_goTypes, + DependencyIndexes: file_auth_proto_depIdxs, + MessageInfos: file_auth_proto_msgTypes, + }.Build() + File_auth_proto = out.File + file_auth_proto_rawDesc = nil + file_auth_proto_goTypes = nil + file_auth_proto_depIdxs = nil +} diff --git a/api/gen/auth.pb.gw.go b/api/gen/auth.pb.gw.go new file mode 100644 index 00000000..79fb0f25 --- /dev/null +++ b/api/gen/auth.pb.gw.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: auth.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsValidTokenRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.IsValidToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsValidTokenRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.IsValidToken(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccessTokenRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccessTokenRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAccessToken(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsAuthorizedRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.IsAuthorized); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.IsAuthorized(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq IsAuthorizedRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.IsAuthorized); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.IsAuthorized(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". +// UnaryRPC :call AuthServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. +func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { + + mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/IsValidToken") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_IsValidToken_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_GetAccessToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/GetAccessToken") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/IsAuthorized") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuthService_IsAuthorized_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_IsAuthorized_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuthServiceHandler(ctx, mux, conn) +} + +// RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthServiceHandlerClient(ctx, mux, NewAuthServiceClient(conn)) +} + +// RegisterAuthServiceHandlerClient registers the http handlers for service AuthService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuthServiceClient" to call the correct interceptors. +func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error { + + mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/IsValidToken") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_IsValidToken_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_GetAccessToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/GetAccessToken") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/IsAuthorized") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuthService_IsAuthorized_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuthService_IsAuthorized_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AuthService_IsValidToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "token"}, "")) + + pattern_AuthService_GetAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "get_access_token"}, "")) + + pattern_AuthService_IsAuthorized_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "auth"}, "")) +) + +var ( + forward_AuthService_IsValidToken_0 = runtime.ForwardResponseMessage + + forward_AuthService_GetAccessToken_0 = runtime.ForwardResponseMessage + + forward_AuthService_IsAuthorized_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/auth_grpc.pb.go b/api/gen/auth_grpc.pb.go new file mode 100644 index 00000000..4209f7d0 --- /dev/null +++ b/api/gen/auth_grpc.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// AuthServiceClient is the client API for AuthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuthServiceClient interface { + // Deprecated: Do not use. + IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error) + GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) + IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error) +} + +type authServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { + return &authServiceClient{cc} +} + +// Deprecated: Do not use. +func (c *authServiceClient) IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error) { + out := new(IsValidTokenResponse) + err := c.cc.Invoke(ctx, "/api.AuthService/IsValidToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) { + out := new(GetAccessTokenResponse) + err := c.cc.Invoke(ctx, "/api.AuthService/GetAccessToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error) { + out := new(IsAuthorizedResponse) + err := c.cc.Invoke(ctx, "/api.AuthService/IsAuthorized", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthServiceServer is the server API for AuthService service. +// All implementations must embed UnimplementedAuthServiceServer +// for forward compatibility +type AuthServiceServer interface { + // Deprecated: Do not use. + IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) + GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error) + IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error) + mustEmbedUnimplementedAuthServiceServer() +} + +// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations. +type UnimplementedAuthServiceServer struct { +} + +func (UnimplementedAuthServiceServer) IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented") +} +func (UnimplementedAuthServiceServer) GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccessToken not implemented") +} +func (UnimplementedAuthServiceServer) IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsAuthorized not implemented") +} +func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} + +// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthServiceServer will +// result in compilation errors. +type UnsafeAuthServiceServer interface { + mustEmbedUnimplementedAuthServiceServer() +} + +func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) { + s.RegisterService(&_AuthService_serviceDesc, srv) +} + +func _AuthService_IsValidToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsValidTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).IsValidToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.AuthService/IsValidToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).IsValidToken(ctx, req.(*IsValidTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_GetAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccessTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).GetAccessToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.AuthService/GetAccessToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).GetAccessToken(ctx, req.(*GetAccessTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_IsAuthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsAuthorizedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).IsAuthorized(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.AuthService/IsAuthorized", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).IsAuthorized(ctx, req.(*IsAuthorizedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AuthService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.AuthService", + HandlerType: (*AuthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "IsValidToken", + Handler: _AuthService_IsValidToken_Handler, + }, + { + MethodName: "GetAccessToken", + Handler: _AuthService_GetAccessToken_Handler, + }, + { + MethodName: "IsAuthorized", + Handler: _AuthService_IsAuthorized_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "auth.proto", +} diff --git a/api/gen/common.pb.go b/api/gen/common.pb.go new file mode 100644 index 00000000..eec34137 --- /dev/null +++ b/api/gen/common.pb.go @@ -0,0 +1,289 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: common.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Parameter 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"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + DisplayName string `protobuf:"bytes,4,opt,name=displayName,proto3" json:"displayName,omitempty"` + Hint string `protobuf:"bytes,5,opt,name=hint,proto3" json:"hint,omitempty"` + Required bool `protobuf:"varint,6,opt,name=required,proto3" json:"required,omitempty"` + Visibility string `protobuf:"bytes,7,opt,name=visibility,proto3" json:"visibility,omitempty"` + Options []*ParameterOption `protobuf:"bytes,8,rep,name=options,proto3" json:"options,omitempty"` +} + +func (x *Parameter) Reset() { + *x = Parameter{} + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameter) ProtoMessage() {} + +func (x *Parameter) ProtoReflect() protoreflect.Message { + mi := &file_common_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 Parameter.ProtoReflect.Descriptor instead. +func (*Parameter) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{0} +} + +func (x *Parameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Parameter) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Parameter) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Parameter) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Parameter) GetHint() string { + if x != nil { + return x.Hint + } + return "" +} + +func (x *Parameter) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *Parameter) GetVisibility() string { + if x != nil { + return x.Visibility + } + return "" +} + +func (x *Parameter) GetOptions() []*ParameterOption { + if x != nil { + return x.Options + } + return nil +} + +type ParameterOption 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 *ParameterOption) Reset() { + *x = ParameterOption{} + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParameterOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParameterOption) ProtoMessage() {} + +func (x *ParameterOption) ProtoReflect() protoreflect.Message { + mi := &file_common_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 ParameterOption.ProtoReflect.Descriptor instead. +func (*ParameterOption) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{1} +} + +func (x *ParameterOption) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ParameterOption) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +var File_common_proto protoreflect.FileDescriptor + +var file_common_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, + 0x61, 0x70, 0x69, 0x22, 0xeb, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 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, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x70, + 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x24, + 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, + 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_common_proto_rawDescOnce sync.Once + file_common_proto_rawDescData = file_common_proto_rawDesc +) + +func file_common_proto_rawDescGZIP() []byte { + file_common_proto_rawDescOnce.Do(func() { + file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData) + }) + return file_common_proto_rawDescData +} + +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_common_proto_goTypes = []interface{}{ + (*Parameter)(nil), // 0: api.Parameter + (*ParameterOption)(nil), // 1: api.ParameterOption +} +var file_common_proto_depIdxs = []int32{ + 1, // 0: api.Parameter.options:type_name -> api.ParameterOption + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_common_proto_init() } +func file_common_proto_init() { + if File_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParameterOption); 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_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_common_proto_goTypes, + DependencyIndexes: file_common_proto_depIdxs, + MessageInfos: file_common_proto_msgTypes, + }.Build() + File_common_proto = out.File + file_common_proto_rawDesc = nil + file_common_proto_goTypes = nil + file_common_proto_depIdxs = nil +} diff --git a/api/gen/config.pb.go b/api/gen/config.pb.go new file mode 100644 index 00000000..3af61edf --- /dev/null +++ b/api/gen/config.pb.go @@ -0,0 +1,340 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: config.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type GetConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiUrl string `protobuf:"bytes,1,opt,name=apiUrl,proto3" json:"apiUrl,omitempty"` + Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` + Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"` + NodePool *NodePool `protobuf:"bytes,4,opt,name=nodePool,proto3" json:"nodePool,omitempty"` +} + +func (x *GetConfigResponse) Reset() { + *x = GetConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigResponse) ProtoMessage() {} + +func (x *GetConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_config_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 GetConfigResponse.ProtoReflect.Descriptor instead. +func (*GetConfigResponse) Descriptor() ([]byte, []int) { + return file_config_proto_rawDescGZIP(), []int{0} +} + +func (x *GetConfigResponse) GetApiUrl() string { + if x != nil { + return x.ApiUrl + } + return "" +} + +func (x *GetConfigResponse) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *GetConfigResponse) GetFqdn() string { + if x != nil { + return x.Fqdn + } + return "" +} + +func (x *GetConfigResponse) GetNodePool() *NodePool { + if x != nil { + return x.NodePool + } + return nil +} + +type NodePoolOption 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 *NodePoolOption) Reset() { + *x = NodePoolOption{} + if protoimpl.UnsafeEnabled { + mi := &file_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodePoolOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodePoolOption) ProtoMessage() {} + +func (x *NodePoolOption) ProtoReflect() protoreflect.Message { + mi := &file_config_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 NodePoolOption.ProtoReflect.Descriptor instead. +func (*NodePoolOption) Descriptor() ([]byte, []int) { + return file_config_proto_rawDescGZIP(), []int{1} +} + +func (x *NodePoolOption) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NodePoolOption) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type NodePool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + Options []*NodePoolOption `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` +} + +func (x *NodePool) Reset() { + *x = NodePool{} + if protoimpl.UnsafeEnabled { + mi := &file_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodePool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodePool) ProtoMessage() {} + +func (x *NodePool) ProtoReflect() protoreflect.Message { + mi := &file_config_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 NodePool.ProtoReflect.Descriptor instead. +func (*NodePool) Descriptor() ([]byte, []int) { + return file_config_proto_rawDescGZIP(), []int{2} +} + +func (x *NodePool) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *NodePool) GetOptions() []*NodePoolOption { + if x != nil { + return x.Options + } + return nil +} + +var File_config_proto protoreflect.FileDescriptor + +var file_config_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, + 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, + 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, + 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x4f, + 0x70, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x4f, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x32, 0x6a, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x24, 0x5a, 0x22, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, + 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_config_proto_rawDescOnce sync.Once + file_config_proto_rawDescData = file_config_proto_rawDesc +) + +func file_config_proto_rawDescGZIP() []byte { + file_config_proto_rawDescOnce.Do(func() { + file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData) + }) + return file_config_proto_rawDescData +} + +var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_config_proto_goTypes = []interface{}{ + (*GetConfigResponse)(nil), // 0: api.GetConfigResponse + (*NodePoolOption)(nil), // 1: api.NodePoolOption + (*NodePool)(nil), // 2: api.NodePool + (*emptypb.Empty)(nil), // 3: google.protobuf.Empty +} +var file_config_proto_depIdxs = []int32{ + 2, // 0: api.GetConfigResponse.nodePool:type_name -> api.NodePool + 1, // 1: api.NodePool.options:type_name -> api.NodePoolOption + 3, // 2: api.ConfigService.GetConfig:input_type -> google.protobuf.Empty + 0, // 3: api.ConfigService.GetConfig:output_type -> api.GetConfigResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] 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_config_proto_init() } +func file_config_proto_init() { + if File_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodePoolOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodePool); 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_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_config_proto_goTypes, + DependencyIndexes: file_config_proto_depIdxs, + MessageInfos: file_config_proto_msgTypes, + }.Build() + File_config_proto = out.File + file_config_proto_rawDesc = nil + file_config_proto_goTypes = nil + file_config_proto_depIdxs = nil +} diff --git a/api/gen/config.pb.gw.go b/api/gen/config.pb.gw.go new file mode 100644 index 00000000..c4e57404 --- /dev/null +++ b/api/gen/config.pb.gw.go @@ -0,0 +1,152 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: config.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_ConfigService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.GetConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ConfigService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.GetConfig(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux". +// UnaryRPC :call ConfigServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigServiceHandlerFromEndpoint instead. +func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error { + + mux.Handle("GET", pattern_ConfigService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ConfigService/GetConfig") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ConfigService_GetConfig_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ConfigService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterConfigServiceHandlerFromEndpoint is same as RegisterConfigServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterConfigServiceHandler(ctx, mux, conn) +} + +// RegisterConfigServiceHandler registers the http handlers for service ConfigService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterConfigServiceHandlerClient(ctx, mux, NewConfigServiceClient(conn)) +} + +// RegisterConfigServiceHandlerClient registers the http handlers for service ConfigService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ConfigServiceClient" to call the correct interceptors. +func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error { + + mux.Handle("GET", pattern_ConfigService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ConfigService/GetConfig") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ConfigService_GetConfig_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ConfigService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ConfigService_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "config"}, "")) +) + +var ( + forward_ConfigService_GetConfig_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/config_grpc.pb.go b/api/gen/config_grpc.pb.go new file mode 100644 index 00000000..5e5f7fd0 --- /dev/null +++ b/api/gen/config_grpc.pb.go @@ -0,0 +1,98 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// ConfigServiceClient is the client API for ConfigService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ConfigServiceClient interface { + GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error) +} + +type configServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient { + return &configServiceClient{cc} +} + +func (c *configServiceClient) GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error) { + out := new(GetConfigResponse) + err := c.cc.Invoke(ctx, "/api.ConfigService/GetConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ConfigServiceServer is the server API for ConfigService service. +// All implementations must embed UnimplementedConfigServiceServer +// for forward compatibility +type ConfigServiceServer interface { + GetConfig(context.Context, *emptypb.Empty) (*GetConfigResponse, error) + mustEmbedUnimplementedConfigServiceServer() +} + +// UnimplementedConfigServiceServer must be embedded to have forward compatible implementations. +type UnimplementedConfigServiceServer struct { +} + +func (UnimplementedConfigServiceServer) GetConfig(context.Context, *emptypb.Empty) (*GetConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") +} +func (UnimplementedConfigServiceServer) mustEmbedUnimplementedConfigServiceServer() {} + +// UnsafeConfigServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ConfigServiceServer will +// result in compilation errors. +type UnsafeConfigServiceServer interface { + mustEmbedUnimplementedConfigServiceServer() +} + +func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer) { + s.RegisterService(&_ConfigService_serviceDesc, srv) +} + +func _ConfigService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConfigServiceServer).GetConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.ConfigService/GetConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConfigServiceServer).GetConfig(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _ConfigService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.ConfigService", + HandlerType: (*ConfigServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetConfig", + Handler: _ConfigService_GetConfig_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "config.proto", +} diff --git a/api/gen/cron_workflow.pb.go b/api/gen/cron_workflow.pb.go new file mode 100644 index 00000000..4d2bddbe --- /dev/null +++ b/api/gen/cron_workflow.pb.go @@ -0,0 +1,777 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: cron_workflow.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CronWorkflow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Manifest string `protobuf:"bytes,3,opt,name=manifest,proto3" json:"manifest,omitempty"` + WorkflowExecution *WorkflowExecution `protobuf:"bytes,4,opt,name=workflowExecution,proto3" json:"workflowExecution,omitempty"` + Labels []*KeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"` + Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *CronWorkflow) Reset() { + *x = CronWorkflow{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CronWorkflow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CronWorkflow) ProtoMessage() {} + +func (x *CronWorkflow) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 CronWorkflow.ProtoReflect.Descriptor instead. +func (*CronWorkflow) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{0} +} + +func (x *CronWorkflow) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CronWorkflow) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *CronWorkflow) GetManifest() string { + if x != nil { + return x.Manifest + } + return "" +} + +func (x *CronWorkflow) GetWorkflowExecution() *WorkflowExecution { + if x != nil { + return x.WorkflowExecution + } + return nil +} + +func (x *CronWorkflow) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +func (x *CronWorkflow) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +type CreateCronWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + CronWorkflow *CronWorkflow `protobuf:"bytes,2,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"` +} + +func (x *CreateCronWorkflowRequest) Reset() { + *x = CreateCronWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateCronWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateCronWorkflowRequest) ProtoMessage() {} + +func (x *CreateCronWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 CreateCronWorkflowRequest.ProtoReflect.Descriptor instead. +func (*CreateCronWorkflowRequest) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateCronWorkflowRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow { + if x != nil { + return x.CronWorkflow + } + return nil +} + +type GetCronWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *GetCronWorkflowRequest) Reset() { + *x = GetCronWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCronWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCronWorkflowRequest) ProtoMessage() {} + +func (x *GetCronWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 GetCronWorkflowRequest.ProtoReflect.Descriptor instead. +func (*GetCronWorkflowRequest) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{2} +} + +func (x *GetCronWorkflowRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetCronWorkflowRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type UpdateCronWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + CronWorkflow *CronWorkflow `protobuf:"bytes,3,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"` +} + +func (x *UpdateCronWorkflowRequest) Reset() { + *x = UpdateCronWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateCronWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateCronWorkflowRequest) ProtoMessage() {} + +func (x *UpdateCronWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 UpdateCronWorkflowRequest.ProtoReflect.Descriptor instead. +func (*UpdateCronWorkflowRequest) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateCronWorkflowRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateCronWorkflowRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UpdateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow { + if x != nil { + return x.CronWorkflow + } + return nil +} + +type DeleteCronWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *DeleteCronWorkflowRequest) Reset() { + *x = DeleteCronWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteCronWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteCronWorkflowRequest) ProtoMessage() {} + +func (x *DeleteCronWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 DeleteCronWorkflowRequest.ProtoReflect.Descriptor instead. +func (*DeleteCronWorkflowRequest) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteCronWorkflowRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteCronWorkflowRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ListCronWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + WorkflowTemplateName string `protobuf:"bytes,2,opt,name=workflow_template_name,json=workflowTemplateName,proto3" json:"workflow_template_name,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *ListCronWorkflowRequest) Reset() { + *x = ListCronWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCronWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCronWorkflowRequest) ProtoMessage() {} + +func (x *ListCronWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 ListCronWorkflowRequest.ProtoReflect.Descriptor instead. +func (*ListCronWorkflowRequest) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{5} +} + +func (x *ListCronWorkflowRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListCronWorkflowRequest) GetWorkflowTemplateName() string { + if x != nil { + return x.WorkflowTemplateName + } + return "" +} + +func (x *ListCronWorkflowRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListCronWorkflowRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +type ListCronWorkflowsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + CronWorkflows []*CronWorkflow `protobuf:"bytes,2,rep,name=cronWorkflows,proto3" json:"cronWorkflows,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` +} + +func (x *ListCronWorkflowsResponse) Reset() { + *x = ListCronWorkflowsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cron_workflow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListCronWorkflowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCronWorkflowsResponse) ProtoMessage() {} + +func (x *ListCronWorkflowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_cron_workflow_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 ListCronWorkflowsResponse.ProtoReflect.Descriptor instead. +func (*ListCronWorkflowsResponse) Descriptor() ([]byte, []int) { + return file_cron_workflow_proto_rawDescGZIP(), []int{6} +} + +func (x *ListCronWorkflowsResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListCronWorkflowsResponse) GetCronWorkflows() []*CronWorkflow { + if x != nil { + return x.CronWorkflows + } + return nil +} + +func (x *ListCronWorkflowsResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListCronWorkflowsResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListCronWorkflowsResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +var File_cron_workflow_proto protoreflect.FileDescriptor + +var file_cron_workflow_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0x70, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63, + 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x22, 0x48, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x82, 0x01, 0x0a, + 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x72, + 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x22, 0x4b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x9d, + 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xb4, + 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0d, 0x63, 0x72, + 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xf9, 0x05, 0x0a, 0x13, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, + 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, + 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x78, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, + 0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, + 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, + 0xc8, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, + 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x75, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6f, 0x12, 0x28, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x5a, 0x43, 0x12, 0x41, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x12, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, + 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x30, 0x2a, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, + 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, + 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cron_workflow_proto_rawDescOnce sync.Once + file_cron_workflow_proto_rawDescData = file_cron_workflow_proto_rawDesc +) + +func file_cron_workflow_proto_rawDescGZIP() []byte { + file_cron_workflow_proto_rawDescOnce.Do(func() { + file_cron_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_cron_workflow_proto_rawDescData) + }) + return file_cron_workflow_proto_rawDescData +} + +var file_cron_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_cron_workflow_proto_goTypes = []interface{}{ + (*CronWorkflow)(nil), // 0: api.CronWorkflow + (*CreateCronWorkflowRequest)(nil), // 1: api.CreateCronWorkflowRequest + (*GetCronWorkflowRequest)(nil), // 2: api.GetCronWorkflowRequest + (*UpdateCronWorkflowRequest)(nil), // 3: api.UpdateCronWorkflowRequest + (*DeleteCronWorkflowRequest)(nil), // 4: api.DeleteCronWorkflowRequest + (*ListCronWorkflowRequest)(nil), // 5: api.ListCronWorkflowRequest + (*ListCronWorkflowsResponse)(nil), // 6: api.ListCronWorkflowsResponse + (*WorkflowExecution)(nil), // 7: api.WorkflowExecution + (*KeyValue)(nil), // 8: api.KeyValue + (*emptypb.Empty)(nil), // 9: google.protobuf.Empty +} +var file_cron_workflow_proto_depIdxs = []int32{ + 7, // 0: api.CronWorkflow.workflowExecution:type_name -> api.WorkflowExecution + 8, // 1: api.CronWorkflow.labels:type_name -> api.KeyValue + 0, // 2: api.CreateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow + 0, // 3: api.UpdateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow + 0, // 4: api.ListCronWorkflowsResponse.cronWorkflows:type_name -> api.CronWorkflow + 1, // 5: api.CronWorkflowService.CreateCronWorkflow:input_type -> api.CreateCronWorkflowRequest + 3, // 6: api.CronWorkflowService.UpdateCronWorkflow:input_type -> api.UpdateCronWorkflowRequest + 2, // 7: api.CronWorkflowService.GetCronWorkflow:input_type -> api.GetCronWorkflowRequest + 5, // 8: api.CronWorkflowService.ListCronWorkflows:input_type -> api.ListCronWorkflowRequest + 4, // 9: api.CronWorkflowService.DeleteCronWorkflow:input_type -> api.DeleteCronWorkflowRequest + 0, // 10: api.CronWorkflowService.CreateCronWorkflow:output_type -> api.CronWorkflow + 0, // 11: api.CronWorkflowService.UpdateCronWorkflow:output_type -> api.CronWorkflow + 0, // 12: api.CronWorkflowService.GetCronWorkflow:output_type -> api.CronWorkflow + 6, // 13: api.CronWorkflowService.ListCronWorkflows:output_type -> api.ListCronWorkflowsResponse + 9, // 14: api.CronWorkflowService.DeleteCronWorkflow:output_type -> google.protobuf.Empty + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] 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_cron_workflow_proto_init() } +func file_cron_workflow_proto_init() { + if File_cron_workflow_proto != nil { + return + } + file_workflow_proto_init() + file_label_proto_init() + if !protoimpl.UnsafeEnabled { + file_cron_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CronWorkflow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cron_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateCronWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cron_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCronWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cron_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateCronWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cron_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteCronWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cron_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCronWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cron_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCronWorkflowsResponse); 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_cron_workflow_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cron_workflow_proto_goTypes, + DependencyIndexes: file_cron_workflow_proto_depIdxs, + MessageInfos: file_cron_workflow_proto_msgTypes, + }.Build() + File_cron_workflow_proto = out.File + file_cron_workflow_proto_rawDesc = nil + file_cron_workflow_proto_goTypes = nil + file_cron_workflow_proto_depIdxs = nil +} diff --git a/api/gen/cron_workflow.pb.gw.go b/api/gen/cron_workflow.pb.gw.go new file mode 100644 index 00000000..2f906b76 --- /dev/null +++ b/api/gen/cron_workflow.pb.gw.go @@ -0,0 +1,828 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cron_workflow.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateCronWorkflowRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.CreateCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateCronWorkflowRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateCronWorkflow(ctx, &protoReq) + return msg, metadata, err + +} + +func request_CronWorkflowService_UpdateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateCronWorkflowRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.UpdateCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CronWorkflowService_UpdateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateCronWorkflowRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.CronWorkflow); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.UpdateCronWorkflow(ctx, &protoReq) + return msg, metadata, err + +} + +func request_CronWorkflowService_GetCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.GetCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CronWorkflowService_GetCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.GetCronWorkflow(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_CronWorkflowService_ListCronWorkflows_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_CronWorkflowService_ListCronWorkflows_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListCronWorkflows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CronWorkflowService_ListCronWorkflows_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListCronWorkflows(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_CronWorkflowService_ListCronWorkflows_1 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "workflow_template_name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["workflow_template_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflow_template_name") + } + + protoReq.WorkflowTemplateName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflow_template_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListCronWorkflows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["workflow_template_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflow_template_name") + } + + protoReq.WorkflowTemplateName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflow_template_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListCronWorkflows(ctx, &protoReq) + return msg, metadata, err + +} + +func request_CronWorkflowService_DeleteCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.DeleteCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CronWorkflowService_DeleteCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteCronWorkflowRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.DeleteCronWorkflow(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterCronWorkflowServiceHandlerServer registers the http handlers for service CronWorkflowService to "mux". +// UnaryRPC :call CronWorkflowServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCronWorkflowServiceHandlerFromEndpoint instead. +func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CronWorkflowServiceServer) error { + + mux.Handle("POST", pattern_CronWorkflowService_CreateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/CreateCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CronWorkflowService_CreateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_CreateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_CronWorkflowService_UpdateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/UpdateCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CronWorkflowService_UpdateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_UpdateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CronWorkflowService_GetCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/GetCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CronWorkflowService_GetCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_GetCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CronWorkflowService_ListCronWorkflows_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_ListCronWorkflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CronWorkflowService_ListCronWorkflows_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_ListCronWorkflows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_CronWorkflowService_DeleteCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/DeleteCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CronWorkflowService_DeleteCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_DeleteCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterCronWorkflowServiceHandlerFromEndpoint is same as RegisterCronWorkflowServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCronWorkflowServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCronWorkflowServiceHandler(ctx, mux, conn) +} + +// RegisterCronWorkflowServiceHandler registers the http handlers for service CronWorkflowService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCronWorkflowServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCronWorkflowServiceHandlerClient(ctx, mux, NewCronWorkflowServiceClient(conn)) +} + +// RegisterCronWorkflowServiceHandlerClient registers the http handlers for service CronWorkflowService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CronWorkflowServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CronWorkflowServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CronWorkflowServiceClient" to call the correct interceptors. +func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CronWorkflowServiceClient) error { + + mux.Handle("POST", pattern_CronWorkflowService_CreateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/CreateCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CronWorkflowService_CreateCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_CreateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_CronWorkflowService_UpdateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/UpdateCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CronWorkflowService_UpdateCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_UpdateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CronWorkflowService_GetCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/GetCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CronWorkflowService_GetCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_GetCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CronWorkflowService_ListCronWorkflows_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_ListCronWorkflows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CronWorkflowService_ListCronWorkflows_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_ListCronWorkflows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_CronWorkflowService_DeleteCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/DeleteCronWorkflow") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CronWorkflowService_DeleteCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_CronWorkflowService_DeleteCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_CronWorkflowService_CreateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflow"}, "")) + + pattern_CronWorkflowService_UpdateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "uid"}, "")) + + pattern_CronWorkflowService_GetCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "uid"}, "")) + + pattern_CronWorkflowService_ListCronWorkflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflows"}, "")) + + pattern_CronWorkflowService_ListCronWorkflows_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "workflow_template_name"}, "")) + + pattern_CronWorkflowService_DeleteCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "uid"}, "")) +) + +var ( + forward_CronWorkflowService_CreateCronWorkflow_0 = runtime.ForwardResponseMessage + + forward_CronWorkflowService_UpdateCronWorkflow_0 = runtime.ForwardResponseMessage + + forward_CronWorkflowService_GetCronWorkflow_0 = runtime.ForwardResponseMessage + + forward_CronWorkflowService_ListCronWorkflows_0 = runtime.ForwardResponseMessage + + forward_CronWorkflowService_ListCronWorkflows_1 = runtime.ForwardResponseMessage + + forward_CronWorkflowService_DeleteCronWorkflow_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/cron_workflow_grpc.pb.go b/api/gen/cron_workflow_grpc.pb.go new file mode 100644 index 00000000..856e7d42 --- /dev/null +++ b/api/gen/cron_workflow_grpc.pb.go @@ -0,0 +1,242 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// CronWorkflowServiceClient is the client API for CronWorkflowService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CronWorkflowServiceClient interface { + CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) + UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) + GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) + ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error) + DeleteCronWorkflow(ctx context.Context, in *DeleteCronWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type cronWorkflowServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCronWorkflowServiceClient(cc grpc.ClientConnInterface) CronWorkflowServiceClient { + return &cronWorkflowServiceClient{cc} +} + +func (c *cronWorkflowServiceClient) CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) { + out := new(CronWorkflow) + err := c.cc.Invoke(ctx, "/api.CronWorkflowService/CreateCronWorkflow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cronWorkflowServiceClient) UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) { + out := new(CronWorkflow) + err := c.cc.Invoke(ctx, "/api.CronWorkflowService/UpdateCronWorkflow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cronWorkflowServiceClient) GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) { + out := new(CronWorkflow) + err := c.cc.Invoke(ctx, "/api.CronWorkflowService/GetCronWorkflow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cronWorkflowServiceClient) ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error) { + out := new(ListCronWorkflowsResponse) + err := c.cc.Invoke(ctx, "/api.CronWorkflowService/ListCronWorkflows", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cronWorkflowServiceClient) DeleteCronWorkflow(ctx context.Context, in *DeleteCronWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.CronWorkflowService/DeleteCronWorkflow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CronWorkflowServiceServer is the server API for CronWorkflowService service. +// All implementations must embed UnimplementedCronWorkflowServiceServer +// for forward compatibility +type CronWorkflowServiceServer interface { + CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error) + UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error) + GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error) + ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error) + DeleteCronWorkflow(context.Context, *DeleteCronWorkflowRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedCronWorkflowServiceServer() +} + +// UnimplementedCronWorkflowServiceServer must be embedded to have forward compatible implementations. +type UnimplementedCronWorkflowServiceServer struct { +} + +func (UnimplementedCronWorkflowServiceServer) CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCronWorkflow not implemented") +} +func (UnimplementedCronWorkflowServiceServer) UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCronWorkflow not implemented") +} +func (UnimplementedCronWorkflowServiceServer) GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCronWorkflow not implemented") +} +func (UnimplementedCronWorkflowServiceServer) ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCronWorkflows not implemented") +} +func (UnimplementedCronWorkflowServiceServer) DeleteCronWorkflow(context.Context, *DeleteCronWorkflowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteCronWorkflow not implemented") +} +func (UnimplementedCronWorkflowServiceServer) mustEmbedUnimplementedCronWorkflowServiceServer() {} + +// UnsafeCronWorkflowServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CronWorkflowServiceServer will +// result in compilation errors. +type UnsafeCronWorkflowServiceServer interface { + mustEmbedUnimplementedCronWorkflowServiceServer() +} + +func RegisterCronWorkflowServiceServer(s grpc.ServiceRegistrar, srv CronWorkflowServiceServer) { + s.RegisterService(&_CronWorkflowService_serviceDesc, srv) +} + +func _CronWorkflowService_CreateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCronWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.CronWorkflowService/CreateCronWorkflow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, req.(*CreateCronWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CronWorkflowService_UpdateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCronWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.CronWorkflowService/UpdateCronWorkflow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, req.(*UpdateCronWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CronWorkflowService_GetCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCronWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.CronWorkflowService/GetCronWorkflow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, req.(*GetCronWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CronWorkflowService_ListCronWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCronWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.CronWorkflowService/ListCronWorkflows", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, req.(*ListCronWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CronWorkflowService_DeleteCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteCronWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CronWorkflowServiceServer).DeleteCronWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.CronWorkflowService/DeleteCronWorkflow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CronWorkflowServiceServer).DeleteCronWorkflow(ctx, req.(*DeleteCronWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _CronWorkflowService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.CronWorkflowService", + HandlerType: (*CronWorkflowServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateCronWorkflow", + Handler: _CronWorkflowService_CreateCronWorkflow_Handler, + }, + { + MethodName: "UpdateCronWorkflow", + Handler: _CronWorkflowService_UpdateCronWorkflow_Handler, + }, + { + MethodName: "GetCronWorkflow", + Handler: _CronWorkflowService_GetCronWorkflow_Handler, + }, + { + MethodName: "ListCronWorkflows", + Handler: _CronWorkflowService_ListCronWorkflows_Handler, + }, + { + MethodName: "DeleteCronWorkflow", + Handler: _CronWorkflowService_DeleteCronWorkflow_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cron_workflow.proto", +} diff --git a/api/gen/label.pb.go b/api/gen/label.pb.go new file mode 100644 index 00000000..ee327a27 --- /dev/null +++ b/api/gen/label.pb.go @@ -0,0 +1,793 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: label.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type KeyValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *KeyValue) Reset() { + *x = KeyValue{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyValue) ProtoMessage() {} + +func (x *KeyValue) ProtoReflect() protoreflect.Message { + mi := &file_label_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 KeyValue.ProtoReflect.Descriptor instead. +func (*KeyValue) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{0} +} + +func (x *KeyValue) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *KeyValue) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Labels struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*KeyValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *Labels) Reset() { + *x = Labels{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Labels) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Labels) ProtoMessage() {} + +func (x *Labels) ProtoReflect() protoreflect.Message { + mi := &file_label_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 Labels.ProtoReflect.Descriptor instead. +func (*Labels) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{1} +} + +func (x *Labels) GetItems() []*KeyValue { + if x != nil { + return x.Items + } + return nil +} + +type AddLabelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + Labels *Labels `protobuf:"bytes,4,opt,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *AddLabelsRequest) Reset() { + *x = AddLabelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddLabelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddLabelsRequest) ProtoMessage() {} + +func (x *AddLabelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_label_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 AddLabelsRequest.ProtoReflect.Descriptor instead. +func (*AddLabelsRequest) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{2} +} + +func (x *AddLabelsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *AddLabelsRequest) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *AddLabelsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *AddLabelsRequest) GetLabels() *Labels { + if x != nil { + return x.Labels + } + return nil +} + +type ReplaceLabelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + Labels *Labels `protobuf:"bytes,4,opt,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *ReplaceLabelsRequest) Reset() { + *x = ReplaceLabelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplaceLabelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplaceLabelsRequest) ProtoMessage() {} + +func (x *ReplaceLabelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_label_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 ReplaceLabelsRequest.ProtoReflect.Descriptor instead. +func (*ReplaceLabelsRequest) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{3} +} + +func (x *ReplaceLabelsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ReplaceLabelsRequest) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *ReplaceLabelsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *ReplaceLabelsRequest) GetLabels() *Labels { + if x != nil { + return x.Labels + } + return nil +} + +type GetLabelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *GetLabelsRequest) Reset() { + *x = GetLabelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLabelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLabelsRequest) ProtoMessage() {} + +func (x *GetLabelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_label_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 GetLabelsRequest.ProtoReflect.Descriptor instead. +func (*GetLabelsRequest) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{4} +} + +func (x *GetLabelsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetLabelsRequest) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *GetLabelsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type GetAvailableLabelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + KeyLike string `protobuf:"bytes,3,opt,name=keyLike,proto3" json:"keyLike,omitempty"` + SkipKeys string `protobuf:"bytes,4,opt,name=skipKeys,proto3" json:"skipKeys,omitempty"` +} + +func (x *GetAvailableLabelsRequest) Reset() { + *x = GetAvailableLabelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAvailableLabelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAvailableLabelsRequest) ProtoMessage() {} + +func (x *GetAvailableLabelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_label_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 GetAvailableLabelsRequest.ProtoReflect.Descriptor instead. +func (*GetAvailableLabelsRequest) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{5} +} + +func (x *GetAvailableLabelsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetAvailableLabelsRequest) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *GetAvailableLabelsRequest) GetKeyLike() string { + if x != nil { + return x.KeyLike + } + return "" +} + +func (x *GetAvailableLabelsRequest) GetSkipKeys() string { + if x != nil { + return x.SkipKeys + } + return "" +} + +type GetLabelsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Labels []*KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *GetLabelsResponse) Reset() { + *x = GetLabelsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLabelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLabelsResponse) ProtoMessage() {} + +func (x *GetLabelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_label_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 GetLabelsResponse.ProtoReflect.Descriptor instead. +func (*GetLabelsResponse) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{6} +} + +func (x *GetLabelsResponse) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +type DeleteLabelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *DeleteLabelRequest) Reset() { + *x = DeleteLabelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_label_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteLabelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteLabelRequest) ProtoMessage() {} + +func (x *DeleteLabelRequest) ProtoReflect() protoreflect.Message { + mi := &file_label_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 DeleteLabelRequest.ProtoReflect.Descriptor instead. +func (*DeleteLabelRequest) Descriptor() ([]byte, []int) { + return file_label_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteLabelRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteLabelRequest) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *DeleteLabelRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DeleteLabelRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +var File_label_proto protoreflect.FileDescriptor + +var file_label_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, + 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, 0x22, 0x2d, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x23, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x14, 0x52, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x22, 0x5e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b, + 0x65, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, + 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79, + 0x73, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x72, 0x0a, + 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x32, 0x98, 0x05, 0x0a, 0x0c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x75, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7d, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, + 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x42, 0x24, 0x5a, 0x22, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, + 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_label_proto_rawDescOnce sync.Once + file_label_proto_rawDescData = file_label_proto_rawDesc +) + +func file_label_proto_rawDescGZIP() []byte { + file_label_proto_rawDescOnce.Do(func() { + file_label_proto_rawDescData = protoimpl.X.CompressGZIP(file_label_proto_rawDescData) + }) + return file_label_proto_rawDescData +} + +var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_label_proto_goTypes = []interface{}{ + (*KeyValue)(nil), // 0: api.KeyValue + (*Labels)(nil), // 1: api.Labels + (*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest + (*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest + (*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest + (*GetAvailableLabelsRequest)(nil), // 5: api.GetAvailableLabelsRequest + (*GetLabelsResponse)(nil), // 6: api.GetLabelsResponse + (*DeleteLabelRequest)(nil), // 7: api.DeleteLabelRequest +} +var file_label_proto_depIdxs = []int32{ + 0, // 0: api.Labels.items:type_name -> api.KeyValue + 1, // 1: api.AddLabelsRequest.labels:type_name -> api.Labels + 1, // 2: api.ReplaceLabelsRequest.labels:type_name -> api.Labels + 0, // 3: api.GetLabelsResponse.labels:type_name -> api.KeyValue + 5, // 4: api.LabelService.GetAvailableLabels:input_type -> api.GetAvailableLabelsRequest + 4, // 5: api.LabelService.GetLabels:input_type -> api.GetLabelsRequest + 2, // 6: api.LabelService.AddLabels:input_type -> api.AddLabelsRequest + 3, // 7: api.LabelService.ReplaceLabels:input_type -> api.ReplaceLabelsRequest + 7, // 8: api.LabelService.DeleteLabel:input_type -> api.DeleteLabelRequest + 6, // 9: api.LabelService.GetAvailableLabels:output_type -> api.GetLabelsResponse + 6, // 10: api.LabelService.GetLabels:output_type -> api.GetLabelsResponse + 6, // 11: api.LabelService.AddLabels:output_type -> api.GetLabelsResponse + 6, // 12: api.LabelService.ReplaceLabels:output_type -> api.GetLabelsResponse + 6, // 13: api.LabelService.DeleteLabel:output_type -> api.GetLabelsResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] 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_label_proto_init() } +func file_label_proto_init() { + if File_label_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_label_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Labels); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddLabelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplaceLabelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLabelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAvailableLabelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetLabelsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_label_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteLabelRequest); 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_label_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_label_proto_goTypes, + DependencyIndexes: file_label_proto_depIdxs, + MessageInfos: file_label_proto_msgTypes, + }.Build() + File_label_proto = out.File + file_label_proto_rawDesc = nil + file_label_proto_goTypes = nil + file_label_proto_depIdxs = nil +} diff --git a/api/gen/label.pb.gw.go b/api/gen/label.pb.gw.go new file mode 100644 index 00000000..5f49439d --- /dev/null +++ b/api/gen/label.pb.gw.go @@ -0,0 +1,831 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: label.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_LabelService_GetAvailableLabels_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "resource": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAvailableLabelsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LabelService_GetAvailableLabels_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAvailableLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAvailableLabelsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LabelService_GetAvailableLabels_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAvailableLabels(ctx, &protoReq) + return msg, metadata, err + +} + +func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLabelsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.GetLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetLabelsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.GetLabels(ctx, &protoReq) + return msg, metadata, err + +} + +func request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddLabelsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.AddLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddLabelsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.AddLabels(ctx, &protoReq) + return msg, metadata, err + +} + +func request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReplaceLabelsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ReplaceLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReplaceLabelsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Labels); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ReplaceLabels(ctx, &protoReq) + return msg, metadata, err + +} + +func request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteLabelRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := client.DeleteLabel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteLabelRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["resource"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource") + } + + protoReq.Resource, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := server.DeleteLabel(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterLabelServiceHandlerServer registers the http handlers for service LabelService to "mux". +// UnaryRPC :call LabelServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLabelServiceHandlerFromEndpoint instead. +func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LabelServiceServer) error { + + mux.Handle("GET", pattern_LabelService_GetAvailableLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/GetAvailableLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/GetLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_LabelService_GetLabels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_GetLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_LabelService_AddLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/AddLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_LabelService_AddLabels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_AddLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_LabelService_ReplaceLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/ReplaceLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_LabelService_ReplaceLabels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_ReplaceLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_LabelService_DeleteLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/DeleteLabel") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_LabelService_DeleteLabel_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_DeleteLabel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterLabelServiceHandlerFromEndpoint is same as RegisterLabelServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterLabelServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterLabelServiceHandler(ctx, mux, conn) +} + +// RegisterLabelServiceHandler registers the http handlers for service LabelService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterLabelServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterLabelServiceHandlerClient(ctx, mux, NewLabelServiceClient(conn)) +} + +// RegisterLabelServiceHandlerClient registers the http handlers for service LabelService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LabelServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LabelServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "LabelServiceClient" to call the correct interceptors. +func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LabelServiceClient) error { + + mux.Handle("GET", pattern_LabelService_GetAvailableLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/GetAvailableLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/GetLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_LabelService_GetLabels_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_GetLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_LabelService_AddLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/AddLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_LabelService_AddLabels_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_AddLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_LabelService_ReplaceLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/ReplaceLabels") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_LabelService_ReplaceLabels_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_ReplaceLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_LabelService_DeleteLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/DeleteLabel") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_LabelService_DeleteLabel_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_LabelService_DeleteLabel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_LabelService_GetAvailableLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 2}, []string{"apis", "v1beta1", "labels", "namespace", "resource"}, "")) + + pattern_LabelService_GetLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "")) + + pattern_LabelService_AddLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "")) + + pattern_LabelService_ReplaceLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "")) + + pattern_LabelService_DeleteLabel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels", "key"}, "")) +) + +var ( + forward_LabelService_GetAvailableLabels_0 = runtime.ForwardResponseMessage + + forward_LabelService_GetLabels_0 = runtime.ForwardResponseMessage + + forward_LabelService_AddLabels_0 = runtime.ForwardResponseMessage + + forward_LabelService_ReplaceLabels_0 = runtime.ForwardResponseMessage + + forward_LabelService_DeleteLabel_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/label_grpc.pb.go b/api/gen/label_grpc.pb.go new file mode 100644 index 00000000..f8e9466b --- /dev/null +++ b/api/gen/label_grpc.pb.go @@ -0,0 +1,241 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// LabelServiceClient is the client API for LabelService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LabelServiceClient interface { + GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) + GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) + AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) + ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) + DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) +} + +type labelServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewLabelServiceClient(cc grpc.ClientConnInterface) LabelServiceClient { + return &labelServiceClient{cc} +} + +func (c *labelServiceClient) GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { + out := new(GetLabelsResponse) + err := c.cc.Invoke(ctx, "/api.LabelService/GetAvailableLabels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *labelServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { + out := new(GetLabelsResponse) + err := c.cc.Invoke(ctx, "/api.LabelService/GetLabels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *labelServiceClient) AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { + out := new(GetLabelsResponse) + err := c.cc.Invoke(ctx, "/api.LabelService/AddLabels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *labelServiceClient) ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { + out := new(GetLabelsResponse) + err := c.cc.Invoke(ctx, "/api.LabelService/ReplaceLabels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *labelServiceClient) DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) { + out := new(GetLabelsResponse) + err := c.cc.Invoke(ctx, "/api.LabelService/DeleteLabel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LabelServiceServer is the server API for LabelService service. +// All implementations must embed UnimplementedLabelServiceServer +// for forward compatibility +type LabelServiceServer interface { + GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error) + GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) + AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error) + ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error) + DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error) + mustEmbedUnimplementedLabelServiceServer() +} + +// UnimplementedLabelServiceServer must be embedded to have forward compatible implementations. +type UnimplementedLabelServiceServer struct { +} + +func (UnimplementedLabelServiceServer) GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAvailableLabels not implemented") +} +func (UnimplementedLabelServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented") +} +func (UnimplementedLabelServiceServer) AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddLabels not implemented") +} +func (UnimplementedLabelServiceServer) ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReplaceLabels not implemented") +} +func (UnimplementedLabelServiceServer) DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteLabel not implemented") +} +func (UnimplementedLabelServiceServer) mustEmbedUnimplementedLabelServiceServer() {} + +// UnsafeLabelServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LabelServiceServer will +// result in compilation errors. +type UnsafeLabelServiceServer interface { + mustEmbedUnimplementedLabelServiceServer() +} + +func RegisterLabelServiceServer(s grpc.ServiceRegistrar, srv LabelServiceServer) { + s.RegisterService(&_LabelService_serviceDesc, srv) +} + +func _LabelService_GetAvailableLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAvailableLabelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LabelServiceServer).GetAvailableLabels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.LabelService/GetAvailableLabels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LabelServiceServer).GetAvailableLabels(ctx, req.(*GetAvailableLabelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LabelService_GetLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLabelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LabelServiceServer).GetLabels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.LabelService/GetLabels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LabelServiceServer).GetLabels(ctx, req.(*GetLabelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LabelService_AddLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddLabelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LabelServiceServer).AddLabels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.LabelService/AddLabels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LabelServiceServer).AddLabels(ctx, req.(*AddLabelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LabelService_ReplaceLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReplaceLabelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LabelServiceServer).ReplaceLabels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.LabelService/ReplaceLabels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LabelServiceServer).ReplaceLabels(ctx, req.(*ReplaceLabelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _LabelService_DeleteLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteLabelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LabelServiceServer).DeleteLabel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.LabelService/DeleteLabel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LabelServiceServer).DeleteLabel(ctx, req.(*DeleteLabelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _LabelService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.LabelService", + HandlerType: (*LabelServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAvailableLabels", + Handler: _LabelService_GetAvailableLabels_Handler, + }, + { + MethodName: "GetLabels", + Handler: _LabelService_GetLabels_Handler, + }, + { + MethodName: "AddLabels", + Handler: _LabelService_AddLabels_Handler, + }, + { + MethodName: "ReplaceLabels", + Handler: _LabelService_ReplaceLabels_Handler, + }, + { + MethodName: "DeleteLabel", + Handler: _LabelService_DeleteLabel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "label.proto", +} diff --git a/api/gen/metric.pb.go b/api/gen/metric.pb.go new file mode 100644 index 00000000..c78ea064 --- /dev/null +++ b/api/gen/metric.pb.go @@ -0,0 +1,166 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: metric.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Metric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` + Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` +} + +func (x *Metric) Reset() { + *x = Metric{} + if protoimpl.UnsafeEnabled { + mi := &file_metric_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Metric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metric) ProtoMessage() {} + +func (x *Metric) ProtoReflect() protoreflect.Message { + mi := &file_metric_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 Metric.ProtoReflect.Descriptor instead. +func (*Metric) Descriptor() ([]byte, []int) { + return file_metric_proto_rawDescGZIP(), []int{0} +} + +func (x *Metric) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Metric) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *Metric) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +var File_metric_proto protoreflect.FileDescriptor + +var file_metric_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, + 0x61, 0x70, 0x69, 0x22, 0x4a, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 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, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, + 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, + 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_metric_proto_rawDescOnce sync.Once + file_metric_proto_rawDescData = file_metric_proto_rawDesc +) + +func file_metric_proto_rawDescGZIP() []byte { + file_metric_proto_rawDescOnce.Do(func() { + file_metric_proto_rawDescData = protoimpl.X.CompressGZIP(file_metric_proto_rawDescData) + }) + return file_metric_proto_rawDescData +} + +var file_metric_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_metric_proto_goTypes = []interface{}{ + (*Metric)(nil), // 0: api.Metric +} +var file_metric_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_metric_proto_init() } +func file_metric_proto_init() { + if File_metric_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_metric_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metric); 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_metric_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_metric_proto_goTypes, + DependencyIndexes: file_metric_proto_depIdxs, + MessageInfos: file_metric_proto_msgTypes, + }.Build() + File_metric_proto = out.File + file_metric_proto_rawDesc = nil + file_metric_proto_goTypes = nil + file_metric_proto_depIdxs = nil +} diff --git a/api/gen/namespace.pb.go b/api/gen/namespace.pb.go new file mode 100644 index 00000000..0ad6e6f4 --- /dev/null +++ b/api/gen/namespace.pb.go @@ -0,0 +1,421 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: namespace.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ListNamespacesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *ListNamespacesRequest) Reset() { + *x = ListNamespacesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNamespacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesRequest) ProtoMessage() {} + +func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespace_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 ListNamespacesRequest.ProtoReflect.Descriptor instead. +func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { + return file_namespace_proto_rawDescGZIP(), []int{0} +} + +func (x *ListNamespacesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListNamespacesRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListNamespacesRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type ListNamespacesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Namespaces []*Namespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` +} + +func (x *ListNamespacesResponse) Reset() { + *x = ListNamespacesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_namespace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNamespacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesResponse) ProtoMessage() {} + +func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_namespace_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 ListNamespacesResponse.ProtoReflect.Descriptor instead. +func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { + return file_namespace_proto_rawDescGZIP(), []int{1} +} + +func (x *ListNamespacesResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { + if x != nil { + return x.Namespaces + } + return nil +} + +func (x *ListNamespacesResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListNamespacesResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListNamespacesResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type CreateNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *CreateNamespaceRequest) Reset() { + *x = CreateNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceRequest) ProtoMessage() {} + +func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespace_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 CreateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_namespace_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateNamespaceRequest) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type Namespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Namespace) Reset() { + *x = Namespace{} + if protoimpl.UnsafeEnabled { + mi := &file_namespace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_namespace_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 Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_namespace_proto_rawDescGZIP(), []int{3} +} + +func (x *Namespace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_namespace_proto protoreflect.FileDescriptor + +var file_namespace_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x46, + 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0e, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, + 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x25, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_namespace_proto_rawDescOnce sync.Once + file_namespace_proto_rawDescData = file_namespace_proto_rawDesc +) + +func file_namespace_proto_rawDescGZIP() []byte { + file_namespace_proto_rawDescOnce.Do(func() { + file_namespace_proto_rawDescData = protoimpl.X.CompressGZIP(file_namespace_proto_rawDescData) + }) + return file_namespace_proto_rawDescData +} + +var file_namespace_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_namespace_proto_goTypes = []interface{}{ + (*ListNamespacesRequest)(nil), // 0: api.ListNamespacesRequest + (*ListNamespacesResponse)(nil), // 1: api.ListNamespacesResponse + (*CreateNamespaceRequest)(nil), // 2: api.CreateNamespaceRequest + (*Namespace)(nil), // 3: api.Namespace +} +var file_namespace_proto_depIdxs = []int32{ + 3, // 0: api.ListNamespacesResponse.namespaces:type_name -> api.Namespace + 3, // 1: api.CreateNamespaceRequest.namespace:type_name -> api.Namespace + 0, // 2: api.NamespaceService.ListNamespaces:input_type -> api.ListNamespacesRequest + 2, // 3: api.NamespaceService.CreateNamespace:input_type -> api.CreateNamespaceRequest + 1, // 4: api.NamespaceService.ListNamespaces:output_type -> api.ListNamespacesResponse + 3, // 5: api.NamespaceService.CreateNamespace:output_type -> api.Namespace + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] 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_namespace_proto_init() } +func file_namespace_proto_init() { + if File_namespace_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_namespace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNamespacesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNamespacesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Namespace); 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_namespace_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_namespace_proto_goTypes, + DependencyIndexes: file_namespace_proto_depIdxs, + MessageInfos: file_namespace_proto_msgTypes, + }.Build() + File_namespace_proto = out.File + file_namespace_proto_rawDesc = nil + file_namespace_proto_goTypes = nil + file_namespace_proto_depIdxs = nil +} diff --git a/api/gen/namespace.pb.gw.go b/api/gen/namespace.pb.gw.go new file mode 100644 index 00000000..9c60b82c --- /dev/null +++ b/api/gen/namespace.pb.gw.go @@ -0,0 +1,250 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: namespace.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_NamespaceService_ListNamespaces_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_NamespaceService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_ListNamespaces_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_ListNamespaces_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListNamespaces(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NamespaceService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateNamespaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Namespace); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateNamespaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Namespace); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterNamespaceServiceHandlerServer registers the http handlers for service NamespaceService to "mux". +// UnaryRPC :call NamespaceServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNamespaceServiceHandlerFromEndpoint instead. +func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error { + + mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.NamespaceService/ListNamespaces") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_ListNamespaces_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.NamespaceService/CreateNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_CreateNamespace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterNamespaceServiceHandlerFromEndpoint is same as RegisterNamespaceServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterNamespaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterNamespaceServiceHandler(ctx, mux, conn) +} + +// RegisterNamespaceServiceHandler registers the http handlers for service NamespaceService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNamespaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterNamespaceServiceHandlerClient(ctx, mux, NewNamespaceServiceClient(conn)) +} + +// RegisterNamespaceServiceHandlerClient registers the http handlers for service NamespaceService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespaceServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespaceServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "NamespaceServiceClient" to call the correct interceptors. +func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceServiceClient) error { + + mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.NamespaceService/ListNamespaces") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_ListNamespaces_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.NamespaceService/CreateNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_CreateNamespace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_NamespaceService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, "")) + + pattern_NamespaceService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, "")) +) + +var ( + forward_NamespaceService_ListNamespaces_0 = runtime.ForwardResponseMessage + + forward_NamespaceService_CreateNamespace_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/namespace_grpc.pb.go b/api/gen/namespace_grpc.pb.go new file mode 100644 index 00000000..b055e155 --- /dev/null +++ b/api/gen/namespace_grpc.pb.go @@ -0,0 +1,133 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// NamespaceServiceClient is the client API for NamespaceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NamespaceServiceClient interface { + ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) + CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) +} + +type namespaceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient { + return &namespaceServiceClient{cc} +} + +func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { + out := new(ListNamespacesResponse) + err := c.cc.Invoke(ctx, "/api.NamespaceService/ListNamespaces", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) { + out := new(Namespace) + err := c.cc.Invoke(ctx, "/api.NamespaceService/CreateNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NamespaceServiceServer is the server API for NamespaceService service. +// All implementations must embed UnimplementedNamespaceServiceServer +// for forward compatibility +type NamespaceServiceServer interface { + ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) + CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) + mustEmbedUnimplementedNamespaceServiceServer() +} + +// UnimplementedNamespaceServiceServer must be embedded to have forward compatible implementations. +type UnimplementedNamespaceServiceServer struct { +} + +func (UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") +} +func (UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) mustEmbedUnimplementedNamespaceServiceServer() {} + +// UnsafeNamespaceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NamespaceServiceServer will +// result in compilation errors. +type UnsafeNamespaceServiceServer interface { + mustEmbedUnimplementedNamespaceServiceServer() +} + +func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer) { + s.RegisterService(&_NamespaceService_serviceDesc, srv) +} + +func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).ListNamespaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.NamespaceService/ListNamespaces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).CreateNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.NamespaceService/CreateNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _NamespaceService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.NamespaceService", + HandlerType: (*NamespaceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListNamespaces", + Handler: _NamespaceService_ListNamespaces_Handler, + }, + { + MethodName: "CreateNamespace", + Handler: _NamespaceService_CreateNamespace_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "namespace.proto", +} diff --git a/api/gen/secret.pb.go b/api/gen/secret.pb.go new file mode 100644 index 00000000..148b36ec --- /dev/null +++ b/api/gen/secret.pb.go @@ -0,0 +1,1231 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: secret.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type AddSecretKeyValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Secret *Secret `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *AddSecretKeyValueRequest) Reset() { + *x = AddSecretKeyValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSecretKeyValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSecretKeyValueRequest) ProtoMessage() {} + +func (x *AddSecretKeyValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 AddSecretKeyValueRequest.ProtoReflect.Descriptor instead. +func (*AddSecretKeyValueRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{0} +} + +func (x *AddSecretKeyValueRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *AddSecretKeyValueRequest) GetSecret() *Secret { + if x != nil { + return x.Secret + } + return nil +} + +type AddSecretKeyValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Inserted bool `protobuf:"varint,1,opt,name=inserted,proto3" json:"inserted,omitempty"` +} + +func (x *AddSecretKeyValueResponse) Reset() { + *x = AddSecretKeyValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSecretKeyValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSecretKeyValueResponse) ProtoMessage() {} + +func (x *AddSecretKeyValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 AddSecretKeyValueResponse.ProtoReflect.Descriptor instead. +func (*AddSecretKeyValueResponse) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{1} +} + +func (x *AddSecretKeyValueResponse) GetInserted() bool { + if x != nil { + return x.Inserted + } + return false +} + +type SecretExistsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *SecretExistsRequest) Reset() { + *x = SecretExistsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretExistsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretExistsRequest) ProtoMessage() {} + +func (x *SecretExistsRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 SecretExistsRequest.ProtoReflect.Descriptor instead. +func (*SecretExistsRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{2} +} + +func (x *SecretExistsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *SecretExistsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type SecretExistsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *SecretExistsResponse) Reset() { + *x = SecretExistsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretExistsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretExistsResponse) ProtoMessage() {} + +func (x *SecretExistsResponse) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 SecretExistsResponse.ProtoReflect.Descriptor instead. +func (*SecretExistsResponse) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{3} +} + +func (x *SecretExistsResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type UpdateSecretKeyValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Secret *Secret `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *UpdateSecretKeyValueRequest) Reset() { + *x = UpdateSecretKeyValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecretKeyValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecretKeyValueRequest) ProtoMessage() {} + +func (x *UpdateSecretKeyValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 UpdateSecretKeyValueRequest.ProtoReflect.Descriptor instead. +func (*UpdateSecretKeyValueRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateSecretKeyValueRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateSecretKeyValueRequest) GetSecret() *Secret { + if x != nil { + return x.Secret + } + return nil +} + +type UpdateSecretKeyValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Updated bool `protobuf:"varint,1,opt,name=updated,proto3" json:"updated,omitempty"` +} + +func (x *UpdateSecretKeyValueResponse) Reset() { + *x = UpdateSecretKeyValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecretKeyValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecretKeyValueResponse) ProtoMessage() {} + +func (x *UpdateSecretKeyValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 UpdateSecretKeyValueResponse.ProtoReflect.Descriptor instead. +func (*UpdateSecretKeyValueResponse) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateSecretKeyValueResponse) GetUpdated() bool { + if x != nil { + return x.Updated + } + return false +} + +type DeleteSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteSecretRequest) Reset() { + *x = DeleteSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretRequest) ProtoMessage() {} + +func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 DeleteSecretRequest.ProtoReflect.Descriptor instead. +func (*DeleteSecretRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteSecretRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteSecretRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type DeleteSecretKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + SecretName string `protobuf:"bytes,2,opt,name=secretName,proto3" json:"secretName,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *DeleteSecretKeyRequest) Reset() { + *x = DeleteSecretKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretKeyRequest) ProtoMessage() {} + +func (x *DeleteSecretKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 DeleteSecretKeyRequest.ProtoReflect.Descriptor instead. +func (*DeleteSecretKeyRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteSecretKeyRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteSecretKeyRequest) GetSecretName() string { + if x != nil { + return x.SecretName + } + return "" +} + +func (x *DeleteSecretKeyRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type DeleteSecretKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"` +} + +func (x *DeleteSecretKeyResponse) Reset() { + *x = DeleteSecretKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretKeyResponse) ProtoMessage() {} + +func (x *DeleteSecretKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 DeleteSecretKeyResponse.ProtoReflect.Descriptor instead. +func (*DeleteSecretKeyResponse) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteSecretKeyResponse) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +type DeleteSecretResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Deleted bool `protobuf:"varint,1,opt,name=deleted,proto3" json:"deleted,omitempty"` +} + +func (x *DeleteSecretResponse) Reset() { + *x = DeleteSecretResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretResponse) ProtoMessage() {} + +func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 DeleteSecretResponse.ProtoReflect.Descriptor instead. +func (*DeleteSecretResponse) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteSecretResponse) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +type ListSecretsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *ListSecretsRequest) Reset() { + *x = ListSecretsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecretsRequest) ProtoMessage() {} + +func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 ListSecretsRequest.ProtoReflect.Descriptor instead. +func (*ListSecretsRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{10} +} + +func (x *ListSecretsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +type ListSecretsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Secrets []*Secret `protobuf:"bytes,2,rep,name=secrets,proto3" json:"secrets,omitempty"` +} + +func (x *ListSecretsResponse) Reset() { + *x = ListSecretsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecretsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecretsResponse) ProtoMessage() {} + +func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 ListSecretsResponse.ProtoReflect.Descriptor instead. +func (*ListSecretsResponse) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{11} +} + +func (x *ListSecretsResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListSecretsResponse) GetSecrets() []*Secret { + if x != nil { + return x.Secrets + } + return nil +} + +type CreateSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Secret *Secret `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *CreateSecretRequest) Reset() { + *x = CreateSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSecretRequest) ProtoMessage() {} + +func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 CreateSecretRequest.ProtoReflect.Descriptor instead. +func (*CreateSecretRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateSecretRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateSecretRequest) GetSecret() *Secret { + if x != nil { + return x.Secret + } + return nil +} + +type GetSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetSecretRequest) Reset() { + *x = GetSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecretRequest) ProtoMessage() {} + +func (x *GetSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_secret_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 GetSecretRequest.ProtoReflect.Descriptor instead. +func (*GetSecretRequest) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{13} +} + +func (x *GetSecretRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetSecretRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type Secret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Data map[string]string `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Secret) Reset() { + *x = Secret{} + if protoimpl.UnsafeEnabled { + mi := &file_secret_proto_msgTypes[14] + 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_secret_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 Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { + return file_secret_proto_rawDescGZIP(), []int{14} +} + +func (x *Secret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Secret) GetData() map[string]string { + if x != nil { + return x.Data + } + return nil +} + +var File_secret_proto protoreflect.FileDescriptor + +var file_secret_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, + 0x61, 0x70, 0x69, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, + 0x0a, 0x18, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x37, 0x0a, + 0x19, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, + 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x6e, + 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x2e, 0x0a, 0x14, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, + 0x60, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x22, 0x38, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x68, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x33, + 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x22, 0x30, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0x58, 0x0a, + 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x44, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x80, 0x01, + 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, + 0x32, 0x90, 0x08, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x21, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x3a, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x7c, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x45, 0x78, + 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6b, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x75, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2a, 0x2a, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8f, 0x01, 0x0a, + 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, + 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3b, 0x2a, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x93, + 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x22, 0x2f, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x06, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x9c, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x32, 0x2f, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x06, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_secret_proto_rawDescOnce sync.Once + file_secret_proto_rawDescData = file_secret_proto_rawDesc +) + +func file_secret_proto_rawDescGZIP() []byte { + file_secret_proto_rawDescOnce.Do(func() { + file_secret_proto_rawDescData = protoimpl.X.CompressGZIP(file_secret_proto_rawDescData) + }) + return file_secret_proto_rawDescData +} + +var file_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_secret_proto_goTypes = []interface{}{ + (*AddSecretKeyValueRequest)(nil), // 0: api.AddSecretKeyValueRequest + (*AddSecretKeyValueResponse)(nil), // 1: api.AddSecretKeyValueResponse + (*SecretExistsRequest)(nil), // 2: api.SecretExistsRequest + (*SecretExistsResponse)(nil), // 3: api.SecretExistsResponse + (*UpdateSecretKeyValueRequest)(nil), // 4: api.UpdateSecretKeyValueRequest + (*UpdateSecretKeyValueResponse)(nil), // 5: api.UpdateSecretKeyValueResponse + (*DeleteSecretRequest)(nil), // 6: api.DeleteSecretRequest + (*DeleteSecretKeyRequest)(nil), // 7: api.DeleteSecretKeyRequest + (*DeleteSecretKeyResponse)(nil), // 8: api.DeleteSecretKeyResponse + (*DeleteSecretResponse)(nil), // 9: api.DeleteSecretResponse + (*ListSecretsRequest)(nil), // 10: api.ListSecretsRequest + (*ListSecretsResponse)(nil), // 11: api.ListSecretsResponse + (*CreateSecretRequest)(nil), // 12: api.CreateSecretRequest + (*GetSecretRequest)(nil), // 13: api.GetSecretRequest + (*Secret)(nil), // 14: api.Secret + nil, // 15: api.Secret.DataEntry + (*emptypb.Empty)(nil), // 16: google.protobuf.Empty +} +var file_secret_proto_depIdxs = []int32{ + 14, // 0: api.AddSecretKeyValueRequest.secret:type_name -> api.Secret + 14, // 1: api.UpdateSecretKeyValueRequest.secret:type_name -> api.Secret + 14, // 2: api.ListSecretsResponse.secrets:type_name -> api.Secret + 14, // 3: api.CreateSecretRequest.secret:type_name -> api.Secret + 15, // 4: api.Secret.data:type_name -> api.Secret.DataEntry + 12, // 5: api.SecretService.CreateSecret:input_type -> api.CreateSecretRequest + 2, // 6: api.SecretService.SecretExists:input_type -> api.SecretExistsRequest + 13, // 7: api.SecretService.GetSecret:input_type -> api.GetSecretRequest + 10, // 8: api.SecretService.ListSecrets:input_type -> api.ListSecretsRequest + 6, // 9: api.SecretService.DeleteSecret:input_type -> api.DeleteSecretRequest + 7, // 10: api.SecretService.DeleteSecretKey:input_type -> api.DeleteSecretKeyRequest + 0, // 11: api.SecretService.AddSecretKeyValue:input_type -> api.AddSecretKeyValueRequest + 4, // 12: api.SecretService.UpdateSecretKeyValue:input_type -> api.UpdateSecretKeyValueRequest + 16, // 13: api.SecretService.CreateSecret:output_type -> google.protobuf.Empty + 3, // 14: api.SecretService.SecretExists:output_type -> api.SecretExistsResponse + 14, // 15: api.SecretService.GetSecret:output_type -> api.Secret + 11, // 16: api.SecretService.ListSecrets:output_type -> api.ListSecretsResponse + 9, // 17: api.SecretService.DeleteSecret:output_type -> api.DeleteSecretResponse + 8, // 18: api.SecretService.DeleteSecretKey:output_type -> api.DeleteSecretKeyResponse + 1, // 19: api.SecretService.AddSecretKeyValue:output_type -> api.AddSecretKeyValueResponse + 5, // 20: api.SecretService.UpdateSecretKeyValue:output_type -> api.UpdateSecretKeyValueResponse + 13, // [13:21] is the sub-list for method output_type + 5, // [5:13] 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_secret_proto_init() } +func file_secret_proto_init() { + if File_secret_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_secret_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSecretKeyValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSecretKeyValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretExistsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretExistsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSecretKeyValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSecretKeyValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSecretsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSecretsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_secret_proto_msgTypes[14].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 + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_secret_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_secret_proto_goTypes, + DependencyIndexes: file_secret_proto_depIdxs, + MessageInfos: file_secret_proto_msgTypes, + }.Build() + File_secret_proto = out.File + file_secret_proto_rawDesc = nil + file_secret_proto_goTypes = nil + file_secret_proto_depIdxs = nil +} diff --git a/api/gen/secret.pb.gw.go b/api/gen/secret.pb.gw.go new file mode 100644 index 00000000..9274d5dd --- /dev/null +++ b/api/gen/secret.pb.gw.go @@ -0,0 +1,1066 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: secret.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_SecretService_CreateSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateSecretRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.CreateSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_CreateSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateSecretRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateSecret(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_SecretExists_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SecretExistsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.SecretExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_SecretExists_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SecretExistsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.SecretExists(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSecretRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSecretRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetSecret(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_ListSecrets_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListSecretsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.ListSecrets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_ListSecrets_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListSecretsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.ListSecrets(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_DeleteSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteSecretRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.DeleteSecret(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_DeleteSecret_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteSecretRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.DeleteSecret(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteSecretKeyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["secretName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secretName") + } + + protoReq.SecretName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secretName", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := client.DeleteSecretKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteSecretKeyRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["secretName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secretName") + } + + protoReq.SecretName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secretName", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := server.DeleteSecretKey(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_AddSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddSecretKeyValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["secret.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) + } + + msg, err := client.AddSecretKeyValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_AddSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddSecretKeyValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["secret.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) + } + + msg, err := server.AddSecretKeyValue(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateSecretKeyValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["secret.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) + } + + msg, err := client.UpdateSecretKeyValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, marshaler runtime.Marshaler, server SecretServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateSecretKeyValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Secret); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["secret.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "secret.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err) + } + + msg, err := server.UpdateSecretKeyValue(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterSecretServiceHandlerServer registers the http handlers for service SecretService to "mux". +// UnaryRPC :call SecretServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSecretServiceHandlerFromEndpoint instead. +func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecretServiceServer) error { + + mux.Handle("POST", pattern_SecretService_CreateSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/CreateSecret") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_CreateSecret_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_CreateSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecretService_SecretExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/SecretExists") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_SecretExists_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_SecretExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/GetSecret") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_GetSecret_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_GetSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecretService_ListSecrets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/ListSecrets") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_ListSecrets_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_ListSecrets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_SecretService_DeleteSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/DeleteSecret") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_DeleteSecret_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_DeleteSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_SecretService_DeleteSecretKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/DeleteSecretKey") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_DeleteSecretKey_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_DeleteSecretKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SecretService_AddSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/AddSecretKeyValue") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_AddSecretKeyValue_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_AddSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_SecretService_UpdateSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/UpdateSecretKeyValue") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SecretService_UpdateSecretKeyValue_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_UpdateSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterSecretServiceHandlerFromEndpoint is same as RegisterSecretServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterSecretServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterSecretServiceHandler(ctx, mux, conn) +} + +// RegisterSecretServiceHandler registers the http handlers for service SecretService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterSecretServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSecretServiceHandlerClient(ctx, mux, NewSecretServiceClient(conn)) +} + +// RegisterSecretServiceHandlerClient registers the http handlers for service SecretService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecretServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecretServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "SecretServiceClient" to call the correct interceptors. +func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecretServiceClient) error { + + mux.Handle("POST", pattern_SecretService_CreateSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/CreateSecret") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_CreateSecret_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_CreateSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecretService_SecretExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/SecretExists") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_SecretExists_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_SecretExists_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/GetSecret") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_GetSecret_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_GetSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SecretService_ListSecrets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/ListSecrets") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_ListSecrets_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_ListSecrets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_SecretService_DeleteSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/DeleteSecret") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_DeleteSecret_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_DeleteSecret_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_SecretService_DeleteSecretKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/DeleteSecretKey") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_DeleteSecretKey_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_DeleteSecretKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SecretService_AddSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/AddSecretKeyValue") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_AddSecretKeyValue_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_AddSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_SecretService_UpdateSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/UpdateSecretKeyValue") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SecretService_UpdateSecretKeyValue_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_SecretService_UpdateSecretKeyValue_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_SecretService_CreateSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "")) + + pattern_SecretService_SecretExists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "secrets", "name", "exists"}, "")) + + pattern_SecretService_GetSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "")) + + pattern_SecretService_ListSecrets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "")) + + pattern_SecretService_DeleteSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "")) + + pattern_SecretService_DeleteSecretKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "secrets", "secretName", "keys", "key"}, "")) + + pattern_SecretService_AddSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, "")) + + pattern_SecretService_UpdateSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, "")) +) + +var ( + forward_SecretService_CreateSecret_0 = runtime.ForwardResponseMessage + + forward_SecretService_SecretExists_0 = runtime.ForwardResponseMessage + + forward_SecretService_GetSecret_0 = runtime.ForwardResponseMessage + + forward_SecretService_ListSecrets_0 = runtime.ForwardResponseMessage + + forward_SecretService_DeleteSecret_0 = runtime.ForwardResponseMessage + + forward_SecretService_DeleteSecretKey_0 = runtime.ForwardResponseMessage + + forward_SecretService_AddSecretKeyValue_0 = runtime.ForwardResponseMessage + + forward_SecretService_UpdateSecretKeyValue_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/secret_grpc.pb.go b/api/gen/secret_grpc.pb.go new file mode 100644 index 00000000..b2e1b19a --- /dev/null +++ b/api/gen/secret_grpc.pb.go @@ -0,0 +1,350 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// SecretServiceClient is the client API for SecretService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SecretServiceClient interface { + CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error) + GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) + ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) + DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) + DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error) + AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error) + UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error) +} + +type secretServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSecretServiceClient(cc grpc.ClientConnInterface) SecretServiceClient { + return &secretServiceClient{cc} +} + +func (c *secretServiceClient) CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.SecretService/CreateSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error) { + out := new(SecretExistsResponse) + err := c.cc.Invoke(ctx, "/api.SecretService/SecretExists", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) { + out := new(Secret) + err := c.cc.Invoke(ctx, "/api.SecretService/GetSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) { + out := new(ListSecretsResponse) + err := c.cc.Invoke(ctx, "/api.SecretService/ListSecrets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) { + out := new(DeleteSecretResponse) + err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecret", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error) { + out := new(DeleteSecretKeyResponse) + err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecretKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error) { + out := new(AddSecretKeyValueResponse) + err := c.cc.Invoke(ctx, "/api.SecretService/AddSecretKeyValue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *secretServiceClient) UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error) { + out := new(UpdateSecretKeyValueResponse) + err := c.cc.Invoke(ctx, "/api.SecretService/UpdateSecretKeyValue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SecretServiceServer is the server API for SecretService service. +// All implementations must embed UnimplementedSecretServiceServer +// for forward compatibility +type SecretServiceServer interface { + CreateSecret(context.Context, *CreateSecretRequest) (*emptypb.Empty, error) + SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error) + GetSecret(context.Context, *GetSecretRequest) (*Secret, error) + ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) + DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) + DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error) + AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error) + UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error) + mustEmbedUnimplementedSecretServiceServer() +} + +// UnimplementedSecretServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSecretServiceServer struct { +} + +func (UnimplementedSecretServiceServer) CreateSecret(context.Context, *CreateSecretRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSecret not implemented") +} +func (UnimplementedSecretServiceServer) SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SecretExists not implemented") +} +func (UnimplementedSecretServiceServer) GetSecret(context.Context, *GetSecretRequest) (*Secret, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSecret not implemented") +} +func (UnimplementedSecretServiceServer) ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSecrets not implemented") +} +func (UnimplementedSecretServiceServer) DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSecret not implemented") +} +func (UnimplementedSecretServiceServer) DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSecretKey not implemented") +} +func (UnimplementedSecretServiceServer) AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddSecretKeyValue not implemented") +} +func (UnimplementedSecretServiceServer) UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSecretKeyValue not implemented") +} +func (UnimplementedSecretServiceServer) mustEmbedUnimplementedSecretServiceServer() {} + +// UnsafeSecretServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SecretServiceServer will +// result in compilation errors. +type UnsafeSecretServiceServer interface { + mustEmbedUnimplementedSecretServiceServer() +} + +func RegisterSecretServiceServer(s grpc.ServiceRegistrar, srv SecretServiceServer) { + s.RegisterService(&_SecretService_serviceDesc, srv) +} + +func _SecretService_CreateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).CreateSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/CreateSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).CreateSecret(ctx, req.(*CreateSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_SecretExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SecretExistsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).SecretExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/SecretExists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).SecretExists(ctx, req.(*SecretExistsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).GetSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/GetSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).GetSecret(ctx, req.(*GetSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSecretsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).ListSecrets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/ListSecrets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).ListSecrets(ctx, req.(*ListSecretsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_DeleteSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).DeleteSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/DeleteSecret", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).DeleteSecret(ctx, req.(*DeleteSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_DeleteSecretKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSecretKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).DeleteSecretKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/DeleteSecretKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).DeleteSecretKey(ctx, req.(*DeleteSecretKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_AddSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddSecretKeyValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).AddSecretKeyValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/AddSecretKeyValue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).AddSecretKeyValue(ctx, req.(*AddSecretKeyValueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SecretService_UpdateSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSecretKeyValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.SecretService/UpdateSecretKeyValue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, req.(*UpdateSecretKeyValueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _SecretService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.SecretService", + HandlerType: (*SecretServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateSecret", + Handler: _SecretService_CreateSecret_Handler, + }, + { + MethodName: "SecretExists", + Handler: _SecretService_SecretExists_Handler, + }, + { + MethodName: "GetSecret", + Handler: _SecretService_GetSecret_Handler, + }, + { + MethodName: "ListSecrets", + Handler: _SecretService_ListSecrets_Handler, + }, + { + MethodName: "DeleteSecret", + Handler: _SecretService_DeleteSecret_Handler, + }, + { + MethodName: "DeleteSecretKey", + Handler: _SecretService_DeleteSecretKey_Handler, + }, + { + MethodName: "AddSecretKeyValue", + Handler: _SecretService_AddSecretKeyValue_Handler, + }, + { + MethodName: "UpdateSecretKeyValue", + Handler: _SecretService_UpdateSecretKeyValue_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "secret.proto", +} diff --git a/api/gen/services.pb.go b/api/gen/services.pb.go new file mode 100644 index 00000000..6f365477 --- /dev/null +++ b/api/gen/services.pb.go @@ -0,0 +1,436 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: services.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Service struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Service) Reset() { + *x = Service{} + if protoimpl.UnsafeEnabled { + mi := &file_services_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Service) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Service) ProtoMessage() {} + +func (x *Service) ProtoReflect() protoreflect.Message { + mi := &file_services_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 Service.ProtoReflect.Descriptor instead. +func (*Service) Descriptor() ([]byte, []int) { + return file_services_proto_rawDescGZIP(), []int{0} +} + +func (x *Service) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Service) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type GetServiceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetServiceRequest) Reset() { + *x = GetServiceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_services_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetServiceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetServiceRequest) ProtoMessage() {} + +func (x *GetServiceRequest) ProtoReflect() protoreflect.Message { + mi := &file_services_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 GetServiceRequest.ProtoReflect.Descriptor instead. +func (*GetServiceRequest) Descriptor() ([]byte, []int) { + return file_services_proto_rawDescGZIP(), []int{1} +} + +func (x *GetServiceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetServiceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type ListServicesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *ListServicesRequest) Reset() { + *x = ListServicesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_services_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListServicesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListServicesRequest) ProtoMessage() {} + +func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { + mi := &file_services_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 ListServicesRequest.ProtoReflect.Descriptor instead. +func (*ListServicesRequest) Descriptor() ([]byte, []int) { + return file_services_proto_rawDescGZIP(), []int{2} +} + +func (x *ListServicesRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListServicesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListServicesRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +type ListServicesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Services []*Service `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` +} + +func (x *ListServicesResponse) Reset() { + *x = ListServicesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_services_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListServicesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListServicesResponse) ProtoMessage() {} + +func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { + mi := &file_services_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 ListServicesResponse.ProtoReflect.Descriptor instead. +func (*ListServicesResponse) Descriptor() ([]byte, []int) { + return file_services_proto_rawDescGZIP(), []int{3} +} + +func (x *ListServicesResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListServicesResponse) GetServices() []*Service { + if x != nil { + return x.Services + } + return nil +} + +func (x *ListServicesResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListServicesResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListServicesResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +var File_services_proto protoreflect.FileDescriptor + +var file_services_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x72, 0x6c, 0x22, 0x45, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, + 0x22, 0xa0, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x28, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x32, 0xe6, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6e, 0x0a, 0x0c, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x24, 0x5a, 0x22, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, + 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_services_proto_rawDescOnce sync.Once + file_services_proto_rawDescData = file_services_proto_rawDesc +) + +func file_services_proto_rawDescGZIP() []byte { + file_services_proto_rawDescOnce.Do(func() { + file_services_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_proto_rawDescData) + }) + return file_services_proto_rawDescData +} + +var file_services_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_services_proto_goTypes = []interface{}{ + (*Service)(nil), // 0: api.Service + (*GetServiceRequest)(nil), // 1: api.GetServiceRequest + (*ListServicesRequest)(nil), // 2: api.ListServicesRequest + (*ListServicesResponse)(nil), // 3: api.ListServicesResponse +} +var file_services_proto_depIdxs = []int32{ + 0, // 0: api.ListServicesResponse.services:type_name -> api.Service + 1, // 1: api.ServiceService.GetService:input_type -> api.GetServiceRequest + 2, // 2: api.ServiceService.ListServices:input_type -> api.ListServicesRequest + 0, // 3: api.ServiceService.GetService:output_type -> api.Service + 3, // 4: api.ServiceService.ListServices:output_type -> api.ListServicesResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_services_proto_init() } +func file_services_proto_init() { + if File_services_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_services_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Service); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetServiceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListServicesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_services_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListServicesResponse); 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_services_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_services_proto_goTypes, + DependencyIndexes: file_services_proto_depIdxs, + MessageInfos: file_services_proto_msgTypes, + }.Build() + File_services_proto = out.File + file_services_proto_rawDesc = nil + file_services_proto_goTypes = nil + file_services_proto_depIdxs = nil +} diff --git a/api/gen/services.pb.gw.go b/api/gen/services.pb.gw.go new file mode 100644 index 00000000..8fd19e26 --- /dev/null +++ b/api/gen/services.pb.gw.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: services.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_ServiceService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetServiceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ServiceService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetServiceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetService(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_ServiceService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_ServiceService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListServicesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceService_ListServices_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ServiceService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListServicesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceService_ListServices_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListServices(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterServiceServiceHandlerServer registers the http handlers for service ServiceService to "mux". +// UnaryRPC :call ServiceServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceServiceHandlerFromEndpoint instead. +func RegisterServiceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServiceServer) error { + + mux.Handle("GET", pattern_ServiceService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ServiceService/GetService") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServiceService_GetService_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServiceService_GetService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ServiceService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ServiceService/ListServices") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServiceService_ListServices_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServiceService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterServiceServiceHandlerFromEndpoint is same as RegisterServiceServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterServiceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterServiceServiceHandler(ctx, mux, conn) +} + +// RegisterServiceServiceHandler registers the http handlers for service ServiceService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterServiceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterServiceServiceHandlerClient(ctx, mux, NewServiceServiceClient(conn)) +} + +// RegisterServiceServiceHandlerClient registers the http handlers for service ServiceService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ServiceServiceClient" to call the correct interceptors. +func RegisterServiceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceServiceClient) error { + + mux.Handle("GET", pattern_ServiceService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ServiceService/GetService") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServiceService_GetService_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServiceService_GetService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_ServiceService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ServiceService/ListServices") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServiceService_ListServices_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ServiceService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ServiceService_GetService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "service", "name"}, "")) + + pattern_ServiceService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "service"}, "")) +) + +var ( + forward_ServiceService_GetService_0 = runtime.ForwardResponseMessage + + forward_ServiceService_ListServices_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/services_grpc.pb.go b/api/gen/services_grpc.pb.go new file mode 100644 index 00000000..dc78704c --- /dev/null +++ b/api/gen/services_grpc.pb.go @@ -0,0 +1,133 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// ServiceServiceClient is the client API for ServiceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ServiceServiceClient interface { + GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) + ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) +} + +type serviceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewServiceServiceClient(cc grpc.ClientConnInterface) ServiceServiceClient { + return &serviceServiceClient{cc} +} + +func (c *serviceServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) { + out := new(Service) + err := c.cc.Invoke(ctx, "/api.ServiceService/GetService", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { + out := new(ListServicesResponse) + err := c.cc.Invoke(ctx, "/api.ServiceService/ListServices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ServiceServiceServer is the server API for ServiceService service. +// All implementations must embed UnimplementedServiceServiceServer +// for forward compatibility +type ServiceServiceServer interface { + GetService(context.Context, *GetServiceRequest) (*Service, error) + ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) + mustEmbedUnimplementedServiceServiceServer() +} + +// UnimplementedServiceServiceServer must be embedded to have forward compatible implementations. +type UnimplementedServiceServiceServer struct { +} + +func (UnimplementedServiceServiceServer) GetService(context.Context, *GetServiceRequest) (*Service, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") +} +func (UnimplementedServiceServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") +} +func (UnimplementedServiceServiceServer) mustEmbedUnimplementedServiceServiceServer() {} + +// UnsafeServiceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceServiceServer will +// result in compilation errors. +type UnsafeServiceServiceServer interface { + mustEmbedUnimplementedServiceServiceServer() +} + +func RegisterServiceServiceServer(s grpc.ServiceRegistrar, srv ServiceServiceServer) { + s.RegisterService(&_ServiceService_serviceDesc, srv) +} + +func _ServiceService_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServiceServer).GetService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.ServiceService/GetService", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServiceServer).GetService(ctx, req.(*GetServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServiceService_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServiceServer).ListServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.ServiceService/ListServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServiceServer).ListServices(ctx, req.(*ListServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ServiceService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.ServiceService", + HandlerType: (*ServiceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetService", + Handler: _ServiceService_GetService_Handler, + }, + { + MethodName: "ListServices", + Handler: _ServiceService_ListServices_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "services.proto", +} diff --git a/api/gen/workflow.pb.go b/api/gen/workflow.pb.go new file mode 100644 index 00000000..31cff2d3 --- /dev/null +++ b/api/gen/workflow.pb.go @@ -0,0 +1,2965 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: workflow.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CreateWorkflowExecutionBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"` + WorkflowTemplateVersion int64 `protobuf:"varint,3,opt,name=workflowTemplateVersion,proto3" json:"workflowTemplateVersion,omitempty"` + Parameters []*Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` + Labels []*KeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *CreateWorkflowExecutionBody) Reset() { + *x = CreateWorkflowExecutionBody{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkflowExecutionBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkflowExecutionBody) ProtoMessage() {} + +func (x *CreateWorkflowExecutionBody) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 CreateWorkflowExecutionBody.ProtoReflect.Descriptor instead. +func (*CreateWorkflowExecutionBody) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateWorkflowExecutionBody) GetWorkflowTemplateUid() string { + if x != nil { + return x.WorkflowTemplateUid + } + return "" +} + +func (x *CreateWorkflowExecutionBody) GetWorkflowTemplateVersion() int64 { + if x != nil { + return x.WorkflowTemplateVersion + } + return 0 +} + +func (x *CreateWorkflowExecutionBody) GetParameters() []*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *CreateWorkflowExecutionBody) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +type CreateWorkflowExecutionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Body *CreateWorkflowExecutionBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *CreateWorkflowExecutionRequest) Reset() { + *x = CreateWorkflowExecutionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkflowExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkflowExecutionRequest) ProtoMessage() {} + +func (x *CreateWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 CreateWorkflowExecutionRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkflowExecutionRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateWorkflowExecutionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateWorkflowExecutionRequest) GetBody() *CreateWorkflowExecutionBody { + if x != nil { + return x.Body + } + return nil +} + +type CloneWorkflowExecutionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *CloneWorkflowExecutionRequest) Reset() { + *x = CloneWorkflowExecutionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloneWorkflowExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloneWorkflowExecutionRequest) ProtoMessage() {} + +func (x *CloneWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 CloneWorkflowExecutionRequest.ProtoReflect.Descriptor instead. +func (*CloneWorkflowExecutionRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{2} +} + +func (x *CloneWorkflowExecutionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CloneWorkflowExecutionRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type GetWorkflowExecutionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *GetWorkflowExecutionRequest) Reset() { + *x = GetWorkflowExecutionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowExecutionRequest) ProtoMessage() {} + +func (x *GetWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 GetWorkflowExecutionRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowExecutionRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{3} +} + +func (x *GetWorkflowExecutionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkflowExecutionRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type GetArtifactRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *GetArtifactRequest) Reset() { + *x = GetArtifactRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetArtifactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetArtifactRequest) ProtoMessage() {} + +func (x *GetArtifactRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 GetArtifactRequest.ProtoReflect.Descriptor instead. +func (*GetArtifactRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{4} +} + +func (x *GetArtifactRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetArtifactRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GetArtifactRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type WatchWorkflowExecutionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *WatchWorkflowExecutionRequest) Reset() { + *x = WatchWorkflowExecutionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WatchWorkflowExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WatchWorkflowExecutionRequest) ProtoMessage() {} + +func (x *WatchWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 WatchWorkflowExecutionRequest.ProtoReflect.Descriptor instead. +func (*WatchWorkflowExecutionRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{5} +} + +func (x *WatchWorkflowExecutionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *WatchWorkflowExecutionRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ResubmitWorkflowExecutionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ResubmitWorkflowExecutionRequest) Reset() { + *x = ResubmitWorkflowExecutionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResubmitWorkflowExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResubmitWorkflowExecutionRequest) ProtoMessage() {} + +func (x *ResubmitWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 ResubmitWorkflowExecutionRequest.ProtoReflect.Descriptor instead. +func (*ResubmitWorkflowExecutionRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{6} +} + +func (x *ResubmitWorkflowExecutionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ResubmitWorkflowExecutionRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type TerminateWorkflowExecutionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *TerminateWorkflowExecutionRequest) Reset() { + *x = TerminateWorkflowExecutionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TerminateWorkflowExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateWorkflowExecutionRequest) ProtoMessage() {} + +func (x *TerminateWorkflowExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 TerminateWorkflowExecutionRequest.ProtoReflect.Descriptor instead. +func (*TerminateWorkflowExecutionRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{7} +} + +func (x *TerminateWorkflowExecutionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *TerminateWorkflowExecutionRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type GetWorkflowExecutionLogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + PodName string `protobuf:"bytes,3,opt,name=podName,proto3" json:"podName,omitempty"` + ContainerName string `protobuf:"bytes,4,opt,name=containerName,proto3" json:"containerName,omitempty"` +} + +func (x *GetWorkflowExecutionLogsRequest) Reset() { + *x = GetWorkflowExecutionLogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowExecutionLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowExecutionLogsRequest) ProtoMessage() {} + +func (x *GetWorkflowExecutionLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 GetWorkflowExecutionLogsRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowExecutionLogsRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{8} +} + +func (x *GetWorkflowExecutionLogsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkflowExecutionLogsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GetWorkflowExecutionLogsRequest) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + +func (x *GetWorkflowExecutionLogsRequest) GetContainerName() string { + if x != nil { + return x.ContainerName + } + return "" +} + +type GetWorkflowExecutionMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + PodName string `protobuf:"bytes,3,opt,name=podName,proto3" json:"podName,omitempty"` +} + +func (x *GetWorkflowExecutionMetricsRequest) Reset() { + *x = GetWorkflowExecutionMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowExecutionMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowExecutionMetricsRequest) ProtoMessage() {} + +func (x *GetWorkflowExecutionMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 GetWorkflowExecutionMetricsRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowExecutionMetricsRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{9} +} + +func (x *GetWorkflowExecutionMetricsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkflowExecutionMetricsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GetWorkflowExecutionMetricsRequest) GetPodName() string { + if x != nil { + return x.PodName + } + return "" +} + +type GetWorkflowExecutionMetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *GetWorkflowExecutionMetricsResponse) Reset() { + *x = GetWorkflowExecutionMetricsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowExecutionMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowExecutionMetricsResponse) ProtoMessage() {} + +func (x *GetWorkflowExecutionMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 GetWorkflowExecutionMetricsResponse.ProtoReflect.Descriptor instead. +func (*GetWorkflowExecutionMetricsResponse) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{10} +} + +func (x *GetWorkflowExecutionMetricsResponse) GetMetrics() []*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +type ListWorkflowExecutionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"` + WorkflowTemplateVersion string `protobuf:"bytes,3,opt,name=workflowTemplateVersion,proto3" json:"workflowTemplateVersion,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,5,opt,name=page,proto3" json:"page,omitempty"` + Order string `protobuf:"bytes,6,opt,name=order,proto3" json:"order,omitempty"` + Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"` + Phase string `protobuf:"bytes,8,opt,name=phase,proto3" json:"phase,omitempty"` + IncludeSystem bool `protobuf:"varint,9,opt,name=includeSystem,proto3" json:"includeSystem,omitempty"` +} + +func (x *ListWorkflowExecutionsRequest) Reset() { + *x = ListWorkflowExecutionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowExecutionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowExecutionsRequest) ProtoMessage() {} + +func (x *ListWorkflowExecutionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 ListWorkflowExecutionsRequest.ProtoReflect.Descriptor instead. +func (*ListWorkflowExecutionsRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{11} +} + +func (x *ListWorkflowExecutionsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListWorkflowExecutionsRequest) GetWorkflowTemplateUid() string { + if x != nil { + return x.WorkflowTemplateUid + } + return "" +} + +func (x *ListWorkflowExecutionsRequest) GetWorkflowTemplateVersion() string { + if x != nil { + return x.WorkflowTemplateVersion + } + return "" +} + +func (x *ListWorkflowExecutionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkflowExecutionsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkflowExecutionsRequest) GetOrder() string { + if x != nil { + return x.Order + } + return "" +} + +func (x *ListWorkflowExecutionsRequest) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *ListWorkflowExecutionsRequest) GetPhase() string { + if x != nil { + return x.Phase + } + return "" +} + +func (x *ListWorkflowExecutionsRequest) GetIncludeSystem() bool { + if x != nil { + return x.IncludeSystem + } + return false +} + +type ListWorkflowExecutionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkflowExecutions []*WorkflowExecution `protobuf:"bytes,2,rep,name=workflowExecutions,proto3" json:"workflowExecutions,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` +} + +func (x *ListWorkflowExecutionsResponse) Reset() { + *x = ListWorkflowExecutionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowExecutionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowExecutionsResponse) ProtoMessage() {} + +func (x *ListWorkflowExecutionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 ListWorkflowExecutionsResponse.ProtoReflect.Descriptor instead. +func (*ListWorkflowExecutionsResponse) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{12} +} + +func (x *ListWorkflowExecutionsResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListWorkflowExecutionsResponse) GetWorkflowExecutions() []*WorkflowExecution { + if x != nil { + return x.WorkflowExecutions + } + return nil +} + +func (x *ListWorkflowExecutionsResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkflowExecutionsResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListWorkflowExecutionsResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +func (x *ListWorkflowExecutionsResponse) GetTotalAvailableCount() int32 { + if x != nil { + return x.TotalAvailableCount + } + return 0 +} + +type LogEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp string `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *LogEntry) Reset() { + *x = LogEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogEntry) ProtoMessage() {} + +func (x *LogEntry) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 LogEntry.ProtoReflect.Descriptor instead. +func (*LogEntry) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{13} +} + +func (x *LogEntry) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +func (x *LogEntry) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +type WorkflowExecutionMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *WorkflowExecutionMetadata) Reset() { + *x = WorkflowExecutionMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowExecutionMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowExecutionMetadata) ProtoMessage() {} + +func (x *WorkflowExecutionMetadata) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 WorkflowExecutionMetadata.ProtoReflect.Descriptor instead. +func (*WorkflowExecutionMetadata) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{14} +} + +func (x *WorkflowExecutionMetadata) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type WorkflowExecution struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` + StartedAt string `protobuf:"bytes,5,opt,name=startedAt,proto3" json:"startedAt,omitempty"` + FinishedAt string `protobuf:"bytes,6,opt,name=finishedAt,proto3" json:"finishedAt,omitempty"` + Manifest string `protobuf:"bytes,7,opt,name=manifest,proto3" json:"manifest,omitempty"` + Parameters []*Parameter `protobuf:"bytes,8,rep,name=parameters,proto3" json:"parameters,omitempty"` + WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,9,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` + Labels []*KeyValue `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty"` + Metadata *WorkflowExecutionMetadata `protobuf:"bytes,11,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metrics []*Metric `protobuf:"bytes,12,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *WorkflowExecution) Reset() { + *x = WorkflowExecution{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowExecution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowExecution) ProtoMessage() {} + +func (x *WorkflowExecution) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[15] + 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 WorkflowExecution.ProtoReflect.Descriptor instead. +func (*WorkflowExecution) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{15} +} + +func (x *WorkflowExecution) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *WorkflowExecution) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *WorkflowExecution) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkflowExecution) GetPhase() string { + if x != nil { + return x.Phase + } + return "" +} + +func (x *WorkflowExecution) GetStartedAt() string { + if x != nil { + return x.StartedAt + } + return "" +} + +func (x *WorkflowExecution) GetFinishedAt() string { + if x != nil { + return x.FinishedAt + } + return "" +} + +func (x *WorkflowExecution) GetManifest() string { + if x != nil { + return x.Manifest + } + return "" +} + +func (x *WorkflowExecution) GetParameters() []*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *WorkflowExecution) GetWorkflowTemplate() *WorkflowTemplate { + if x != nil { + return x.WorkflowTemplate + } + return nil +} + +func (x *WorkflowExecution) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +func (x *WorkflowExecution) GetMetadata() *WorkflowExecutionMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkflowExecution) GetMetrics() []*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +type ArtifactResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *ArtifactResponse) Reset() { + *x = ArtifactResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArtifactResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArtifactResponse) ProtoMessage() {} + +func (x *ArtifactResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[16] + 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 ArtifactResponse.ProtoReflect.Descriptor instead. +func (*ArtifactResponse) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{16} +} + +func (x *ArtifactResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type File struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Extension string `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + ContentType string `protobuf:"bytes,5,opt,name=contentType,proto3" json:"contentType,omitempty"` + LastModified string `protobuf:"bytes,6,opt,name=lastModified,proto3" json:"lastModified,omitempty"` + Directory bool `protobuf:"varint,7,opt,name=directory,proto3" json:"directory,omitempty"` +} + +func (x *File) Reset() { + *x = File{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[17] + 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_workflow_proto_msgTypes[17] + 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_workflow_proto_rawDescGZIP(), []int{17} +} + +func (x *File) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *File) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *File) GetExtension() string { + if x != nil { + return x.Extension + } + return "" +} + +func (x *File) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *File) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *File) GetLastModified() string { + if x != nil { + return x.LastModified + } + return "" +} + +func (x *File) GetDirectory() bool { + if x != nil { + return x.Directory + } + return false +} + +type ListFilesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *ListFilesRequest) Reset() { + *x = ListFilesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesRequest) ProtoMessage() {} + +func (x *ListFilesRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[18] + 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 ListFilesRequest.ProtoReflect.Descriptor instead. +func (*ListFilesRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{18} +} + +func (x *ListFilesRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListFilesRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *ListFilesRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type ListFilesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` + ParentPath string `protobuf:"bytes,2,opt,name=parentPath,proto3" json:"parentPath,omitempty"` +} + +func (x *ListFilesResponse) Reset() { + *x = ListFilesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesResponse) ProtoMessage() {} + +func (x *ListFilesResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[19] + 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 ListFilesResponse.ProtoReflect.Descriptor instead. +func (*ListFilesResponse) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{19} +} + +func (x *ListFilesResponse) GetFiles() []*File { + if x != nil { + return x.Files + } + return nil +} + +func (x *ListFilesResponse) GetParentPath() string { + if x != nil { + return x.ParentPath + } + return "" +} + +type Statistics struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkflowStatus string `protobuf:"bytes,1,opt,name=workflowStatus,proto3" json:"workflowStatus,omitempty"` + WorkflowTemplateId int64 `protobuf:"varint,2,opt,name=workflowTemplateId,proto3" json:"workflowTemplateId,omitempty"` +} + +func (x *Statistics) Reset() { + *x = Statistics{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Statistics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Statistics) ProtoMessage() {} + +func (x *Statistics) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Statistics.ProtoReflect.Descriptor instead. +func (*Statistics) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{20} +} + +func (x *Statistics) GetWorkflowStatus() string { + if x != nil { + return x.WorkflowStatus + } + return "" +} + +func (x *Statistics) GetWorkflowTemplateId() int64 { + if x != nil { + return x.WorkflowTemplateId + } + return 0 +} + +type AddWorkflowExecutionStatisticRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Statistics *Statistics `protobuf:"bytes,3,opt,name=statistics,proto3" json:"statistics,omitempty"` +} + +func (x *AddWorkflowExecutionStatisticRequest) Reset() { + *x = AddWorkflowExecutionStatisticRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddWorkflowExecutionStatisticRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWorkflowExecutionStatisticRequest) ProtoMessage() {} + +func (x *AddWorkflowExecutionStatisticRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[21] + 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 AddWorkflowExecutionStatisticRequest.ProtoReflect.Descriptor instead. +func (*AddWorkflowExecutionStatisticRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{21} +} + +func (x *AddWorkflowExecutionStatisticRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *AddWorkflowExecutionStatisticRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *AddWorkflowExecutionStatisticRequest) GetStatistics() *Statistics { + if x != nil { + return x.Statistics + } + return nil +} + +type CronStartWorkflowExecutionStatisticRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Statistics *Statistics `protobuf:"bytes,3,opt,name=statistics,proto3" json:"statistics,omitempty"` +} + +func (x *CronStartWorkflowExecutionStatisticRequest) Reset() { + *x = CronStartWorkflowExecutionStatisticRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CronStartWorkflowExecutionStatisticRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CronStartWorkflowExecutionStatisticRequest) ProtoMessage() {} + +func (x *CronStartWorkflowExecutionStatisticRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[22] + 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 CronStartWorkflowExecutionStatisticRequest.ProtoReflect.Descriptor instead. +func (*CronStartWorkflowExecutionStatisticRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{22} +} + +func (x *CronStartWorkflowExecutionStatisticRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CronStartWorkflowExecutionStatisticRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *CronStartWorkflowExecutionStatisticRequest) GetStatistics() *Statistics { + if x != nil { + return x.Statistics + } + return nil +} + +type WorkflowExecutionStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phase string `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"` +} + +func (x *WorkflowExecutionStatus) Reset() { + *x = WorkflowExecutionStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowExecutionStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowExecutionStatus) ProtoMessage() {} + +func (x *WorkflowExecutionStatus) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 WorkflowExecutionStatus.ProtoReflect.Descriptor instead. +func (*WorkflowExecutionStatus) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{23} +} + +func (x *WorkflowExecutionStatus) GetPhase() string { + if x != nil { + return x.Phase + } + return "" +} + +type UpdateWorkflowExecutionStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Status *WorkflowExecutionStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *UpdateWorkflowExecutionStatusRequest) Reset() { + *x = UpdateWorkflowExecutionStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkflowExecutionStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkflowExecutionStatusRequest) ProtoMessage() {} + +func (x *UpdateWorkflowExecutionStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 UpdateWorkflowExecutionStatusRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkflowExecutionStatusRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{24} +} + +func (x *UpdateWorkflowExecutionStatusRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateWorkflowExecutionStatusRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UpdateWorkflowExecutionStatusRequest) GetStatus() *WorkflowExecutionStatus { + if x != nil { + return x.Status + } + return nil +} + +type GetWorkflowExecutionStatisticsForNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) Reset() { + *x = GetWorkflowExecutionStatisticsForNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoMessage() {} + +func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[25] + 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 GetWorkflowExecutionStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowExecutionStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{25} +} + +func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +type GetWorkflowExecutionStatisticsForNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stats *WorkflowExecutionStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) Reset() { + *x = GetWorkflowExecutionStatisticsForNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoMessage() {} + +func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[26] + 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 GetWorkflowExecutionStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead. +func (*GetWorkflowExecutionStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{26} +} + +func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) GetStats() *WorkflowExecutionStatisticReport { + if x != nil { + return x.Stats + } + return nil +} + +type AddWorkflowExecutionMetricRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Metric *Metric `protobuf:"bytes,3,opt,name=metric,proto3" json:"metric,omitempty"` +} + +func (x *AddWorkflowExecutionMetricRequest) Reset() { + *x = AddWorkflowExecutionMetricRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddWorkflowExecutionMetricRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWorkflowExecutionMetricRequest) ProtoMessage() {} + +func (x *AddWorkflowExecutionMetricRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 AddWorkflowExecutionMetricRequest.ProtoReflect.Descriptor instead. +func (*AddWorkflowExecutionMetricRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{27} +} + +func (x *AddWorkflowExecutionMetricRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *AddWorkflowExecutionMetricRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *AddWorkflowExecutionMetricRequest) GetMetric() *Metric { + if x != nil { + return x.Metric + } + return nil +} + +type AddWorkflowExecutionsMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Override bool `protobuf:"varint,3,opt,name=override,proto3" json:"override,omitempty"` + Metrics []*Metric `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *AddWorkflowExecutionsMetricsRequest) Reset() { + *x = AddWorkflowExecutionsMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddWorkflowExecutionsMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddWorkflowExecutionsMetricsRequest) ProtoMessage() {} + +func (x *AddWorkflowExecutionsMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_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 AddWorkflowExecutionsMetricsRequest.ProtoReflect.Descriptor instead. +func (*AddWorkflowExecutionsMetricsRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{28} +} + +func (x *AddWorkflowExecutionsMetricsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *AddWorkflowExecutionsMetricsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *AddWorkflowExecutionsMetricsRequest) GetOverride() bool { + if x != nil { + return x.Override + } + return false +} + +func (x *AddWorkflowExecutionsMetricsRequest) GetMetrics() []*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +type UpdateWorkflowExecutionsMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Metrics []*Metric `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *UpdateWorkflowExecutionsMetricsRequest) Reset() { + *x = UpdateWorkflowExecutionsMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkflowExecutionsMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkflowExecutionsMetricsRequest) ProtoMessage() {} + +func (x *UpdateWorkflowExecutionsMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[29] + 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 UpdateWorkflowExecutionsMetricsRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkflowExecutionsMetricsRequest) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{29} +} + +func (x *UpdateWorkflowExecutionsMetricsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateWorkflowExecutionsMetricsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UpdateWorkflowExecutionsMetricsRequest) GetMetrics() []*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +type WorkflowExecutionsMetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metrics []*Metric `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"` +} + +func (x *WorkflowExecutionsMetricsResponse) Reset() { + *x = WorkflowExecutionsMetricsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowExecutionsMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowExecutionsMetricsResponse) ProtoMessage() {} + +func (x *WorkflowExecutionsMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_proto_msgTypes[30] + 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 WorkflowExecutionsMetricsResponse.ProtoReflect.Descriptor instead. +func (*WorkflowExecutionsMetricsResponse) Descriptor() ([]byte, []int) { + return file_workflow_proto_rawDescGZIP(), []int{30} +} + +func (x *WorkflowExecutionsMetricsResponse) GetMetrics() []*Metric { + if x != nil { + return x.Metrics + } + return nil +} + +var File_workflow_proto protoreflect.FileDescriptor + +var file_workflow_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, + 0x64, 0x79, 0x12, 0x30, 0x0a, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x55, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, + 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x74, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x4f, 0x0a, 0x1d, 0x43, + 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x56, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x22, 0x4f, 0x0a, 0x1d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x20, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x53, 0x0a, 0x21, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x91, 0x01, + 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x6e, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x4c, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, + 0xc3, 0x02, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x30, 0x0a, 0x13, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x55, 0x69, + 0x64, 0x12, 0x38, 0x0a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, + 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xfa, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, + 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, + 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x30, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xc4, 0x03, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, + 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x26, 0x0a, 0x10, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xc4, 0x01, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, + 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x56, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2e, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, + 0x87, 0x01, 0x0a, 0x24, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x51, 0x0a, 0x31, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x32, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, + 0x78, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x22, 0x98, 0x01, 0x0a, 0x23, 0x41, 0x64, + 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x25, 0x0a, + 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x22, 0x7f, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x25, + 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x4a, 0x0a, 0x21, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x32, 0x81, 0x17, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x16, + 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, + 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x33, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, + 0xdf, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x36, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, + 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x99, 0x01, 0x0a, + 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, + 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, + 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, + 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, + 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, + 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3e, 0x1a, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, + 0x12, 0x46, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, + 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, + 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, + 0x22, 0x3e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xcd, 0x01, 0x0a, + 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, + 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xae, 0x01, 0x0a, + 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb6, 0x01, + 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x28, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x12, 0xbc, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_workflow_proto_rawDescOnce sync.Once + file_workflow_proto_rawDescData = file_workflow_proto_rawDesc +) + +func file_workflow_proto_rawDescGZIP() []byte { + file_workflow_proto_rawDescOnce.Do(func() { + file_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_workflow_proto_rawDescData) + }) + return file_workflow_proto_rawDescData +} + +var file_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_workflow_proto_goTypes = []interface{}{ + (*CreateWorkflowExecutionBody)(nil), // 0: api.CreateWorkflowExecutionBody + (*CreateWorkflowExecutionRequest)(nil), // 1: api.CreateWorkflowExecutionRequest + (*CloneWorkflowExecutionRequest)(nil), // 2: api.CloneWorkflowExecutionRequest + (*GetWorkflowExecutionRequest)(nil), // 3: api.GetWorkflowExecutionRequest + (*GetArtifactRequest)(nil), // 4: api.GetArtifactRequest + (*WatchWorkflowExecutionRequest)(nil), // 5: api.WatchWorkflowExecutionRequest + (*ResubmitWorkflowExecutionRequest)(nil), // 6: api.ResubmitWorkflowExecutionRequest + (*TerminateWorkflowExecutionRequest)(nil), // 7: api.TerminateWorkflowExecutionRequest + (*GetWorkflowExecutionLogsRequest)(nil), // 8: api.GetWorkflowExecutionLogsRequest + (*GetWorkflowExecutionMetricsRequest)(nil), // 9: api.GetWorkflowExecutionMetricsRequest + (*GetWorkflowExecutionMetricsResponse)(nil), // 10: api.GetWorkflowExecutionMetricsResponse + (*ListWorkflowExecutionsRequest)(nil), // 11: api.ListWorkflowExecutionsRequest + (*ListWorkflowExecutionsResponse)(nil), // 12: api.ListWorkflowExecutionsResponse + (*LogEntry)(nil), // 13: api.LogEntry + (*WorkflowExecutionMetadata)(nil), // 14: api.WorkflowExecutionMetadata + (*WorkflowExecution)(nil), // 15: api.WorkflowExecution + (*ArtifactResponse)(nil), // 16: api.ArtifactResponse + (*File)(nil), // 17: api.File + (*ListFilesRequest)(nil), // 18: api.ListFilesRequest + (*ListFilesResponse)(nil), // 19: api.ListFilesResponse + (*Statistics)(nil), // 20: api.Statistics + (*AddWorkflowExecutionStatisticRequest)(nil), // 21: api.AddWorkflowExecutionStatisticRequest + (*CronStartWorkflowExecutionStatisticRequest)(nil), // 22: api.CronStartWorkflowExecutionStatisticRequest + (*WorkflowExecutionStatus)(nil), // 23: api.WorkflowExecutionStatus + (*UpdateWorkflowExecutionStatusRequest)(nil), // 24: api.UpdateWorkflowExecutionStatusRequest + (*GetWorkflowExecutionStatisticsForNamespaceRequest)(nil), // 25: api.GetWorkflowExecutionStatisticsForNamespaceRequest + (*GetWorkflowExecutionStatisticsForNamespaceResponse)(nil), // 26: api.GetWorkflowExecutionStatisticsForNamespaceResponse + (*AddWorkflowExecutionMetricRequest)(nil), // 27: api.AddWorkflowExecutionMetricRequest + (*AddWorkflowExecutionsMetricsRequest)(nil), // 28: api.AddWorkflowExecutionsMetricsRequest + (*UpdateWorkflowExecutionsMetricsRequest)(nil), // 29: api.UpdateWorkflowExecutionsMetricsRequest + (*WorkflowExecutionsMetricsResponse)(nil), // 30: api.WorkflowExecutionsMetricsResponse + (*Parameter)(nil), // 31: api.Parameter + (*KeyValue)(nil), // 32: api.KeyValue + (*Metric)(nil), // 33: api.Metric + (*WorkflowTemplate)(nil), // 34: api.WorkflowTemplate + (*WorkflowExecutionStatisticReport)(nil), // 35: api.WorkflowExecutionStatisticReport + (*emptypb.Empty)(nil), // 36: google.protobuf.Empty +} +var file_workflow_proto_depIdxs = []int32{ + 31, // 0: api.CreateWorkflowExecutionBody.parameters:type_name -> api.Parameter + 32, // 1: api.CreateWorkflowExecutionBody.labels:type_name -> api.KeyValue + 0, // 2: api.CreateWorkflowExecutionRequest.body:type_name -> api.CreateWorkflowExecutionBody + 33, // 3: api.GetWorkflowExecutionMetricsResponse.metrics:type_name -> api.Metric + 15, // 4: api.ListWorkflowExecutionsResponse.workflowExecutions:type_name -> api.WorkflowExecution + 31, // 5: api.WorkflowExecution.parameters:type_name -> api.Parameter + 34, // 6: api.WorkflowExecution.workflowTemplate:type_name -> api.WorkflowTemplate + 32, // 7: api.WorkflowExecution.labels:type_name -> api.KeyValue + 14, // 8: api.WorkflowExecution.metadata:type_name -> api.WorkflowExecutionMetadata + 33, // 9: api.WorkflowExecution.metrics:type_name -> api.Metric + 17, // 10: api.ListFilesResponse.files:type_name -> api.File + 20, // 11: api.AddWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics + 20, // 12: api.CronStartWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics + 23, // 13: api.UpdateWorkflowExecutionStatusRequest.status:type_name -> api.WorkflowExecutionStatus + 35, // 14: api.GetWorkflowExecutionStatisticsForNamespaceResponse.stats:type_name -> api.WorkflowExecutionStatisticReport + 33, // 15: api.AddWorkflowExecutionMetricRequest.metric:type_name -> api.Metric + 33, // 16: api.AddWorkflowExecutionsMetricsRequest.metrics:type_name -> api.Metric + 33, // 17: api.UpdateWorkflowExecutionsMetricsRequest.metrics:type_name -> api.Metric + 33, // 18: api.WorkflowExecutionsMetricsResponse.metrics:type_name -> api.Metric + 1, // 19: api.WorkflowService.CreateWorkflowExecution:input_type -> api.CreateWorkflowExecutionRequest + 2, // 20: api.WorkflowService.CloneWorkflowExecution:input_type -> api.CloneWorkflowExecutionRequest + 25, // 21: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:input_type -> api.GetWorkflowExecutionStatisticsForNamespaceRequest + 3, // 22: api.WorkflowService.GetWorkflowExecution:input_type -> api.GetWorkflowExecutionRequest + 11, // 23: api.WorkflowService.ListWorkflowExecutions:input_type -> api.ListWorkflowExecutionsRequest + 5, // 24: api.WorkflowService.WatchWorkflowExecution:input_type -> api.WatchWorkflowExecutionRequest + 8, // 25: api.WorkflowService.GetWorkflowExecutionLogs:input_type -> api.GetWorkflowExecutionLogsRequest + 9, // 26: api.WorkflowService.GetWorkflowExecutionMetrics:input_type -> api.GetWorkflowExecutionMetricsRequest + 6, // 27: api.WorkflowService.ResubmitWorkflowExecution:input_type -> api.ResubmitWorkflowExecutionRequest + 7, // 28: api.WorkflowService.TerminateWorkflowExecution:input_type -> api.TerminateWorkflowExecutionRequest + 4, // 29: api.WorkflowService.GetArtifact:input_type -> api.GetArtifactRequest + 18, // 30: api.WorkflowService.ListFiles:input_type -> api.ListFilesRequest + 21, // 31: api.WorkflowService.AddWorkflowExecutionStatistics:input_type -> api.AddWorkflowExecutionStatisticRequest + 22, // 32: api.WorkflowService.CronStartWorkflowExecutionStatistic:input_type -> api.CronStartWorkflowExecutionStatisticRequest + 24, // 33: api.WorkflowService.UpdateWorkflowExecutionStatus:input_type -> api.UpdateWorkflowExecutionStatusRequest + 28, // 34: api.WorkflowService.AddWorkflowExecutionMetrics:input_type -> api.AddWorkflowExecutionsMetricsRequest + 29, // 35: api.WorkflowService.UpdateWorkflowExecutionMetrics:input_type -> api.UpdateWorkflowExecutionsMetricsRequest + 15, // 36: api.WorkflowService.CreateWorkflowExecution:output_type -> api.WorkflowExecution + 15, // 37: api.WorkflowService.CloneWorkflowExecution:output_type -> api.WorkflowExecution + 26, // 38: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:output_type -> api.GetWorkflowExecutionStatisticsForNamespaceResponse + 15, // 39: api.WorkflowService.GetWorkflowExecution:output_type -> api.WorkflowExecution + 12, // 40: api.WorkflowService.ListWorkflowExecutions:output_type -> api.ListWorkflowExecutionsResponse + 15, // 41: api.WorkflowService.WatchWorkflowExecution:output_type -> api.WorkflowExecution + 13, // 42: api.WorkflowService.GetWorkflowExecutionLogs:output_type -> api.LogEntry + 10, // 43: api.WorkflowService.GetWorkflowExecutionMetrics:output_type -> api.GetWorkflowExecutionMetricsResponse + 15, // 44: api.WorkflowService.ResubmitWorkflowExecution:output_type -> api.WorkflowExecution + 36, // 45: api.WorkflowService.TerminateWorkflowExecution:output_type -> google.protobuf.Empty + 16, // 46: api.WorkflowService.GetArtifact:output_type -> api.ArtifactResponse + 19, // 47: api.WorkflowService.ListFiles:output_type -> api.ListFilesResponse + 36, // 48: api.WorkflowService.AddWorkflowExecutionStatistics:output_type -> google.protobuf.Empty + 36, // 49: api.WorkflowService.CronStartWorkflowExecutionStatistic:output_type -> google.protobuf.Empty + 36, // 50: api.WorkflowService.UpdateWorkflowExecutionStatus:output_type -> google.protobuf.Empty + 30, // 51: api.WorkflowService.AddWorkflowExecutionMetrics:output_type -> api.WorkflowExecutionsMetricsResponse + 30, // 52: api.WorkflowService.UpdateWorkflowExecutionMetrics:output_type -> api.WorkflowExecutionsMetricsResponse + 36, // [36:53] is the sub-list for method output_type + 19, // [19:36] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_workflow_proto_init() } +func file_workflow_proto_init() { + if File_workflow_proto != nil { + return + } + file_workflow_template_proto_init() + file_metric_proto_init() + file_label_proto_init() + file_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkflowExecutionBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkflowExecutionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloneWorkflowExecutionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowExecutionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetArtifactRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WatchWorkflowExecutionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResubmitWorkflowExecutionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TerminateWorkflowExecutionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowExecutionLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowExecutionMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowExecutionMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowExecutionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowExecutionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowExecutionMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowExecution); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArtifactResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[17].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_workflow_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFilesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFilesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Statistics); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddWorkflowExecutionStatisticRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CronStartWorkflowExecutionStatisticRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowExecutionStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkflowExecutionStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddWorkflowExecutionMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddWorkflowExecutionsMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkflowExecutionsMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowExecutionsMetricsResponse); 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_workflow_proto_rawDesc, + NumEnums: 0, + NumMessages: 31, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_workflow_proto_goTypes, + DependencyIndexes: file_workflow_proto_depIdxs, + MessageInfos: file_workflow_proto_msgTypes, + }.Build() + File_workflow_proto = out.File + file_workflow_proto_rawDesc = nil + file_workflow_proto_goTypes = nil + file_workflow_proto_depIdxs = nil +} diff --git a/api/gen/workflow.pb.gw.go b/api/gen/workflow.pb.gw.go new file mode 100644 index 00000000..77695766 --- /dev/null +++ b/api/gen/workflow.pb.gw.go @@ -0,0 +1,2155 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: workflow.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_WorkflowService_CreateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.CreateWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_CreateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateWorkflowExecution(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_CloneWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CloneWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.CloneWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_CloneWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CloneWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.CloneWorkflowExecution(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_GetWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.GetWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_GetWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.GetWorkflowExecution(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkflowService_ListWorkflowExecutions_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_WorkflowService_ListWorkflowExecutions_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkflowExecutionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowService_ListWorkflowExecutions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListWorkflowExecutions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_ListWorkflowExecutions_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkflowExecutionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowService_ListWorkflowExecutions_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListWorkflowExecutions(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_WatchWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (WorkflowService_WatchWorkflowExecutionClient, runtime.ServerMetadata, error) { + var protoReq WatchWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + stream, err := client.WatchWorkflowExecution(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_WorkflowService_GetWorkflowExecutionLogs_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (WorkflowService_GetWorkflowExecutionLogsClient, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionLogsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["podName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err) + } + + val, ok = pathParams["containerName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "containerName") + } + + protoReq.ContainerName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "containerName", err) + } + + stream, err := client.GetWorkflowExecutionLogs(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_WorkflowService_GetWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionMetricsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["podName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err) + } + + msg, err := client.GetWorkflowExecutionMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_GetWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowExecutionMetricsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["podName"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName") + } + + protoReq.PodName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err) + } + + msg, err := server.GetWorkflowExecutionMetrics(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_ResubmitWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResubmitWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ResubmitWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_ResubmitWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResubmitWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ResubmitWorkflowExecution(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_TerminateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TerminateWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.TerminateWorkflowExecution(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_TerminateWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TerminateWorkflowExecutionRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.TerminateWorkflowExecution(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_GetArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetArtifactRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := client.GetArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_GetArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetArtifactRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["key"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key") + } + + protoReq.Key, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err) + } + + msg, err := server.GetArtifact(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListFilesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := client.ListFiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListFilesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := server.ListFiles(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_AddWorkflowExecutionStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddWorkflowExecutionStatisticRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.AddWorkflowExecutionStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_AddWorkflowExecutionStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddWorkflowExecutionStatisticRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.AddWorkflowExecutionStatistics(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CronStartWorkflowExecutionStatisticRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.CronStartWorkflowExecutionStatistic(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CronStartWorkflowExecutionStatisticRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Statistics); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.CronStartWorkflowExecutionStatistic(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkflowExecutionStatusRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.UpdateWorkflowExecutionStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkflowExecutionStatusRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.UpdateWorkflowExecutionStatus(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_AddWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddWorkflowExecutionsMetricsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.AddWorkflowExecutionMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_AddWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddWorkflowExecutionsMetricsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.AddWorkflowExecutionMetrics(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkflowExecutionsMetricsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.UpdateWorkflowExecutionMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkflowExecutionsMetricsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.UpdateWorkflowExecutionMetrics(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterWorkflowServiceHandlerServer registers the http handlers for service WorkflowService to "mux". +// UnaryRPC :call WorkflowServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkflowServiceHandlerFromEndpoint instead. +func RegisterWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkflowServiceServer) error { + + mux.Handle("POST", pattern_WorkflowService_CreateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/CreateWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_CreateWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_CreateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_CloneWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/CloneWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_CloneWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_CloneWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_GetWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_ListWorkflowExecutions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/ListWorkflowExecutions") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_ListWorkflowExecutions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_ListWorkflowExecutions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_WatchWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecutionMetrics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_GetWorkflowExecutionMetrics_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_ResubmitWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/ResubmitWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_ResubmitWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_ResubmitWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_TerminateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/TerminateWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_TerminateWorkflowExecution_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_TerminateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/GetArtifact") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_GetArtifact_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_ListFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/ListFiles") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_ListFiles_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_ListFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/AddWorkflowExecutionStatistics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_AddWorkflowExecutionStatistics_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_AddWorkflowExecutionStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_CronStartWorkflowExecutionStatistic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/CronStartWorkflowExecutionStatistic") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_CronStartWorkflowExecutionStatistic_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/UpdateWorkflowExecutionStatus") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_UpdateWorkflowExecutionStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/AddWorkflowExecutionMetrics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_AddWorkflowExecutionMetrics_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_AddWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowService/UpdateWorkflowExecutionMetrics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowService_UpdateWorkflowExecutionMetrics_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterWorkflowServiceHandlerFromEndpoint is same as RegisterWorkflowServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWorkflowServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWorkflowServiceHandler(ctx, mux, conn) +} + +// RegisterWorkflowServiceHandler registers the http handlers for service WorkflowService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWorkflowServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWorkflowServiceHandlerClient(ctx, mux, NewWorkflowServiceClient(conn)) +} + +// RegisterWorkflowServiceHandlerClient registers the http handlers for service WorkflowService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkflowServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkflowServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WorkflowServiceClient" to call the correct interceptors. +func RegisterWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkflowServiceClient) error { + + mux.Handle("POST", pattern_WorkflowService_CreateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/CreateWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_CreateWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_CreateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_CloneWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/CloneWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_CloneWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_CloneWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_GetWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_ListWorkflowExecutions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/ListWorkflowExecutions") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_ListWorkflowExecutions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_ListWorkflowExecutions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_WatchWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/WatchWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_WatchWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_WatchWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecutionLogs") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_GetWorkflowExecutionLogs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecutionLogs_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/GetWorkflowExecutionMetrics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_GetWorkflowExecutionMetrics_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_ResubmitWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/ResubmitWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_ResubmitWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_ResubmitWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_TerminateWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/TerminateWorkflowExecution") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_TerminateWorkflowExecution_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_TerminateWorkflowExecution_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_GetArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/GetArtifact") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_GetArtifact_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_GetArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowService_ListFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/ListFiles") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_ListFiles_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_ListFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionStatistics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/AddWorkflowExecutionStatistics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_AddWorkflowExecutionStatistics_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_AddWorkflowExecutionStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_CronStartWorkflowExecutionStatistic_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/CronStartWorkflowExecutionStatistic") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_CronStartWorkflowExecutionStatistic_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_CronStartWorkflowExecutionStatistic_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/UpdateWorkflowExecutionStatus") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_UpdateWorkflowExecutionStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_UpdateWorkflowExecutionStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowService_AddWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/AddWorkflowExecutionMetrics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_AddWorkflowExecutionMetrics_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_AddWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowService/UpdateWorkflowExecutionMetrics") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowService_UpdateWorkflowExecutionMetrics_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowService_UpdateWorkflowExecutionMetrics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_WorkflowService_CreateWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_executions"}, "")) + + pattern_WorkflowService_CloneWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid"}, "")) + + pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "statistics"}, "")) + + pattern_WorkflowService_GetWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid"}, "")) + + pattern_WorkflowService_ListWorkflowExecutions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_executions"}, "")) + + pattern_WorkflowService_WatchWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "watch"}, "")) + + pattern_WorkflowService_GetWorkflowExecutionLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "pods", "podName", "containers", "containerName", "logs"}, "")) + + pattern_WorkflowService_GetWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "pods", "podName", "metrics"}, "")) + + pattern_WorkflowService_ResubmitWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "resubmit"}, "")) + + pattern_WorkflowService_TerminateWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "terminate"}, "")) + + pattern_WorkflowService_GetArtifact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 3, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "artifacts", "key"}, "")) + + pattern_WorkflowService_ListFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 3, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "files", "path"}, "")) + + pattern_WorkflowService_AddWorkflowExecutionStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "statistics"}, "")) + + pattern_WorkflowService_CronStartWorkflowExecutionStatistic_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "cron_start_statistics"}, "")) + + pattern_WorkflowService_UpdateWorkflowExecutionStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "status"}, "")) + + pattern_WorkflowService_AddWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "metric"}, "")) + + pattern_WorkflowService_UpdateWorkflowExecutionMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid", "metric"}, "")) +) + +var ( + forward_WorkflowService_CreateWorkflowExecution_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_CloneWorkflowExecution_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_GetWorkflowExecution_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_ListWorkflowExecutions_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_WatchWorkflowExecution_0 = runtime.ForwardResponseStream + + forward_WorkflowService_GetWorkflowExecutionLogs_0 = runtime.ForwardResponseStream + + forward_WorkflowService_GetWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_ResubmitWorkflowExecution_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_TerminateWorkflowExecution_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_GetArtifact_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_ListFiles_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_AddWorkflowExecutionStatistics_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_CronStartWorkflowExecutionStatistic_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_UpdateWorkflowExecutionStatus_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_AddWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage + + forward_WorkflowService_UpdateWorkflowExecutionMetrics_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/workflow_grpc.pb.go b/api/gen/workflow_grpc.pb.go new file mode 100644 index 00000000..64ac6b97 --- /dev/null +++ b/api/gen/workflow_grpc.pb.go @@ -0,0 +1,733 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// WorkflowServiceClient is the client API for WorkflowService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WorkflowServiceClient interface { + // Creates a Workflow + CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) + // Clone a Workflow. This is the same as running it again. + CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) + GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) + GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) + ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error) + WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error) + GetWorkflowExecutionLogs(ctx context.Context, in *GetWorkflowExecutionLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowExecutionLogsClient, error) + GetWorkflowExecutionMetrics(ctx context.Context, in *GetWorkflowExecutionMetricsRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionMetricsResponse, error) + ResubmitWorkflowExecution(ctx context.Context, in *ResubmitWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) + TerminateWorkflowExecution(ctx context.Context, in *TerminateWorkflowExecutionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetArtifact(ctx context.Context, in *GetArtifactRequest, opts ...grpc.CallOption) (*ArtifactResponse, error) + ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) + AddWorkflowExecutionStatistics(ctx context.Context, in *AddWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + CronStartWorkflowExecutionStatistic(ctx context.Context, in *CronStartWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) + UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) +} + +type workflowServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWorkflowServiceClient(cc grpc.ClientConnInterface) WorkflowServiceClient { + return &workflowServiceClient{cc} +} + +func (c *workflowServiceClient) CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { + out := new(WorkflowExecution) + err := c.cc.Invoke(ctx, "/api.WorkflowService/CreateWorkflowExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { + out := new(WorkflowExecution) + err := c.cc.Invoke(ctx, "/api.WorkflowService/CloneWorkflowExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) { + out := new(GetWorkflowExecutionStatisticsForNamespaceResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { + out := new(WorkflowExecution) + err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error) { + out := new(ListWorkflowExecutionsResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/ListWorkflowExecutions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error) { + stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[0], "/api.WorkflowService/WatchWorkflowExecution", opts...) + if err != nil { + return nil, err + } + x := &workflowServiceWatchWorkflowExecutionClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type WorkflowService_WatchWorkflowExecutionClient interface { + Recv() (*WorkflowExecution, error) + grpc.ClientStream +} + +type workflowServiceWatchWorkflowExecutionClient struct { + grpc.ClientStream +} + +func (x *workflowServiceWatchWorkflowExecutionClient) Recv() (*WorkflowExecution, error) { + m := new(WorkflowExecution) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *workflowServiceClient) GetWorkflowExecutionLogs(ctx context.Context, in *GetWorkflowExecutionLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowExecutionLogsClient, error) { + stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[1], "/api.WorkflowService/GetWorkflowExecutionLogs", opts...) + if err != nil { + return nil, err + } + x := &workflowServiceGetWorkflowExecutionLogsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type WorkflowService_GetWorkflowExecutionLogsClient interface { + Recv() (*LogEntry, error) + grpc.ClientStream +} + +type workflowServiceGetWorkflowExecutionLogsClient struct { + grpc.ClientStream +} + +func (x *workflowServiceGetWorkflowExecutionLogsClient) Recv() (*LogEntry, error) { + m := new(LogEntry) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *workflowServiceClient) GetWorkflowExecutionMetrics(ctx context.Context, in *GetWorkflowExecutionMetricsRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionMetricsResponse, error) { + out := new(GetWorkflowExecutionMetricsResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ResubmitWorkflowExecution(ctx context.Context, in *ResubmitWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) { + out := new(WorkflowExecution) + err := c.cc.Invoke(ctx, "/api.WorkflowService/ResubmitWorkflowExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) TerminateWorkflowExecution(ctx context.Context, in *TerminateWorkflowExecutionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkflowService/TerminateWorkflowExecution", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) GetArtifact(ctx context.Context, in *GetArtifactRequest, opts ...grpc.CallOption) (*ArtifactResponse, error) { + out := new(ArtifactResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/GetArtifact", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) { + out := new(ListFilesResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/ListFiles", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) AddWorkflowExecutionStatistics(ctx context.Context, in *AddWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkflowService/AddWorkflowExecutionStatistics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) CronStartWorkflowExecutionStatistic(ctx context.Context, in *CronStartWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkflowService/CronStartWorkflowExecutionStatistic", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkflowService/UpdateWorkflowExecutionStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) { + out := new(WorkflowExecutionsMetricsResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/AddWorkflowExecutionMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowServiceClient) UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) { + out := new(WorkflowExecutionsMetricsResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowService/UpdateWorkflowExecutionMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WorkflowServiceServer is the server API for WorkflowService service. +// All implementations must embed UnimplementedWorkflowServiceServer +// for forward compatibility +type WorkflowServiceServer interface { + // Creates a Workflow + CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error) + // Clone a Workflow. This is the same as running it again. + CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error) + GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) + GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error) + ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) + WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error + GetWorkflowExecutionLogs(*GetWorkflowExecutionLogsRequest, WorkflowService_GetWorkflowExecutionLogsServer) error + GetWorkflowExecutionMetrics(context.Context, *GetWorkflowExecutionMetricsRequest) (*GetWorkflowExecutionMetricsResponse, error) + ResubmitWorkflowExecution(context.Context, *ResubmitWorkflowExecutionRequest) (*WorkflowExecution, error) + TerminateWorkflowExecution(context.Context, *TerminateWorkflowExecutionRequest) (*emptypb.Empty, error) + GetArtifact(context.Context, *GetArtifactRequest) (*ArtifactResponse, error) + ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) + AddWorkflowExecutionStatistics(context.Context, *AddWorkflowExecutionStatisticRequest) (*emptypb.Empty, error) + CronStartWorkflowExecutionStatistic(context.Context, *CronStartWorkflowExecutionStatisticRequest) (*emptypb.Empty, error) + UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*emptypb.Empty, error) + AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) + UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) + mustEmbedUnimplementedWorkflowServiceServer() +} + +// UnimplementedWorkflowServiceServer must be embedded to have forward compatible implementations. +type UnimplementedWorkflowServiceServer struct { +} + +func (UnimplementedWorkflowServiceServer) CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowExecution not implemented") +} +func (UnimplementedWorkflowServiceServer) CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowExecution not implemented") +} +func (UnimplementedWorkflowServiceServer) GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionStatisticsForNamespace not implemented") +} +func (UnimplementedWorkflowServiceServer) GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecution not implemented") +} +func (UnimplementedWorkflowServiceServer) ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowExecutions not implemented") +} +func (UnimplementedWorkflowServiceServer) WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error { + return status.Errorf(codes.Unimplemented, "method WatchWorkflowExecution not implemented") +} +func (UnimplementedWorkflowServiceServer) GetWorkflowExecutionLogs(*GetWorkflowExecutionLogsRequest, WorkflowService_GetWorkflowExecutionLogsServer) error { + return status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionLogs not implemented") +} +func (UnimplementedWorkflowServiceServer) GetWorkflowExecutionMetrics(context.Context, *GetWorkflowExecutionMetricsRequest) (*GetWorkflowExecutionMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionMetrics not implemented") +} +func (UnimplementedWorkflowServiceServer) ResubmitWorkflowExecution(context.Context, *ResubmitWorkflowExecutionRequest) (*WorkflowExecution, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResubmitWorkflowExecution not implemented") +} +func (UnimplementedWorkflowServiceServer) TerminateWorkflowExecution(context.Context, *TerminateWorkflowExecutionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method TerminateWorkflowExecution not implemented") +} +func (UnimplementedWorkflowServiceServer) GetArtifact(context.Context, *GetArtifactRequest) (*ArtifactResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetArtifact not implemented") +} +func (UnimplementedWorkflowServiceServer) ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFiles not implemented") +} +func (UnimplementedWorkflowServiceServer) AddWorkflowExecutionStatistics(context.Context, *AddWorkflowExecutionStatisticRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddWorkflowExecutionStatistics not implemented") +} +func (UnimplementedWorkflowServiceServer) CronStartWorkflowExecutionStatistic(context.Context, *CronStartWorkflowExecutionStatisticRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CronStartWorkflowExecutionStatistic not implemented") +} +func (UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionStatus not implemented") +} +func (UnimplementedWorkflowServiceServer) AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddWorkflowExecutionMetrics not implemented") +} +func (UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionMetrics not implemented") +} +func (UnimplementedWorkflowServiceServer) mustEmbedUnimplementedWorkflowServiceServer() {} + +// UnsafeWorkflowServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WorkflowServiceServer will +// result in compilation errors. +type UnsafeWorkflowServiceServer interface { + mustEmbedUnimplementedWorkflowServiceServer() +} + +func RegisterWorkflowServiceServer(s grpc.ServiceRegistrar, srv WorkflowServiceServer) { + s.RegisterService(&_WorkflowService_serviceDesc, srv) +} + +func _WorkflowService_CreateWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkflowExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).CreateWorkflowExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/CreateWorkflowExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).CreateWorkflowExecution(ctx, req.(*CreateWorkflowExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_CloneWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloneWorkflowExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).CloneWorkflowExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/CloneWorkflowExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).CloneWorkflowExecution(ctx, req.(*CloneWorkflowExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkflowExecutionStatisticsForNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, req.(*GetWorkflowExecutionStatisticsForNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_GetWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkflowExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).GetWorkflowExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/GetWorkflowExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).GetWorkflowExecution(ctx, req.(*GetWorkflowExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListWorkflowExecutions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkflowExecutionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListWorkflowExecutions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/ListWorkflowExecutions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListWorkflowExecutions(ctx, req.(*ListWorkflowExecutionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_WatchWorkflowExecution_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(WatchWorkflowExecutionRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(WorkflowServiceServer).WatchWorkflowExecution(m, &workflowServiceWatchWorkflowExecutionServer{stream}) +} + +type WorkflowService_WatchWorkflowExecutionServer interface { + Send(*WorkflowExecution) error + grpc.ServerStream +} + +type workflowServiceWatchWorkflowExecutionServer struct { + grpc.ServerStream +} + +func (x *workflowServiceWatchWorkflowExecutionServer) Send(m *WorkflowExecution) error { + return x.ServerStream.SendMsg(m) +} + +func _WorkflowService_GetWorkflowExecutionLogs_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetWorkflowExecutionLogsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(WorkflowServiceServer).GetWorkflowExecutionLogs(m, &workflowServiceGetWorkflowExecutionLogsServer{stream}) +} + +type WorkflowService_GetWorkflowExecutionLogsServer interface { + Send(*LogEntry) error + grpc.ServerStream +} + +type workflowServiceGetWorkflowExecutionLogsServer struct { + grpc.ServerStream +} + +func (x *workflowServiceGetWorkflowExecutionLogsServer) Send(m *LogEntry) error { + return x.ServerStream.SendMsg(m) +} + +func _WorkflowService_GetWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkflowExecutionMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).GetWorkflowExecutionMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/GetWorkflowExecutionMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).GetWorkflowExecutionMetrics(ctx, req.(*GetWorkflowExecutionMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ResubmitWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResubmitWorkflowExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ResubmitWorkflowExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/ResubmitWorkflowExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ResubmitWorkflowExecution(ctx, req.(*ResubmitWorkflowExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_TerminateWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TerminateWorkflowExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).TerminateWorkflowExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/TerminateWorkflowExecution", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).TerminateWorkflowExecution(ctx, req.(*TerminateWorkflowExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_GetArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetArtifactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).GetArtifact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/GetArtifact", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).GetArtifact(ctx, req.(*GetArtifactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_ListFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).ListFiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/ListFiles", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).ListFiles(ctx, req.(*ListFilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_AddWorkflowExecutionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddWorkflowExecutionStatisticRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).AddWorkflowExecutionStatistics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/AddWorkflowExecutionStatistics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).AddWorkflowExecutionStatistics(ctx, req.(*AddWorkflowExecutionStatisticRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_CronStartWorkflowExecutionStatistic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CronStartWorkflowExecutionStatisticRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).CronStartWorkflowExecutionStatistic(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/CronStartWorkflowExecutionStatistic", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).CronStartWorkflowExecutionStatistic(ctx, req.(*CronStartWorkflowExecutionStatisticRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_UpdateWorkflowExecutionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkflowExecutionStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).UpdateWorkflowExecutionStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/UpdateWorkflowExecutionStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).UpdateWorkflowExecutionStatus(ctx, req.(*UpdateWorkflowExecutionStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_AddWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddWorkflowExecutionsMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).AddWorkflowExecutionMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/AddWorkflowExecutionMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).AddWorkflowExecutionMetrics(ctx, req.(*AddWorkflowExecutionsMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowService_UpdateWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkflowExecutionsMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowServiceServer).UpdateWorkflowExecutionMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowService/UpdateWorkflowExecutionMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowServiceServer).UpdateWorkflowExecutionMetrics(ctx, req.(*UpdateWorkflowExecutionsMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _WorkflowService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.WorkflowService", + HandlerType: (*WorkflowServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateWorkflowExecution", + Handler: _WorkflowService_CreateWorkflowExecution_Handler, + }, + { + MethodName: "CloneWorkflowExecution", + Handler: _WorkflowService_CloneWorkflowExecution_Handler, + }, + { + MethodName: "GetWorkflowExecutionStatisticsForNamespace", + Handler: _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler, + }, + { + MethodName: "GetWorkflowExecution", + Handler: _WorkflowService_GetWorkflowExecution_Handler, + }, + { + MethodName: "ListWorkflowExecutions", + Handler: _WorkflowService_ListWorkflowExecutions_Handler, + }, + { + MethodName: "GetWorkflowExecutionMetrics", + Handler: _WorkflowService_GetWorkflowExecutionMetrics_Handler, + }, + { + MethodName: "ResubmitWorkflowExecution", + Handler: _WorkflowService_ResubmitWorkflowExecution_Handler, + }, + { + MethodName: "TerminateWorkflowExecution", + Handler: _WorkflowService_TerminateWorkflowExecution_Handler, + }, + { + MethodName: "GetArtifact", + Handler: _WorkflowService_GetArtifact_Handler, + }, + { + MethodName: "ListFiles", + Handler: _WorkflowService_ListFiles_Handler, + }, + { + MethodName: "AddWorkflowExecutionStatistics", + Handler: _WorkflowService_AddWorkflowExecutionStatistics_Handler, + }, + { + MethodName: "CronStartWorkflowExecutionStatistic", + Handler: _WorkflowService_CronStartWorkflowExecutionStatistic_Handler, + }, + { + MethodName: "UpdateWorkflowExecutionStatus", + Handler: _WorkflowService_UpdateWorkflowExecutionStatus_Handler, + }, + { + MethodName: "AddWorkflowExecutionMetrics", + Handler: _WorkflowService_AddWorkflowExecutionMetrics_Handler, + }, + { + MethodName: "UpdateWorkflowExecutionMetrics", + Handler: _WorkflowService_UpdateWorkflowExecutionMetrics_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "WatchWorkflowExecution", + Handler: _WorkflowService_WatchWorkflowExecution_Handler, + ServerStreams: true, + }, + { + StreamName: "GetWorkflowExecutionLogs", + Handler: _WorkflowService_GetWorkflowExecutionLogs_Handler, + ServerStreams: true, + }, + }, + Metadata: "workflow.proto", +} diff --git a/api/gen/workflow_template.pb.go b/api/gen/workflow_template.pb.go new file mode 100644 index 00000000..7321f16d --- /dev/null +++ b/api/gen/workflow_template.pb.go @@ -0,0 +1,1471 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: workflow_template.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CreateWorkflowTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,2,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` +} + +func (x *CreateWorkflowTemplateRequest) Reset() { + *x = CreateWorkflowTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkflowTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkflowTemplateRequest) ProtoMessage() {} + +func (x *CreateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 CreateWorkflowTemplateRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkflowTemplateRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateWorkflowTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateWorkflowTemplateRequest) GetWorkflowTemplate() *WorkflowTemplate { + if x != nil { + return x.WorkflowTemplate + } + return nil +} + +type UpdateWorkflowTemplateVersionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,2,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` +} + +func (x *UpdateWorkflowTemplateVersionRequest) Reset() { + *x = UpdateWorkflowTemplateVersionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkflowTemplateVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkflowTemplateVersionRequest) ProtoMessage() {} + +func (x *UpdateWorkflowTemplateVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 UpdateWorkflowTemplateVersionRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkflowTemplateVersionRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{1} +} + +func (x *UpdateWorkflowTemplateVersionRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateWorkflowTemplateVersionRequest) GetWorkflowTemplate() *WorkflowTemplate { + if x != nil { + return x.WorkflowTemplate + } + return nil +} + +type GetWorkflowTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *GetWorkflowTemplateRequest) Reset() { + *x = GetWorkflowTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowTemplateRequest) ProtoMessage() {} + +func (x *GetWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 GetWorkflowTemplateRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowTemplateRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{2} +} + +func (x *GetWorkflowTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkflowTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GetWorkflowTemplateRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type CloneWorkflowTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *CloneWorkflowTemplateRequest) Reset() { + *x = CloneWorkflowTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CloneWorkflowTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloneWorkflowTemplateRequest) ProtoMessage() {} + +func (x *CloneWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 CloneWorkflowTemplateRequest.ProtoReflect.Descriptor instead. +func (*CloneWorkflowTemplateRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{3} +} + +func (x *CloneWorkflowTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CloneWorkflowTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *CloneWorkflowTemplateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CloneWorkflowTemplateRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type ListWorkflowTemplateVersionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ListWorkflowTemplateVersionsRequest) Reset() { + *x = ListWorkflowTemplateVersionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowTemplateVersionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowTemplateVersionsRequest) ProtoMessage() {} + +func (x *ListWorkflowTemplateVersionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 ListWorkflowTemplateVersionsRequest.ProtoReflect.Descriptor instead. +func (*ListWorkflowTemplateVersionsRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{4} +} + +func (x *ListWorkflowTemplateVersionsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListWorkflowTemplateVersionsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ListWorkflowTemplateVersionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,2,rep,name=workflowTemplates,proto3" json:"workflowTemplates,omitempty"` +} + +func (x *ListWorkflowTemplateVersionsResponse) Reset() { + *x = ListWorkflowTemplateVersionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowTemplateVersionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowTemplateVersionsResponse) ProtoMessage() {} + +func (x *ListWorkflowTemplateVersionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 ListWorkflowTemplateVersionsResponse.ProtoReflect.Descriptor instead. +func (*ListWorkflowTemplateVersionsResponse) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{5} +} + +func (x *ListWorkflowTemplateVersionsResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListWorkflowTemplateVersionsResponse) GetWorkflowTemplates() []*WorkflowTemplate { + if x != nil { + return x.WorkflowTemplates + } + return nil +} + +type ListWorkflowTemplatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Labels string `protobuf:"bytes,4,opt,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *ListWorkflowTemplatesRequest) Reset() { + *x = ListWorkflowTemplatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowTemplatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowTemplatesRequest) ProtoMessage() {} + +func (x *ListWorkflowTemplatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 ListWorkflowTemplatesRequest.ProtoReflect.Descriptor instead. +func (*ListWorkflowTemplatesRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{6} +} + +func (x *ListWorkflowTemplatesRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListWorkflowTemplatesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkflowTemplatesRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkflowTemplatesRequest) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +type ListWorkflowTemplatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkflowTemplates []*WorkflowTemplate `protobuf:"bytes,2,rep,name=workflowTemplates,proto3" json:"workflowTemplates,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` +} + +func (x *ListWorkflowTemplatesResponse) Reset() { + *x = ListWorkflowTemplatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowTemplatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowTemplatesResponse) ProtoMessage() {} + +func (x *ListWorkflowTemplatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 ListWorkflowTemplatesResponse.ProtoReflect.Descriptor instead. +func (*ListWorkflowTemplatesResponse) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{7} +} + +func (x *ListWorkflowTemplatesResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListWorkflowTemplatesResponse) GetWorkflowTemplates() []*WorkflowTemplate { + if x != nil { + return x.WorkflowTemplates + } + return nil +} + +func (x *ListWorkflowTemplatesResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkflowTemplatesResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListWorkflowTemplatesResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +func (x *ListWorkflowTemplatesResponse) GetTotalAvailableCount() int32 { + if x != nil { + return x.TotalAvailableCount + } + return 0 +} + +type ArchiveWorkflowTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ArchiveWorkflowTemplateRequest) Reset() { + *x = ArchiveWorkflowTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveWorkflowTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveWorkflowTemplateRequest) ProtoMessage() {} + +func (x *ArchiveWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 ArchiveWorkflowTemplateRequest.ProtoReflect.Descriptor instead. +func (*ArchiveWorkflowTemplateRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{8} +} + +func (x *ArchiveWorkflowTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ArchiveWorkflowTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ArchiveWorkflowTemplateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,1,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` +} + +func (x *ArchiveWorkflowTemplateResponse) Reset() { + *x = ArchiveWorkflowTemplateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveWorkflowTemplateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveWorkflowTemplateResponse) ProtoMessage() {} + +func (x *ArchiveWorkflowTemplateResponse) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 ArchiveWorkflowTemplateResponse.ProtoReflect.Descriptor instead. +func (*ArchiveWorkflowTemplateResponse) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{9} +} + +func (x *ArchiveWorkflowTemplateResponse) GetWorkflowTemplate() *WorkflowTemplate { + if x != nil { + return x.WorkflowTemplate + } + return nil +} + +type WorkflowExecutionStatisticReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + LastExecuted string `protobuf:"bytes,2,opt,name=lastExecuted,proto3" json:"lastExecuted,omitempty"` + Running int32 `protobuf:"varint,3,opt,name=running,proto3" json:"running,omitempty"` + Completed int32 `protobuf:"varint,4,opt,name=completed,proto3" json:"completed,omitempty"` + Failed int32 `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"` + Terminated int32 `protobuf:"varint,6,opt,name=terminated,proto3" json:"terminated,omitempty"` +} + +func (x *WorkflowExecutionStatisticReport) Reset() { + *x = WorkflowExecutionStatisticReport{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowExecutionStatisticReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowExecutionStatisticReport) ProtoMessage() {} + +func (x *WorkflowExecutionStatisticReport) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 WorkflowExecutionStatisticReport.ProtoReflect.Descriptor instead. +func (*WorkflowExecutionStatisticReport) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{10} +} + +func (x *WorkflowExecutionStatisticReport) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *WorkflowExecutionStatisticReport) GetLastExecuted() string { + if x != nil { + return x.LastExecuted + } + return "" +} + +func (x *WorkflowExecutionStatisticReport) GetRunning() int32 { + if x != nil { + return x.Running + } + return 0 +} + +func (x *WorkflowExecutionStatisticReport) GetCompleted() int32 { + if x != nil { + return x.Completed + } + return 0 +} + +func (x *WorkflowExecutionStatisticReport) GetFailed() int32 { + if x != nil { + return x.Failed + } + return 0 +} + +func (x *WorkflowExecutionStatisticReport) GetTerminated() int32 { + if x != nil { + return x.Terminated + } + return 0 +} + +type CronWorkflowStatisticsReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` +} + +func (x *CronWorkflowStatisticsReport) Reset() { + *x = CronWorkflowStatisticsReport{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CronWorkflowStatisticsReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CronWorkflowStatisticsReport) ProtoMessage() {} + +func (x *CronWorkflowStatisticsReport) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 CronWorkflowStatisticsReport.ProtoReflect.Descriptor instead. +func (*CronWorkflowStatisticsReport) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{11} +} + +func (x *CronWorkflowStatisticsReport) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +type WorkflowTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreatedAt string `protobuf:"bytes,1,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + ModifiedAt string `protobuf:"bytes,2,opt,name=modifiedAt,proto3" json:"modifiedAt,omitempty"` + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Version int64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + Versions int64 `protobuf:"varint,6,opt,name=versions,proto3" json:"versions,omitempty"` + Manifest string `protobuf:"bytes,7,opt,name=manifest,proto3" json:"manifest,omitempty"` + IsLatest bool `protobuf:"varint,8,opt,name=isLatest,proto3" json:"isLatest,omitempty"` + IsArchived bool `protobuf:"varint,9,opt,name=isArchived,proto3" json:"isArchived,omitempty"` + Labels []*KeyValue `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty"` + Stats *WorkflowExecutionStatisticReport `protobuf:"bytes,11,opt,name=stats,proto3" json:"stats,omitempty"` + CronStats *CronWorkflowStatisticsReport `protobuf:"bytes,12,opt,name=cronStats,proto3" json:"cronStats,omitempty"` + Parameters []*Parameter `protobuf:"bytes,13,rep,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *WorkflowTemplate) Reset() { + *x = WorkflowTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowTemplate) ProtoMessage() {} + +func (x *WorkflowTemplate) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 WorkflowTemplate.ProtoReflect.Descriptor instead. +func (*WorkflowTemplate) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{12} +} + +func (x *WorkflowTemplate) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *WorkflowTemplate) GetModifiedAt() string { + if x != nil { + return x.ModifiedAt + } + return "" +} + +func (x *WorkflowTemplate) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *WorkflowTemplate) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkflowTemplate) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *WorkflowTemplate) GetVersions() int64 { + if x != nil { + return x.Versions + } + return 0 +} + +func (x *WorkflowTemplate) GetManifest() string { + if x != nil { + return x.Manifest + } + return "" +} + +func (x *WorkflowTemplate) GetIsLatest() bool { + if x != nil { + return x.IsLatest + } + return false +} + +func (x *WorkflowTemplate) GetIsArchived() bool { + if x != nil { + return x.IsArchived + } + return false +} + +func (x *WorkflowTemplate) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +func (x *WorkflowTemplate) GetStats() *WorkflowExecutionStatisticReport { + if x != nil { + return x.Stats + } + return nil +} + +func (x *WorkflowTemplate) GetCronStats() *CronWorkflowStatisticsReport { + if x != nil { + return x.CronStats + } + return nil +} + +func (x *WorkflowTemplate) GetParameters() []*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +type GetWorkflowTemplateLabelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *GetWorkflowTemplateLabelsRequest) Reset() { + *x = GetWorkflowTemplateLabelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workflow_template_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowTemplateLabelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowTemplateLabelsRequest) ProtoMessage() {} + +func (x *GetWorkflowTemplateLabelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workflow_template_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 GetWorkflowTemplateLabelsRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowTemplateLabelsRequest) Descriptor() ([]byte, []int) { + return file_workflow_template_proto_rawDescGZIP(), []int{13} +} + +func (x *GetWorkflowTemplateLabelsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkflowTemplateLabelsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetWorkflowTemplateLabelsRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +var File_workflow_template_proto protoreflect.FileDescriptor + +var file_workflow_template_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x24, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x1c, + 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x23, 0x4c, 0x69, + 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x81, 0x01, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x43, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x70, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xf6, 0x01, 0x0a, + 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x50, 0x0a, 0x1e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x1f, 0x41, 0x72, 0x63, 0x68, 0x69, + 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xcc, 0x01, + 0x0a, 0x20, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6c, 0x61, 0x73, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x22, 0x34, 0x0a, 0x1c, + 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x22, 0xd9, 0x03, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, + 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, + 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x6e, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xbb, + 0x0a, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x16, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x22, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xc2, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x22, 0x4c, 0x2f, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x75, 0x69, + 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x10, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xd3, 0x01, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7d, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x5a, 0x47, 0x12, 0x45, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, + 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xe9, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x95, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x8e, 0x01, 0x12, 0x3f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x5a, 0x4b, 0x12, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6c, 0x6f, 0x6e, 0x65, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, + 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, + 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, 0x24, 0x5a, 0x22, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, + 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_workflow_template_proto_rawDescOnce sync.Once + file_workflow_template_proto_rawDescData = file_workflow_template_proto_rawDesc +) + +func file_workflow_template_proto_rawDescGZIP() []byte { + file_workflow_template_proto_rawDescOnce.Do(func() { + file_workflow_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_workflow_template_proto_rawDescData) + }) + return file_workflow_template_proto_rawDescData +} + +var file_workflow_template_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_workflow_template_proto_goTypes = []interface{}{ + (*CreateWorkflowTemplateRequest)(nil), // 0: api.CreateWorkflowTemplateRequest + (*UpdateWorkflowTemplateVersionRequest)(nil), // 1: api.UpdateWorkflowTemplateVersionRequest + (*GetWorkflowTemplateRequest)(nil), // 2: api.GetWorkflowTemplateRequest + (*CloneWorkflowTemplateRequest)(nil), // 3: api.CloneWorkflowTemplateRequest + (*ListWorkflowTemplateVersionsRequest)(nil), // 4: api.ListWorkflowTemplateVersionsRequest + (*ListWorkflowTemplateVersionsResponse)(nil), // 5: api.ListWorkflowTemplateVersionsResponse + (*ListWorkflowTemplatesRequest)(nil), // 6: api.ListWorkflowTemplatesRequest + (*ListWorkflowTemplatesResponse)(nil), // 7: api.ListWorkflowTemplatesResponse + (*ArchiveWorkflowTemplateRequest)(nil), // 8: api.ArchiveWorkflowTemplateRequest + (*ArchiveWorkflowTemplateResponse)(nil), // 9: api.ArchiveWorkflowTemplateResponse + (*WorkflowExecutionStatisticReport)(nil), // 10: api.WorkflowExecutionStatisticReport + (*CronWorkflowStatisticsReport)(nil), // 11: api.CronWorkflowStatisticsReport + (*WorkflowTemplate)(nil), // 12: api.WorkflowTemplate + (*GetWorkflowTemplateLabelsRequest)(nil), // 13: api.GetWorkflowTemplateLabelsRequest + (*KeyValue)(nil), // 14: api.KeyValue + (*Parameter)(nil), // 15: api.Parameter +} +var file_workflow_template_proto_depIdxs = []int32{ + 12, // 0: api.CreateWorkflowTemplateRequest.workflowTemplate:type_name -> api.WorkflowTemplate + 12, // 1: api.UpdateWorkflowTemplateVersionRequest.workflowTemplate:type_name -> api.WorkflowTemplate + 12, // 2: api.ListWorkflowTemplateVersionsResponse.workflowTemplates:type_name -> api.WorkflowTemplate + 12, // 3: api.ListWorkflowTemplatesResponse.workflowTemplates:type_name -> api.WorkflowTemplate + 12, // 4: api.ArchiveWorkflowTemplateResponse.workflowTemplate:type_name -> api.WorkflowTemplate + 14, // 5: api.WorkflowTemplate.labels:type_name -> api.KeyValue + 10, // 6: api.WorkflowTemplate.stats:type_name -> api.WorkflowExecutionStatisticReport + 11, // 7: api.WorkflowTemplate.cronStats:type_name -> api.CronWorkflowStatisticsReport + 15, // 8: api.WorkflowTemplate.parameters:type_name -> api.Parameter + 0, // 9: api.WorkflowTemplateService.CreateWorkflowTemplate:input_type -> api.CreateWorkflowTemplateRequest + 0, // 10: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:input_type -> api.CreateWorkflowTemplateRequest + 2, // 11: api.WorkflowTemplateService.GetWorkflowTemplate:input_type -> api.GetWorkflowTemplateRequest + 4, // 12: api.WorkflowTemplateService.ListWorkflowTemplateVersions:input_type -> api.ListWorkflowTemplateVersionsRequest + 6, // 13: api.WorkflowTemplateService.ListWorkflowTemplates:input_type -> api.ListWorkflowTemplatesRequest + 3, // 14: api.WorkflowTemplateService.CloneWorkflowTemplate:input_type -> api.CloneWorkflowTemplateRequest + 8, // 15: api.WorkflowTemplateService.ArchiveWorkflowTemplate:input_type -> api.ArchiveWorkflowTemplateRequest + 12, // 16: api.WorkflowTemplateService.CreateWorkflowTemplate:output_type -> api.WorkflowTemplate + 12, // 17: api.WorkflowTemplateService.CreateWorkflowTemplateVersion:output_type -> api.WorkflowTemplate + 12, // 18: api.WorkflowTemplateService.GetWorkflowTemplate:output_type -> api.WorkflowTemplate + 5, // 19: api.WorkflowTemplateService.ListWorkflowTemplateVersions:output_type -> api.ListWorkflowTemplateVersionsResponse + 7, // 20: api.WorkflowTemplateService.ListWorkflowTemplates:output_type -> api.ListWorkflowTemplatesResponse + 12, // 21: api.WorkflowTemplateService.CloneWorkflowTemplate:output_type -> api.WorkflowTemplate + 9, // 22: api.WorkflowTemplateService.ArchiveWorkflowTemplate:output_type -> api.ArchiveWorkflowTemplateResponse + 16, // [16:23] is the sub-list for method output_type + 9, // [9:16] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_workflow_template_proto_init() } +func file_workflow_template_proto_init() { + if File_workflow_template_proto != nil { + return + } + file_label_proto_init() + file_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_workflow_template_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkflowTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkflowTemplateVersionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloneWorkflowTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowTemplateVersionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowTemplateVersionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowTemplatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowTemplatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArchiveWorkflowTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArchiveWorkflowTemplateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowExecutionStatisticReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CronWorkflowStatisticsReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workflow_template_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowTemplateLabelsRequest); 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_workflow_template_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_workflow_template_proto_goTypes, + DependencyIndexes: file_workflow_template_proto_depIdxs, + MessageInfos: file_workflow_template_proto_msgTypes, + }.Build() + File_workflow_template_proto = out.File + file_workflow_template_proto_rawDesc = nil + file_workflow_template_proto_goTypes = nil + file_workflow_template_proto_depIdxs = nil +} diff --git a/api/gen/workflow_template.pb.gw.go b/api/gen/workflow_template.pb.gw.go new file mode 100644 index 00000000..ea015434 --- /dev/null +++ b/api/gen/workflow_template.pb.gw.go @@ -0,0 +1,1283 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: workflow_template.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.CreateWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["workflowTemplate.uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflowTemplate.uid") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "workflowTemplate.uid", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflowTemplate.uid", err) + } + + msg, err := client.CreateWorkflowTemplateVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkflowTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["workflowTemplate.uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "workflowTemplate.uid") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "workflowTemplate.uid", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflowTemplate.uid", err) + } + + msg, err := server.CreateWorkflowTemplateVersion(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkflowTemplateService_GetWorkflowTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_WorkflowTemplateService_GetWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_GetWorkflowTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_GetWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_GetWorkflowTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowTemplateService_GetWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + msg, err := client.GetWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_GetWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + msg, err := server.GetWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkflowTemplateVersionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ListWorkflowTemplateVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkflowTemplateVersionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ListWorkflowTemplateVersions(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkflowTemplateService_ListWorkflowTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_WorkflowTemplateService_ListWorkflowTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkflowTemplatesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_ListWorkflowTemplates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListWorkflowTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_ListWorkflowTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkflowTemplatesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_ListWorkflowTemplates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListWorkflowTemplates(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkflowTemplateService_CloneWorkflowTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1, "name": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} +) + +func request_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CloneWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_CloneWorkflowTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CloneWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CloneWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowTemplateService_CloneWorkflowTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CloneWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CloneWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + msg, err := client.CloneWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CloneWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.Int64(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + msg, err := server.CloneWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ArchiveWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ArchiveWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterWorkflowTemplateServiceHandlerServer registers the http handlers for service WorkflowTemplateService to "mux". +// UnaryRPC :call WorkflowTemplateServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkflowTemplateServiceHandlerFromEndpoint instead. +func RegisterWorkflowTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkflowTemplateServiceServer) error { + + mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/CreateWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_CreateWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplateVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/GetWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_GetWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_GetWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/GetWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_GetWorkflowTemplate_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_GetWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/ListWorkflowTemplateVersions") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/ListWorkflowTemplates") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_ListWorkflowTemplates_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_ListWorkflowTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/CloneWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_CloneWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/CloneWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_CloneWorkflowTemplate_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkflowTemplateService/ArchiveWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterWorkflowTemplateServiceHandlerFromEndpoint is same as RegisterWorkflowTemplateServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWorkflowTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWorkflowTemplateServiceHandler(ctx, mux, conn) +} + +// RegisterWorkflowTemplateServiceHandler registers the http handlers for service WorkflowTemplateService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWorkflowTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWorkflowTemplateServiceHandlerClient(ctx, mux, NewWorkflowTemplateServiceClient(conn)) +} + +// RegisterWorkflowTemplateServiceHandlerClient registers the http handlers for service WorkflowTemplateService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkflowTemplateServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkflowTemplateServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WorkflowTemplateServiceClient" to call the correct interceptors. +func RegisterWorkflowTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkflowTemplateServiceClient) error { + + mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/CreateWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_CreateWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CreateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkflowTemplateService_CreateWorkflowTemplateVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CreateWorkflowTemplateVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/GetWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_GetWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_GetWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_GetWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/GetWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_GetWorkflowTemplate_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_GetWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/ListWorkflowTemplateVersions") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_ListWorkflowTemplateVersions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_ListWorkflowTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_ListWorkflowTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/ListWorkflowTemplates") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_ListWorkflowTemplates_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_ListWorkflowTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/CloneWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_CloneWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CloneWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkflowTemplateService_CloneWorkflowTemplate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/CloneWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_CloneWorkflowTemplate_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkflowTemplateService/ArchiveWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkflowTemplateService_ArchiveWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_WorkflowTemplateService_CreateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_templates"}, "")) + + pattern_WorkflowTemplateService_CreateWorkflowTemplateVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "workflowTemplate.uid", "versions"}, "")) + + pattern_WorkflowTemplateService_GetWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid"}, "")) + + pattern_WorkflowTemplateService_GetWorkflowTemplate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "versions", "version"}, "")) + + pattern_WorkflowTemplateService_ListWorkflowTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "versions"}, "")) + + pattern_WorkflowTemplateService_ListWorkflowTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_templates"}, "")) + + pattern_WorkflowTemplateService_CloneWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "clone", "name"}, "")) + + pattern_WorkflowTemplateService_CloneWorkflowTemplate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "clone", "name", "version"}, "")) + + pattern_WorkflowTemplateService_ArchiveWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "uid", "archive"}, "")) +) + +var ( + forward_WorkflowTemplateService_CreateWorkflowTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_CreateWorkflowTemplateVersion_0 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_GetWorkflowTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_GetWorkflowTemplate_1 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_ListWorkflowTemplateVersions_0 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_ListWorkflowTemplates_0 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_CloneWorkflowTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_CloneWorkflowTemplate_1 = runtime.ForwardResponseMessage + + forward_WorkflowTemplateService_ArchiveWorkflowTemplate_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/workflow_template_grpc.pb.go b/api/gen/workflow_template_grpc.pb.go new file mode 100644 index 00000000..acea4528 --- /dev/null +++ b/api/gen/workflow_template_grpc.pb.go @@ -0,0 +1,314 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// WorkflowTemplateServiceClient is the client API for WorkflowTemplateService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WorkflowTemplateServiceClient interface { + CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) + CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) + GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) + ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error) + ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error) + CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) + ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error) +} + +type workflowTemplateServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWorkflowTemplateServiceClient(cc grpc.ClientConnInterface) WorkflowTemplateServiceClient { + return &workflowTemplateServiceClient{cc} +} + +func (c *workflowTemplateServiceClient) CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { + out := new(WorkflowTemplate) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CreateWorkflowTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowTemplateServiceClient) CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { + out := new(WorkflowTemplate) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowTemplateServiceClient) GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { + out := new(WorkflowTemplate) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/GetWorkflowTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowTemplateServiceClient) ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error) { + out := new(ListWorkflowTemplateVersionsResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplateVersions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowTemplateServiceClient) ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error) { + out := new(ListWorkflowTemplatesResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowTemplateServiceClient) CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { + out := new(WorkflowTemplate) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CloneWorkflowTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workflowTemplateServiceClient) ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error) { + out := new(ArchiveWorkflowTemplateResponse) + err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ArchiveWorkflowTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WorkflowTemplateServiceServer is the server API for WorkflowTemplateService service. +// All implementations must embed UnimplementedWorkflowTemplateServiceServer +// for forward compatibility +type WorkflowTemplateServiceServer interface { + CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) + CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) + GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error) + ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error) + ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error) + CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error) + ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error) + mustEmbedUnimplementedWorkflowTemplateServiceServer() +} + +// UnimplementedWorkflowTemplateServiceServer must be embedded to have forward compatible implementations. +type UnimplementedWorkflowTemplateServiceServer struct { +} + +func (UnimplementedWorkflowTemplateServiceServer) CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplate not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplateVersion not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowTemplate not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplateVersions not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplates not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowTemplate not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkflowTemplate not implemented") +} +func (UnimplementedWorkflowTemplateServiceServer) mustEmbedUnimplementedWorkflowTemplateServiceServer() { +} + +// UnsafeWorkflowTemplateServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WorkflowTemplateServiceServer will +// result in compilation errors. +type UnsafeWorkflowTemplateServiceServer interface { + mustEmbedUnimplementedWorkflowTemplateServiceServer() +} + +func RegisterWorkflowTemplateServiceServer(s grpc.ServiceRegistrar, srv WorkflowTemplateServiceServer) { + s.RegisterService(&_WorkflowTemplateService_serviceDesc, srv) +} + +func _WorkflowTemplateService_CreateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkflowTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/CreateWorkflowTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplate(ctx, req.(*CreateWorkflowTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowTemplateService_CreateWorkflowTemplateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkflowTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplateVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplateVersion(ctx, req.(*CreateWorkflowTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowTemplateService_GetWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkflowTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).GetWorkflowTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/GetWorkflowTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).GetWorkflowTemplate(ctx, req.(*GetWorkflowTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowTemplateService_ListWorkflowTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkflowTemplateVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplateVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplateVersions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplateVersions(ctx, req.(*ListWorkflowTemplateVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowTemplateService_ListWorkflowTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkflowTemplatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplates(ctx, req.(*ListWorkflowTemplatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowTemplateService_CloneWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloneWorkflowTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).CloneWorkflowTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/CloneWorkflowTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).CloneWorkflowTemplate(ctx, req.(*CloneWorkflowTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveWorkflowTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkflowTemplateServiceServer).ArchiveWorkflowTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkflowTemplateService/ArchiveWorkflowTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkflowTemplateServiceServer).ArchiveWorkflowTemplate(ctx, req.(*ArchiveWorkflowTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _WorkflowTemplateService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.WorkflowTemplateService", + HandlerType: (*WorkflowTemplateServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateWorkflowTemplate", + Handler: _WorkflowTemplateService_CreateWorkflowTemplate_Handler, + }, + { + MethodName: "CreateWorkflowTemplateVersion", + Handler: _WorkflowTemplateService_CreateWorkflowTemplateVersion_Handler, + }, + { + MethodName: "GetWorkflowTemplate", + Handler: _WorkflowTemplateService_GetWorkflowTemplate_Handler, + }, + { + MethodName: "ListWorkflowTemplateVersions", + Handler: _WorkflowTemplateService_ListWorkflowTemplateVersions_Handler, + }, + { + MethodName: "ListWorkflowTemplates", + Handler: _WorkflowTemplateService_ListWorkflowTemplates_Handler, + }, + { + MethodName: "CloneWorkflowTemplate", + Handler: _WorkflowTemplateService_CloneWorkflowTemplate_Handler, + }, + { + MethodName: "ArchiveWorkflowTemplate", + Handler: _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "workflow_template.proto", +} diff --git a/api/gen/workspace.pb.go b/api/gen/workspace.pb.go new file mode 100644 index 00000000..c50fce1c --- /dev/null +++ b/api/gen/workspace.pb.go @@ -0,0 +1,1808 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: workspace.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Workspace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + CreatedAt string `protobuf:"bytes,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + Parameters []*Parameter `protobuf:"bytes,5,rep,name=parameters,proto3" json:"parameters,omitempty"` + WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,6,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` + Status *WorkspaceStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` + Labels []*KeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` + Url string `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"` + TemplateParameters []*Parameter `protobuf:"bytes,10,rep,name=templateParameters,proto3" json:"templateParameters,omitempty"` +} + +func (x *Workspace) Reset() { + *x = Workspace{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workspace) ProtoMessage() {} + +func (x *Workspace) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 Workspace.ProtoReflect.Descriptor instead. +func (*Workspace) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{0} +} + +func (x *Workspace) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *Workspace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workspace) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Workspace) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *Workspace) GetParameters() []*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *Workspace) GetWorkspaceTemplate() *WorkspaceTemplate { + if x != nil { + return x.WorkspaceTemplate + } + return nil +} + +func (x *Workspace) GetStatus() *WorkspaceStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *Workspace) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Workspace) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Workspace) GetTemplateParameters() []*Parameter { + if x != nil { + return x.TemplateParameters + } + return nil +} + +type WorkspaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phase string `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"` + StartedAt string `protobuf:"bytes,2,opt,name=startedAt,proto3" json:"startedAt,omitempty"` + PausedAt string `protobuf:"bytes,3,opt,name=pausedAt,proto3" json:"pausedAt,omitempty"` + TerminatedAt string `protobuf:"bytes,4,opt,name=terminatedAt,proto3" json:"terminatedAt,omitempty"` +} + +func (x *WorkspaceStatus) Reset() { + *x = WorkspaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceStatus) ProtoMessage() {} + +func (x *WorkspaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 WorkspaceStatus.ProtoReflect.Descriptor instead. +func (*WorkspaceStatus) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{1} +} + +func (x *WorkspaceStatus) GetPhase() string { + if x != nil { + return x.Phase + } + return "" +} + +func (x *WorkspaceStatus) GetStartedAt() string { + if x != nil { + return x.StartedAt + } + return "" +} + +func (x *WorkspaceStatus) GetPausedAt() string { + if x != nil { + return x.PausedAt + } + return "" +} + +func (x *WorkspaceStatus) GetTerminatedAt() string { + if x != nil { + return x.TerminatedAt + } + return "" +} + +type CreateWorkspaceBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkspaceTemplateUid string `protobuf:"bytes,1,opt,name=workspaceTemplateUid,proto3" json:"workspaceTemplateUid,omitempty"` + WorkspaceTemplateVersion int64 `protobuf:"varint,2,opt,name=workspaceTemplateVersion,proto3" json:"workspaceTemplateVersion,omitempty"` + Parameters []*Parameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"` + Labels []*KeyValue `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *CreateWorkspaceBody) Reset() { + *x = CreateWorkspaceBody{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkspaceBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkspaceBody) ProtoMessage() {} + +func (x *CreateWorkspaceBody) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 CreateWorkspaceBody.ProtoReflect.Descriptor instead. +func (*CreateWorkspaceBody) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateWorkspaceBody) GetWorkspaceTemplateUid() string { + if x != nil { + return x.WorkspaceTemplateUid + } + return "" +} + +func (x *CreateWorkspaceBody) GetWorkspaceTemplateVersion() int64 { + if x != nil { + return x.WorkspaceTemplateVersion + } + return 0 +} + +func (x *CreateWorkspaceBody) GetParameters() []*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *CreateWorkspaceBody) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +type CreateWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Body *CreateWorkspaceBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *CreateWorkspaceRequest) Reset() { + *x = CreateWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkspaceRequest) ProtoMessage() {} + +func (x *CreateWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 CreateWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateWorkspaceRequest) GetBody() *CreateWorkspaceBody { + if x != nil { + return x.Body + } + return nil +} + +type GetWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *GetWorkspaceRequest) Reset() { + *x = GetWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceRequest) ProtoMessage() {} + +func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 GetWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{4} +} + +func (x *GetWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkspaceRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type UpdateWorkspaceStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Status *WorkspaceStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *UpdateWorkspaceStatusRequest) Reset() { + *x = UpdateWorkspaceStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkspaceStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkspaceStatusRequest) ProtoMessage() {} + +func (x *UpdateWorkspaceStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 UpdateWorkspaceStatusRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkspaceStatusRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateWorkspaceStatusRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateWorkspaceStatusRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UpdateWorkspaceStatusRequest) GetStatus() *WorkspaceStatus { + if x != nil { + return x.Status + } + return nil +} + +type UpdateWorkspaceBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Parameters []*Parameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"` + Labels []*KeyValue `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` +} + +func (x *UpdateWorkspaceBody) Reset() { + *x = UpdateWorkspaceBody{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkspaceBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkspaceBody) ProtoMessage() {} + +func (x *UpdateWorkspaceBody) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 UpdateWorkspaceBody.ProtoReflect.Descriptor instead. +func (*UpdateWorkspaceBody) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateWorkspaceBody) GetParameters() []*Parameter { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *UpdateWorkspaceBody) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +type UpdateWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Body *UpdateWorkspaceBody `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *UpdateWorkspaceRequest) Reset() { + *x = UpdateWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkspaceRequest) ProtoMessage() {} + +func (x *UpdateWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 UpdateWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateWorkspaceRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UpdateWorkspaceRequest) GetBody() *UpdateWorkspaceBody { + if x != nil { + return x.Body + } + return nil +} + +type ListWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` + Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"` + Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"` +} + +func (x *ListWorkspaceRequest) Reset() { + *x = ListWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspaceRequest) ProtoMessage() {} + +func (x *ListWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 ListWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{8} +} + +func (x *ListWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListWorkspaceRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkspaceRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkspaceRequest) GetOrder() string { + if x != nil { + return x.Order + } + return "" +} + +func (x *ListWorkspaceRequest) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *ListWorkspaceRequest) GetPhase() string { + if x != nil { + return x.Phase + } + return "" +} + +type ListWorkspaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + Workspaces []*Workspace `protobuf:"bytes,2,rep,name=workspaces,proto3" json:"workspaces,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` + TotalAvailableCount int32 `protobuf:"varint,6,opt,name=totalAvailableCount,proto3" json:"totalAvailableCount,omitempty"` +} + +func (x *ListWorkspaceResponse) Reset() { + *x = ListWorkspaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspaceResponse) ProtoMessage() {} + +func (x *ListWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 ListWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{9} +} + +func (x *ListWorkspaceResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListWorkspaceResponse) GetWorkspaces() []*Workspace { + if x != nil { + return x.Workspaces + } + return nil +} + +func (x *ListWorkspaceResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkspaceResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListWorkspaceResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +func (x *ListWorkspaceResponse) GetTotalAvailableCount() int32 { + if x != nil { + return x.TotalAvailableCount + } + return 0 +} + +type PauseWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *PauseWorkspaceRequest) Reset() { + *x = PauseWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PauseWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PauseWorkspaceRequest) ProtoMessage() {} + +func (x *PauseWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 PauseWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*PauseWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{10} +} + +func (x *PauseWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *PauseWorkspaceRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ResumeWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ResumeWorkspaceRequest) Reset() { + *x = ResumeWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResumeWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResumeWorkspaceRequest) ProtoMessage() {} + +func (x *ResumeWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 ResumeWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*ResumeWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{11} +} + +func (x *ResumeWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ResumeWorkspaceRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type DeleteWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *DeleteWorkspaceRequest) Reset() { + *x = DeleteWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteWorkspaceRequest) ProtoMessage() {} + +func (x *DeleteWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 DeleteWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*DeleteWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{12} +} + +func (x *DeleteWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DeleteWorkspaceRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type RetryActionWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *RetryActionWorkspaceRequest) Reset() { + *x = RetryActionWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RetryActionWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RetryActionWorkspaceRequest) ProtoMessage() {} + +func (x *RetryActionWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 RetryActionWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*RetryActionWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{13} +} + +func (x *RetryActionWorkspaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *RetryActionWorkspaceRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type WorkspaceStatisticReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + LastCreated string `protobuf:"bytes,2,opt,name=lastCreated,proto3" json:"lastCreated,omitempty"` + Launching int32 `protobuf:"varint,3,opt,name=launching,proto3" json:"launching,omitempty"` + Running int32 `protobuf:"varint,4,opt,name=running,proto3" json:"running,omitempty"` + Updating int32 `protobuf:"varint,5,opt,name=updating,proto3" json:"updating,omitempty"` + Pausing int32 `protobuf:"varint,6,opt,name=pausing,proto3" json:"pausing,omitempty"` + Paused int32 `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"` + Terminating int32 `protobuf:"varint,8,opt,name=terminating,proto3" json:"terminating,omitempty"` + Terminated int32 `protobuf:"varint,9,opt,name=terminated,proto3" json:"terminated,omitempty"` + FailedToPause int32 `protobuf:"varint,10,opt,name=failedToPause,proto3" json:"failedToPause,omitempty"` + FailedToResume int32 `protobuf:"varint,11,opt,name=failedToResume,proto3" json:"failedToResume,omitempty"` + FailedToTerminate int32 `protobuf:"varint,12,opt,name=failedToTerminate,proto3" json:"failedToTerminate,omitempty"` + FailedToLaunch int32 `protobuf:"varint,13,opt,name=failedToLaunch,proto3" json:"failedToLaunch,omitempty"` + FailedToUpdate int32 `protobuf:"varint,14,opt,name=failedToUpdate,proto3" json:"failedToUpdate,omitempty"` + Failed int32 `protobuf:"varint,15,opt,name=failed,proto3" json:"failed,omitempty"` +} + +func (x *WorkspaceStatisticReport) Reset() { + *x = WorkspaceStatisticReport{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceStatisticReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceStatisticReport) ProtoMessage() {} + +func (x *WorkspaceStatisticReport) ProtoReflect() protoreflect.Message { + mi := &file_workspace_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 WorkspaceStatisticReport.ProtoReflect.Descriptor instead. +func (*WorkspaceStatisticReport) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{14} +} + +func (x *WorkspaceStatisticReport) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetLastCreated() string { + if x != nil { + return x.LastCreated + } + return "" +} + +func (x *WorkspaceStatisticReport) GetLaunching() int32 { + if x != nil { + return x.Launching + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetRunning() int32 { + if x != nil { + return x.Running + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetUpdating() int32 { + if x != nil { + return x.Updating + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetPausing() int32 { + if x != nil { + return x.Pausing + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetPaused() int32 { + if x != nil { + return x.Paused + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetTerminating() int32 { + if x != nil { + return x.Terminating + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetTerminated() int32 { + if x != nil { + return x.Terminated + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetFailedToPause() int32 { + if x != nil { + return x.FailedToPause + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetFailedToResume() int32 { + if x != nil { + return x.FailedToResume + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetFailedToTerminate() int32 { + if x != nil { + return x.FailedToTerminate + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetFailedToLaunch() int32 { + if x != nil { + return x.FailedToLaunch + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetFailedToUpdate() int32 { + if x != nil { + return x.FailedToUpdate + } + return 0 +} + +func (x *WorkspaceStatisticReport) GetFailed() int32 { + if x != nil { + return x.Failed + } + return 0 +} + +type GetWorkspaceStatisticsForNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *GetWorkspaceStatisticsForNamespaceRequest) Reset() { + *x = GetWorkspaceStatisticsForNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceStatisticsForNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceStatisticsForNamespaceRequest) ProtoMessage() {} + +func (x *GetWorkspaceStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_proto_msgTypes[15] + 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 GetWorkspaceStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{15} +} + +func (x *GetWorkspaceStatisticsForNamespaceRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +type GetWorkspaceStatisticsForNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stats *WorkspaceStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *GetWorkspaceStatisticsForNamespaceResponse) Reset() { + *x = GetWorkspaceStatisticsForNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceStatisticsForNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceStatisticsForNamespaceResponse) ProtoMessage() {} + +func (x *GetWorkspaceStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_workspace_proto_msgTypes[16] + 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 GetWorkspaceStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead. +func (*GetWorkspaceStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) { + return file_workspace_proto_rawDescGZIP(), []int{16} +} + +func (x *GetWorkspaceStatisticsForNamespaceResponse) GetStats() *WorkspaceStatisticReport { + if x != nil { + return x.Stats + } + return nil +} + +var File_workspace_proto protoreflect.FileDescriptor + +var file_workspace_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x03, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, + 0x3e, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x12, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, + 0x85, 0x01, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x75, 0x73, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x75, 0x73, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, + 0x32, 0x0a, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x55, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x64, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x45, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x22, 0x7c, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x6c, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, + 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, + 0x76, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64, + 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x13, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x47, + 0x0a, 0x15, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xfe, 0x03, 0x0a, 0x18, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, + 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, + 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, + 0x61, 0x75, 0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x26, 0x0a, + 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, + 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, + 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, + 0x61, 0x75, 0x6e, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x29, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x61, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0xd7, 0x0a, 0x0a, 0x10, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, + 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0xbd, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x12, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, + 0x12, 0x75, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x80, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x1a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0x7e, 0x0a, 0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, + 0x1a, 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, + 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x33, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, + 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x2a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, + 0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x61, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x32, 0x1a, 0x30, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_workspace_proto_rawDescOnce sync.Once + file_workspace_proto_rawDescData = file_workspace_proto_rawDesc +) + +func file_workspace_proto_rawDescGZIP() []byte { + file_workspace_proto_rawDescOnce.Do(func() { + file_workspace_proto_rawDescData = protoimpl.X.CompressGZIP(file_workspace_proto_rawDescData) + }) + return file_workspace_proto_rawDescData +} + +var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_workspace_proto_goTypes = []interface{}{ + (*Workspace)(nil), // 0: api.Workspace + (*WorkspaceStatus)(nil), // 1: api.WorkspaceStatus + (*CreateWorkspaceBody)(nil), // 2: api.CreateWorkspaceBody + (*CreateWorkspaceRequest)(nil), // 3: api.CreateWorkspaceRequest + (*GetWorkspaceRequest)(nil), // 4: api.GetWorkspaceRequest + (*UpdateWorkspaceStatusRequest)(nil), // 5: api.UpdateWorkspaceStatusRequest + (*UpdateWorkspaceBody)(nil), // 6: api.UpdateWorkspaceBody + (*UpdateWorkspaceRequest)(nil), // 7: api.UpdateWorkspaceRequest + (*ListWorkspaceRequest)(nil), // 8: api.ListWorkspaceRequest + (*ListWorkspaceResponse)(nil), // 9: api.ListWorkspaceResponse + (*PauseWorkspaceRequest)(nil), // 10: api.PauseWorkspaceRequest + (*ResumeWorkspaceRequest)(nil), // 11: api.ResumeWorkspaceRequest + (*DeleteWorkspaceRequest)(nil), // 12: api.DeleteWorkspaceRequest + (*RetryActionWorkspaceRequest)(nil), // 13: api.RetryActionWorkspaceRequest + (*WorkspaceStatisticReport)(nil), // 14: api.WorkspaceStatisticReport + (*GetWorkspaceStatisticsForNamespaceRequest)(nil), // 15: api.GetWorkspaceStatisticsForNamespaceRequest + (*GetWorkspaceStatisticsForNamespaceResponse)(nil), // 16: api.GetWorkspaceStatisticsForNamespaceResponse + (*Parameter)(nil), // 17: api.Parameter + (*WorkspaceTemplate)(nil), // 18: api.WorkspaceTemplate + (*KeyValue)(nil), // 19: api.KeyValue + (*emptypb.Empty)(nil), // 20: google.protobuf.Empty +} +var file_workspace_proto_depIdxs = []int32{ + 17, // 0: api.Workspace.parameters:type_name -> api.Parameter + 18, // 1: api.Workspace.workspaceTemplate:type_name -> api.WorkspaceTemplate + 1, // 2: api.Workspace.status:type_name -> api.WorkspaceStatus + 19, // 3: api.Workspace.labels:type_name -> api.KeyValue + 17, // 4: api.Workspace.templateParameters:type_name -> api.Parameter + 17, // 5: api.CreateWorkspaceBody.parameters:type_name -> api.Parameter + 19, // 6: api.CreateWorkspaceBody.labels:type_name -> api.KeyValue + 2, // 7: api.CreateWorkspaceRequest.body:type_name -> api.CreateWorkspaceBody + 1, // 8: api.UpdateWorkspaceStatusRequest.status:type_name -> api.WorkspaceStatus + 17, // 9: api.UpdateWorkspaceBody.parameters:type_name -> api.Parameter + 19, // 10: api.UpdateWorkspaceBody.labels:type_name -> api.KeyValue + 6, // 11: api.UpdateWorkspaceRequest.body:type_name -> api.UpdateWorkspaceBody + 0, // 12: api.ListWorkspaceResponse.workspaces:type_name -> api.Workspace + 14, // 13: api.GetWorkspaceStatisticsForNamespaceResponse.stats:type_name -> api.WorkspaceStatisticReport + 3, // 14: api.WorkspaceService.CreateWorkspace:input_type -> api.CreateWorkspaceRequest + 15, // 15: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:input_type -> api.GetWorkspaceStatisticsForNamespaceRequest + 4, // 16: api.WorkspaceService.GetWorkspace:input_type -> api.GetWorkspaceRequest + 8, // 17: api.WorkspaceService.ListWorkspaces:input_type -> api.ListWorkspaceRequest + 5, // 18: api.WorkspaceService.UpdateWorkspaceStatus:input_type -> api.UpdateWorkspaceStatusRequest + 7, // 19: api.WorkspaceService.UpdateWorkspace:input_type -> api.UpdateWorkspaceRequest + 10, // 20: api.WorkspaceService.PauseWorkspace:input_type -> api.PauseWorkspaceRequest + 11, // 21: api.WorkspaceService.ResumeWorkspace:input_type -> api.ResumeWorkspaceRequest + 12, // 22: api.WorkspaceService.DeleteWorkspace:input_type -> api.DeleteWorkspaceRequest + 13, // 23: api.WorkspaceService.RetryLastWorkspaceAction:input_type -> api.RetryActionWorkspaceRequest + 0, // 24: api.WorkspaceService.CreateWorkspace:output_type -> api.Workspace + 16, // 25: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:output_type -> api.GetWorkspaceStatisticsForNamespaceResponse + 0, // 26: api.WorkspaceService.GetWorkspace:output_type -> api.Workspace + 9, // 27: api.WorkspaceService.ListWorkspaces:output_type -> api.ListWorkspaceResponse + 20, // 28: api.WorkspaceService.UpdateWorkspaceStatus:output_type -> google.protobuf.Empty + 20, // 29: api.WorkspaceService.UpdateWorkspace:output_type -> google.protobuf.Empty + 20, // 30: api.WorkspaceService.PauseWorkspace:output_type -> google.protobuf.Empty + 20, // 31: api.WorkspaceService.ResumeWorkspace:output_type -> google.protobuf.Empty + 20, // 32: api.WorkspaceService.DeleteWorkspace:output_type -> google.protobuf.Empty + 20, // 33: api.WorkspaceService.RetryLastWorkspaceAction:output_type -> google.protobuf.Empty + 24, // [24:34] is the sub-list for method output_type + 14, // [14:24] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_workspace_proto_init() } +func file_workspace_proto_init() { + if File_workspace_proto != nil { + return + } + file_workspace_template_proto_init() + file_common_proto_init() + file_label_proto_init() + if !protoimpl.UnsafeEnabled { + file_workspace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workspace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkspaceBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkspaceStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkspaceBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PauseWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResumeWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RetryActionWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceStatisticReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceStatisticsForNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceStatisticsForNamespaceResponse); 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_workspace_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_workspace_proto_goTypes, + DependencyIndexes: file_workspace_proto_depIdxs, + MessageInfos: file_workspace_proto_msgTypes, + }.Build() + File_workspace_proto = out.File + file_workspace_proto_rawDesc = nil + file_workspace_proto_goTypes = nil + file_workspace_proto_depIdxs = nil +} diff --git a/api/gen/workspace.pb.gw.go b/api/gen/workspace.pb.gw.go new file mode 100644 index 00000000..c745540a --- /dev/null +++ b/api/gen/workspace.pb.gw.go @@ -0,0 +1,1282 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: workspace.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkspaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.CreateWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkspaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateWorkspace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkspaceStatisticsForNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.GetWorkspaceStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkspaceStatisticsForNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.GetWorkspaceStatisticsForNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.GetWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.GetWorkspace(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkspaceService_ListWorkspaces_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceService_ListWorkspaces_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListWorkspaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceService_ListWorkspaces_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListWorkspaces(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_UpdateWorkspaceStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkspaceStatusRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.UpdateWorkspaceStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_UpdateWorkspaceStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkspaceStatusRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.UpdateWorkspaceStatus(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_UpdateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkspaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.UpdateWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_UpdateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkspaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Body); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.UpdateWorkspace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_PauseWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PauseWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.PauseWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_PauseWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PauseWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.PauseWorkspace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_ResumeWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResumeWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ResumeWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_ResumeWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResumeWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ResumeWorkspace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.DeleteWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.DeleteWorkspace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryActionWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.RetryLastWorkspaceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RetryActionWorkspaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.RetryLastWorkspaceAction(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterWorkspaceServiceHandlerServer registers the http handlers for service WorkspaceService to "mux". +// UnaryRPC :call WorkspaceServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkspaceServiceHandlerFromEndpoint instead. +func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceServiceServer) error { + + mux.Handle("POST", pattern_WorkspaceService_CreateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/CreateWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_CreateWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_CreateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/GetWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_GetWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_GetWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/ListWorkspaces") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_ListWorkspaces_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_ListWorkspaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspaceStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/UpdateWorkspaceStatus") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_UpdateWorkspaceStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_UpdateWorkspaceStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/UpdateWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_UpdateWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_UpdateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_PauseWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/PauseWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_PauseWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_PauseWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_ResumeWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/ResumeWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_ResumeWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_ResumeWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_WorkspaceService_DeleteWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/DeleteWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_DeleteWorkspace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_DeleteWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceService/RetryLastWorkspaceAction") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceService_RetryLastWorkspaceAction_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterWorkspaceServiceHandlerFromEndpoint is same as RegisterWorkspaceServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWorkspaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWorkspaceServiceHandler(ctx, mux, conn) +} + +// RegisterWorkspaceServiceHandler registers the http handlers for service WorkspaceService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWorkspaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWorkspaceServiceHandlerClient(ctx, mux, NewWorkspaceServiceClient(conn)) +} + +// RegisterWorkspaceServiceHandlerClient registers the http handlers for service WorkspaceService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WorkspaceServiceClient" to call the correct interceptors. +func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceServiceClient) error { + + mux.Handle("POST", pattern_WorkspaceService_CreateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/CreateWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_CreateWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_CreateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/GetWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_GetWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_GetWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/ListWorkspaces") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_ListWorkspaces_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_ListWorkspaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspaceStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/UpdateWorkspaceStatus") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_UpdateWorkspaceStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_UpdateWorkspaceStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/UpdateWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_UpdateWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_UpdateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_PauseWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/PauseWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_PauseWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_PauseWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_ResumeWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/ResumeWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_ResumeWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_ResumeWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_WorkspaceService_DeleteWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/DeleteWorkspace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_DeleteWorkspace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_DeleteWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceService/RetryLastWorkspaceAction") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceService_RetryLastWorkspaceAction_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceService_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_WorkspaceService_CreateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "")) + + pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workspace", "statistics"}, "")) + + pattern_WorkspaceService_GetWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "")) + + pattern_WorkspaceService_ListWorkspaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "")) + + pattern_WorkspaceService_UpdateWorkspaceStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "status"}, "")) + + pattern_WorkspaceService_UpdateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "")) + + pattern_WorkspaceService_PauseWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "pause"}, "")) + + pattern_WorkspaceService_ResumeWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "resume"}, "")) + + pattern_WorkspaceService_DeleteWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "")) + + pattern_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "retry"}, "")) +) + +var ( + forward_WorkspaceService_CreateWorkspace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_GetWorkspace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_ListWorkspaces_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_UpdateWorkspaceStatus_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_UpdateWorkspace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_PauseWorkspace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_ResumeWorkspace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessage + + forward_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/workspace_grpc.pb.go b/api/gen/workspace_grpc.pb.go new file mode 100644 index 00000000..d7d564cf --- /dev/null +++ b/api/gen/workspace_grpc.pb.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// WorkspaceServiceClient is the client API for WorkspaceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WorkspaceServiceClient interface { + CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) + GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error) + GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) + ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error) + UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + UpdateWorkspace(ctx context.Context, in *UpdateWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type workspaceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient { + return &workspaceServiceClient{cc} +} + +func (c *workspaceServiceClient) CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { + out := new(Workspace) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/CreateWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error) { + out := new(GetWorkspaceStatisticsForNamespaceResponse) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) { + out := new(Workspace) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error) { + out := new(ListWorkspaceResponse) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/ListWorkspaces", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/UpdateWorkspaceStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) UpdateWorkspace(ctx context.Context, in *UpdateWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/UpdateWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/PauseWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/ResumeWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/DeleteWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/api.WorkspaceService/RetryLastWorkspaceAction", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WorkspaceServiceServer is the server API for WorkspaceService service. +// All implementations must embed UnimplementedWorkspaceServiceServer +// for forward compatibility +type WorkspaceServiceServer interface { + CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) + GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error) + GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) + ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error) + UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*emptypb.Empty, error) + UpdateWorkspace(context.Context, *UpdateWorkspaceRequest) (*emptypb.Empty, error) + PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*emptypb.Empty, error) + ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*emptypb.Empty, error) + DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error) + RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedWorkspaceServiceServer() +} + +// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations. +type UnimplementedWorkspaceServiceServer struct { +} + +func (UnimplementedWorkspaceServiceServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceStatisticsForNamespace not implemented") +} +func (UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaces not implemented") +} +func (UnimplementedWorkspaceServiceServer) UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceStatus not implemented") +} +func (UnimplementedWorkspaceServiceServer) UpdateWorkspace(context.Context, *UpdateWorkspaceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResumeWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RetryLastWorkspaceAction not implemented") +} +func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {} + +// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will +// result in compilation errors. +type UnsafeWorkspaceServiceServer interface { + mustEmbedUnimplementedWorkspaceServiceServer() +} + +func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) { + s.RegisterService(&_WorkspaceService_serviceDesc, srv) +} + +func _WorkspaceService_CreateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).CreateWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/CreateWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).CreateWorkspace(ctx, req.(*CreateWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceStatisticsForNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, req.(*GetWorkspaceStatisticsForNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).GetWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/GetWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).ListWorkspaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/ListWorkspaces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).ListWorkspaces(ctx, req.(*ListWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_UpdateWorkspaceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkspaceStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).UpdateWorkspaceStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/UpdateWorkspaceStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).UpdateWorkspaceStatus(ctx, req.(*UpdateWorkspaceStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_UpdateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).UpdateWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/UpdateWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).UpdateWorkspace(ctx, req.(*UpdateWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_PauseWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PauseWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).PauseWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/PauseWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).PauseWorkspace(ctx, req.(*PauseWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_ResumeWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResumeWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).ResumeWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/ResumeWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).ResumeWorkspace(ctx, req.(*ResumeWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/DeleteWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, req.(*DeleteWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_RetryLastWorkspaceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryActionWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceService/RetryLastWorkspaceAction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, req.(*RetryActionWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _WorkspaceService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.WorkspaceService", + HandlerType: (*WorkspaceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateWorkspace", + Handler: _WorkspaceService_CreateWorkspace_Handler, + }, + { + MethodName: "GetWorkspaceStatisticsForNamespace", + Handler: _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler, + }, + { + MethodName: "GetWorkspace", + Handler: _WorkspaceService_GetWorkspace_Handler, + }, + { + MethodName: "ListWorkspaces", + Handler: _WorkspaceService_ListWorkspaces_Handler, + }, + { + MethodName: "UpdateWorkspaceStatus", + Handler: _WorkspaceService_UpdateWorkspaceStatus_Handler, + }, + { + MethodName: "UpdateWorkspace", + Handler: _WorkspaceService_UpdateWorkspace_Handler, + }, + { + MethodName: "PauseWorkspace", + Handler: _WorkspaceService_PauseWorkspace_Handler, + }, + { + MethodName: "ResumeWorkspace", + Handler: _WorkspaceService_ResumeWorkspace_Handler, + }, + { + MethodName: "DeleteWorkspace", + Handler: _WorkspaceService_DeleteWorkspace_Handler, + }, + { + MethodName: "RetryLastWorkspaceAction", + Handler: _WorkspaceService_RetryLastWorkspaceAction_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "workspace.proto", +} diff --git a/api/gen/workspace_template.pb.go b/api/gen/workspace_template.pb.go new file mode 100644 index 00000000..e38a6b6c --- /dev/null +++ b/api/gen/workspace_template.pb.go @@ -0,0 +1,1117 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: workspace_template.proto + +package gen + +import ( + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type WorkspaceTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"` + IsLatest bool `protobuf:"varint,5,opt,name=isLatest,proto3" json:"isLatest,omitempty"` + CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + WorkflowTemplate *WorkflowTemplate `protobuf:"bytes,7,opt,name=workflowTemplate,proto3" json:"workflowTemplate,omitempty"` + Labels []*KeyValue `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` + IsArchived bool `protobuf:"varint,9,opt,name=isArchived,proto3" json:"isArchived,omitempty"` + Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *WorkspaceTemplate) Reset() { + *x = WorkspaceTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceTemplate) ProtoMessage() {} + +func (x *WorkspaceTemplate) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 WorkspaceTemplate.ProtoReflect.Descriptor instead. +func (*WorkspaceTemplate) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{0} +} + +func (x *WorkspaceTemplate) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *WorkspaceTemplate) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkspaceTemplate) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *WorkspaceTemplate) GetManifest() string { + if x != nil { + return x.Manifest + } + return "" +} + +func (x *WorkspaceTemplate) GetIsLatest() bool { + if x != nil { + return x.IsLatest + } + return false +} + +func (x *WorkspaceTemplate) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *WorkspaceTemplate) GetWorkflowTemplate() *WorkflowTemplate { + if x != nil { + return x.WorkflowTemplate + } + return nil +} + +func (x *WorkspaceTemplate) GetLabels() []*KeyValue { + if x != nil { + return x.Labels + } + return nil +} + +func (x *WorkspaceTemplate) GetIsArchived() bool { + if x != nil { + return x.IsArchived + } + return false +} + +func (x *WorkspaceTemplate) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type GenerateWorkspaceTemplateWorkflowTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,3,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` +} + +func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) Reset() { + *x = GenerateWorkspaceTemplateWorkflowTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateWorkspaceTemplateWorkflowTemplateRequest) ProtoMessage() {} + +func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 GenerateWorkspaceTemplateWorkflowTemplateRequest.ProtoReflect.Descriptor instead. +func (*GenerateWorkspaceTemplateWorkflowTemplateRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{1} +} + +func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GenerateWorkspaceTemplateWorkflowTemplateRequest) GetWorkspaceTemplate() *WorkspaceTemplate { + if x != nil { + return x.WorkspaceTemplate + } + return nil +} + +type CreateWorkspaceTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,2,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` +} + +func (x *CreateWorkspaceTemplateRequest) Reset() { + *x = CreateWorkspaceTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkspaceTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkspaceTemplateRequest) ProtoMessage() {} + +func (x *CreateWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 CreateWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateWorkspaceTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateWorkspaceTemplateRequest) GetWorkspaceTemplate() *WorkspaceTemplate { + if x != nil { + return x.WorkspaceTemplate + } + return nil +} + +type UpdateWorkspaceTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + WorkspaceTemplate *WorkspaceTemplate `protobuf:"bytes,3,opt,name=workspaceTemplate,proto3" json:"workspaceTemplate,omitempty"` +} + +func (x *UpdateWorkspaceTemplateRequest) Reset() { + *x = UpdateWorkspaceTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateWorkspaceTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateWorkspaceTemplateRequest) ProtoMessage() {} + +func (x *UpdateWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 UpdateWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. +func (*UpdateWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateWorkspaceTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *UpdateWorkspaceTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *UpdateWorkspaceTemplateRequest) GetWorkspaceTemplate() *WorkspaceTemplate { + if x != nil { + return x.WorkspaceTemplate + } + return nil +} + +type GetWorkspaceTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *GetWorkspaceTemplateRequest) Reset() { + *x = GetWorkspaceTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceTemplateRequest) ProtoMessage() {} + +func (x *GetWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 GetWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{4} +} + +func (x *GetWorkspaceTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetWorkspaceTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *GetWorkspaceTemplateRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type ArchiveWorkspaceTemplateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ArchiveWorkspaceTemplateRequest) Reset() { + *x = ArchiveWorkspaceTemplateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArchiveWorkspaceTemplateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArchiveWorkspaceTemplateRequest) ProtoMessage() {} + +func (x *ArchiveWorkspaceTemplateRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 ArchiveWorkspaceTemplateRequest.ProtoReflect.Descriptor instead. +func (*ArchiveWorkspaceTemplateRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{5} +} + +func (x *ArchiveWorkspaceTemplateRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ArchiveWorkspaceTemplateRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ListWorkspaceTemplatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"` + Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"` + Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ListWorkspaceTemplatesRequest) Reset() { + *x = ListWorkspaceTemplatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspaceTemplatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspaceTemplatesRequest) ProtoMessage() {} + +func (x *ListWorkspaceTemplatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 ListWorkspaceTemplatesRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspaceTemplatesRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{6} +} + +func (x *ListWorkspaceTemplatesRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListWorkspaceTemplatesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkspaceTemplatesRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkspaceTemplatesRequest) GetOrder() string { + if x != nil { + return x.Order + } + return "" +} + +func (x *ListWorkspaceTemplatesRequest) GetLabels() string { + if x != nil { + return x.Labels + } + return "" +} + +func (x *ListWorkspaceTemplatesRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ListWorkspaceTemplatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkspaceTemplates []*WorkspaceTemplate `protobuf:"bytes,2,rep,name=workspaceTemplates,proto3" json:"workspaceTemplates,omitempty"` + Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` + Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` + TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"` +} + +func (x *ListWorkspaceTemplatesResponse) Reset() { + *x = ListWorkspaceTemplatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspaceTemplatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspaceTemplatesResponse) ProtoMessage() {} + +func (x *ListWorkspaceTemplatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 ListWorkspaceTemplatesResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspaceTemplatesResponse) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{7} +} + +func (x *ListWorkspaceTemplatesResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListWorkspaceTemplatesResponse) GetWorkspaceTemplates() []*WorkspaceTemplate { + if x != nil { + return x.WorkspaceTemplates + } + return nil +} + +func (x *ListWorkspaceTemplatesResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *ListWorkspaceTemplatesResponse) GetPages() int32 { + if x != nil { + return x.Pages + } + return 0 +} + +func (x *ListWorkspaceTemplatesResponse) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type ListWorkspaceTemplateVersionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` +} + +func (x *ListWorkspaceTemplateVersionsRequest) Reset() { + *x = ListWorkspaceTemplateVersionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspaceTemplateVersionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspaceTemplateVersionsRequest) ProtoMessage() {} + +func (x *ListWorkspaceTemplateVersionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 ListWorkspaceTemplateVersionsRequest.ProtoReflect.Descriptor instead. +func (*ListWorkspaceTemplateVersionsRequest) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{8} +} + +func (x *ListWorkspaceTemplateVersionsRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *ListWorkspaceTemplateVersionsRequest) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type ListWorkspaceTemplateVersionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + WorkspaceTemplates []*WorkspaceTemplate `protobuf:"bytes,2,rep,name=workspaceTemplates,proto3" json:"workspaceTemplates,omitempty"` +} + +func (x *ListWorkspaceTemplateVersionsResponse) Reset() { + *x = ListWorkspaceTemplateVersionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_workspace_template_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkspaceTemplateVersionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkspaceTemplateVersionsResponse) ProtoMessage() {} + +func (x *ListWorkspaceTemplateVersionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_workspace_template_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 ListWorkspaceTemplateVersionsResponse.ProtoReflect.Descriptor instead. +func (*ListWorkspaceTemplateVersionsResponse) Descriptor() ([]byte, []int) { + return file_workspace_template_proto_rawDescGZIP(), []int{9} +} + +func (x *ListWorkspaceTemplateVersionsResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ListWorkspaceTemplateVersionsResponse) GetWorkspaceTemplates() []*WorkspaceTemplate { + if x != nil { + return x.WorkspaceTemplates + } + return nil +} + +var File_workspace_template_proto protoreflect.FileDescriptor + +var file_workspace_template_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x02, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, + 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x61, 0x74, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x41, + 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa8, 0x01, 0x0a, 0x30, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x1e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x96, 0x01, + 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x67, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x51, 0x0a, 0x1f, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x22, 0xad, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x56, 0x0a, + 0x24, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x32, 0xce, 0x09, + 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x29, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x22, 0x45, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, + 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x17, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x1a, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, + 0x7d, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, + 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, + 0x68, 0x69, 0x76, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, + 0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, + 0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, + 0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, + 0xbc, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, + 0x12, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, + 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x24, + 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, + 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_workspace_template_proto_rawDescOnce sync.Once + file_workspace_template_proto_rawDescData = file_workspace_template_proto_rawDesc +) + +func file_workspace_template_proto_rawDescGZIP() []byte { + file_workspace_template_proto_rawDescOnce.Do(func() { + file_workspace_template_proto_rawDescData = protoimpl.X.CompressGZIP(file_workspace_template_proto_rawDescData) + }) + return file_workspace_template_proto_rawDescData +} + +var file_workspace_template_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_workspace_template_proto_goTypes = []interface{}{ + (*WorkspaceTemplate)(nil), // 0: api.WorkspaceTemplate + (*GenerateWorkspaceTemplateWorkflowTemplateRequest)(nil), // 1: api.GenerateWorkspaceTemplateWorkflowTemplateRequest + (*CreateWorkspaceTemplateRequest)(nil), // 2: api.CreateWorkspaceTemplateRequest + (*UpdateWorkspaceTemplateRequest)(nil), // 3: api.UpdateWorkspaceTemplateRequest + (*GetWorkspaceTemplateRequest)(nil), // 4: api.GetWorkspaceTemplateRequest + (*ArchiveWorkspaceTemplateRequest)(nil), // 5: api.ArchiveWorkspaceTemplateRequest + (*ListWorkspaceTemplatesRequest)(nil), // 6: api.ListWorkspaceTemplatesRequest + (*ListWorkspaceTemplatesResponse)(nil), // 7: api.ListWorkspaceTemplatesResponse + (*ListWorkspaceTemplateVersionsRequest)(nil), // 8: api.ListWorkspaceTemplateVersionsRequest + (*ListWorkspaceTemplateVersionsResponse)(nil), // 9: api.ListWorkspaceTemplateVersionsResponse + (*WorkflowTemplate)(nil), // 10: api.WorkflowTemplate + (*KeyValue)(nil), // 11: api.KeyValue +} +var file_workspace_template_proto_depIdxs = []int32{ + 10, // 0: api.WorkspaceTemplate.workflowTemplate:type_name -> api.WorkflowTemplate + 11, // 1: api.WorkspaceTemplate.labels:type_name -> api.KeyValue + 0, // 2: api.GenerateWorkspaceTemplateWorkflowTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate + 0, // 3: api.CreateWorkspaceTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate + 0, // 4: api.UpdateWorkspaceTemplateRequest.workspaceTemplate:type_name -> api.WorkspaceTemplate + 0, // 5: api.ListWorkspaceTemplatesResponse.workspaceTemplates:type_name -> api.WorkspaceTemplate + 0, // 6: api.ListWorkspaceTemplateVersionsResponse.workspaceTemplates:type_name -> api.WorkspaceTemplate + 1, // 7: api.WorkspaceTemplateService.GenerateWorkspaceTemplateWorkflowTemplate:input_type -> api.GenerateWorkspaceTemplateWorkflowTemplateRequest + 2, // 8: api.WorkspaceTemplateService.CreateWorkspaceTemplate:input_type -> api.CreateWorkspaceTemplateRequest + 3, // 9: api.WorkspaceTemplateService.UpdateWorkspaceTemplate:input_type -> api.UpdateWorkspaceTemplateRequest + 5, // 10: api.WorkspaceTemplateService.ArchiveWorkspaceTemplate:input_type -> api.ArchiveWorkspaceTemplateRequest + 4, // 11: api.WorkspaceTemplateService.GetWorkspaceTemplate:input_type -> api.GetWorkspaceTemplateRequest + 6, // 12: api.WorkspaceTemplateService.ListWorkspaceTemplates:input_type -> api.ListWorkspaceTemplatesRequest + 8, // 13: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:input_type -> api.ListWorkspaceTemplateVersionsRequest + 10, // 14: api.WorkspaceTemplateService.GenerateWorkspaceTemplateWorkflowTemplate:output_type -> api.WorkflowTemplate + 0, // 15: api.WorkspaceTemplateService.CreateWorkspaceTemplate:output_type -> api.WorkspaceTemplate + 0, // 16: api.WorkspaceTemplateService.UpdateWorkspaceTemplate:output_type -> api.WorkspaceTemplate + 0, // 17: api.WorkspaceTemplateService.ArchiveWorkspaceTemplate:output_type -> api.WorkspaceTemplate + 0, // 18: api.WorkspaceTemplateService.GetWorkspaceTemplate:output_type -> api.WorkspaceTemplate + 7, // 19: api.WorkspaceTemplateService.ListWorkspaceTemplates:output_type -> api.ListWorkspaceTemplatesResponse + 9, // 20: api.WorkspaceTemplateService.ListWorkspaceTemplateVersions:output_type -> api.ListWorkspaceTemplateVersionsResponse + 14, // [14:21] is the sub-list for method output_type + 7, // [7:14] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_workspace_template_proto_init() } +func file_workspace_template_proto_init() { + if File_workspace_template_proto != nil { + return + } + file_workflow_template_proto_init() + file_label_proto_init() + if !protoimpl.UnsafeEnabled { + file_workspace_template_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateWorkspaceTemplateWorkflowTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkspaceTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateWorkspaceTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArchiveWorkspaceTemplateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspaceTemplatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspaceTemplatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspaceTemplateVersionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_workspace_template_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkspaceTemplateVersionsResponse); 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_workspace_template_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_workspace_template_proto_goTypes, + DependencyIndexes: file_workspace_template_proto_depIdxs, + MessageInfos: file_workspace_template_proto_msgTypes, + }.Build() + File_workspace_template_proto = out.File + file_workspace_template_proto_rawDesc = nil + file_workspace_template_proto_goTypes = nil + file_workspace_template_proto_depIdxs = nil +} diff --git a/api/gen/workspace_template.pb.gw.go b/api/gen/workspace_template.pb.gw.go new file mode 100644 index 00000000..f4edcffc --- /dev/null +++ b/api/gen/workspace_template.pb.gw.go @@ -0,0 +1,963 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: workspace_template.proto + +/* +Package gen is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gen + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GenerateWorkspaceTemplateWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.GenerateWorkspaceTemplateWorkflowTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GenerateWorkspaceTemplateWorkflowTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.GenerateWorkspaceTemplateWorkflowTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := client.CreateWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + msg, err := server.CreateWorkspaceTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.UpdateWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.WorkspaceTemplate); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.UpdateWorkspaceTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ArchiveWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ArchiveWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ArchiveWorkspaceTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkspaceTemplateService_GetWorkspaceTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_GetWorkspaceTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetWorkspaceTemplateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_GetWorkspaceTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetWorkspaceTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WorkspaceTemplateService_ListWorkspaceTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkspaceTemplatesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_ListWorkspaceTemplates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListWorkspaceTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkspaceTemplatesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_ListWorkspaceTemplates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListWorkspaceTemplates(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkspaceTemplateVersionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := client.ListWorkspaceTemplateVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListWorkspaceTemplateVersionsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") + } + + protoReq.Namespace, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) + } + + val, ok = pathParams["uid"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid") + } + + protoReq.Uid, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err) + } + + msg, err := server.ListWorkspaceTemplateVersions(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterWorkspaceTemplateServiceHandlerServer registers the http handlers for service WorkspaceTemplateService to "mux". +// UnaryRPC :call WorkspaceTemplateServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkspaceTemplateServiceHandlerFromEndpoint instead. +func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceTemplateServiceServer) error { + + mux.Handle("POST", pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/GetWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplates") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplates_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterWorkspaceTemplateServiceHandlerFromEndpoint is same as RegisterWorkspaceTemplateServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWorkspaceTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWorkspaceTemplateServiceHandler(ctx, mux, conn) +} + +// RegisterWorkspaceTemplateServiceHandler registers the http handlers for service WorkspaceTemplateService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWorkspaceTemplateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWorkspaceTemplateServiceHandlerClient(ctx, mux, NewWorkspaceTemplateServiceClient(conn)) +} + +// RegisterWorkspaceTemplateServiceHandlerClient registers the http handlers for service WorkspaceTemplateService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceTemplateServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceTemplateServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WorkspaceTemplateServiceClient" to call the correct interceptors. +func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceTemplateServiceClient) error { + + mux.Handle("POST", pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/GetWorkspaceTemplate") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_GetWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplates") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_ListWorkspaceTemplates_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "workflow_template"}, "")) + + pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, "")) + + pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, "")) + + pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "archive"}, "")) + + pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, "")) + + pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, "")) + + pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "versions"}, "")) +) + +var ( + forward_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkspaceTemplateService_CreateWorkspaceTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.ForwardResponseMessage + + forward_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.ForwardResponseMessage + + forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.ForwardResponseMessage +) diff --git a/api/gen/workspace_template_grpc.pb.go b/api/gen/workspace_template_grpc.pb.go new file mode 100644 index 00000000..84c5ba48 --- /dev/null +++ b/api/gen/workspace_template_grpc.pb.go @@ -0,0 +1,324 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion7 + +// WorkspaceTemplateServiceClient is the client API for WorkspaceTemplateService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WorkspaceTemplateServiceClient interface { + // Get the generated WorkflowTemplate for a WorkspaceTemplate + GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, in *GenerateWorkspaceTemplateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) + // Creates a WorkspaceTemplate + CreateWorkspaceTemplate(ctx context.Context, in *CreateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) + // Updates a WorkspaceTemplate + UpdateWorkspaceTemplate(ctx context.Context, in *UpdateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) + // Archives a WorkspaceTemplate + ArchiveWorkspaceTemplate(ctx context.Context, in *ArchiveWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) + // Get a WorkspaceTemplate + GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) + ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error) + ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error) +} + +type workspaceTemplateServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWorkspaceTemplateServiceClient(cc grpc.ClientConnInterface) WorkspaceTemplateServiceClient { + return &workspaceTemplateServiceClient{cc} +} + +func (c *workspaceTemplateServiceClient) GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, in *GenerateWorkspaceTemplateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) { + out := new(WorkflowTemplate) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceTemplateServiceClient) CreateWorkspaceTemplate(ctx context.Context, in *CreateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { + out := new(WorkspaceTemplate) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceTemplateServiceClient) UpdateWorkspaceTemplate(ctx context.Context, in *UpdateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { + out := new(WorkspaceTemplate) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceTemplateServiceClient) ArchiveWorkspaceTemplate(ctx context.Context, in *ArchiveWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { + out := new(WorkspaceTemplate) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceTemplateServiceClient) GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) { + out := new(WorkspaceTemplate) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/GetWorkspaceTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceTemplateServiceClient) ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error) { + out := new(ListWorkspaceTemplatesResponse) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceTemplateServiceClient) ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error) { + out := new(ListWorkspaceTemplateVersionsResponse) + err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WorkspaceTemplateServiceServer is the server API for WorkspaceTemplateService service. +// All implementations must embed UnimplementedWorkspaceTemplateServiceServer +// for forward compatibility +type WorkspaceTemplateServiceServer interface { + // Get the generated WorkflowTemplate for a WorkspaceTemplate + GenerateWorkspaceTemplateWorkflowTemplate(context.Context, *GenerateWorkspaceTemplateWorkflowTemplateRequest) (*WorkflowTemplate, error) + // Creates a WorkspaceTemplate + CreateWorkspaceTemplate(context.Context, *CreateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) + // Updates a WorkspaceTemplate + UpdateWorkspaceTemplate(context.Context, *UpdateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) + // Archives a WorkspaceTemplate + ArchiveWorkspaceTemplate(context.Context, *ArchiveWorkspaceTemplateRequest) (*WorkspaceTemplate, error) + // Get a WorkspaceTemplate + GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error) + ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error) + ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error) + mustEmbedUnimplementedWorkspaceTemplateServiceServer() +} + +// UnimplementedWorkspaceTemplateServiceServer must be embedded to have forward compatible implementations. +type UnimplementedWorkspaceTemplateServiceServer struct { +} + +func (UnimplementedWorkspaceTemplateServiceServer) GenerateWorkspaceTemplateWorkflowTemplate(context.Context, *GenerateWorkspaceTemplateWorkflowTemplateRequest) (*WorkflowTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateWorkspaceTemplateWorkflowTemplate not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) CreateWorkspaceTemplate(context.Context, *CreateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspaceTemplate not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) UpdateWorkspaceTemplate(context.Context, *UpdateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceTemplate not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) ArchiveWorkspaceTemplate(context.Context, *ArchiveWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkspaceTemplate not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceTemplate not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplates not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplateVersions not implemented") +} +func (UnimplementedWorkspaceTemplateServiceServer) mustEmbedUnimplementedWorkspaceTemplateServiceServer() { +} + +// UnsafeWorkspaceTemplateServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WorkspaceTemplateServiceServer will +// result in compilation errors. +type UnsafeWorkspaceTemplateServiceServer interface { + mustEmbedUnimplementedWorkspaceTemplateServiceServer() +} + +func RegisterWorkspaceTemplateServiceServer(s grpc.ServiceRegistrar, srv WorkspaceTemplateServiceServer) { + s.RegisterService(&_WorkspaceTemplateService_serviceDesc, srv) +} + +func _WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateWorkspaceTemplateWorkflowTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).GenerateWorkspaceTemplateWorkflowTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).GenerateWorkspaceTemplateWorkflowTemplate(ctx, req.(*GenerateWorkspaceTemplateWorkflowTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceTemplateService_CreateWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWorkspaceTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).CreateWorkspaceTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/CreateWorkspaceTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).CreateWorkspaceTemplate(ctx, req.(*CreateWorkspaceTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceTemplateService_UpdateWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateWorkspaceTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).UpdateWorkspaceTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).UpdateWorkspaceTemplate(ctx, req.(*UpdateWorkspaceTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceTemplateService_ArchiveWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveWorkspaceTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).ArchiveWorkspaceTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).ArchiveWorkspaceTemplate(ctx, req.(*ArchiveWorkspaceTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceTemplateService_GetWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).GetWorkspaceTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/GetWorkspaceTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).GetWorkspaceTemplate(ctx, req.(*GetWorkspaceTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceTemplateService_ListWorkspaceTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkspaceTemplatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplates(ctx, req.(*ListWorkspaceTemplatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWorkspaceTemplateVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplateVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplateVersions(ctx, req.(*ListWorkspaceTemplateVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _WorkspaceTemplateService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.WorkspaceTemplateService", + HandlerType: (*WorkspaceTemplateServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenerateWorkspaceTemplateWorkflowTemplate", + Handler: _WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_Handler, + }, + { + MethodName: "CreateWorkspaceTemplate", + Handler: _WorkspaceTemplateService_CreateWorkspaceTemplate_Handler, + }, + { + MethodName: "UpdateWorkspaceTemplate", + Handler: _WorkspaceTemplateService_UpdateWorkspaceTemplate_Handler, + }, + { + MethodName: "ArchiveWorkspaceTemplate", + Handler: _WorkspaceTemplateService_ArchiveWorkspaceTemplate_Handler, + }, + { + MethodName: "GetWorkspaceTemplate", + Handler: _WorkspaceTemplateService_GetWorkspaceTemplate_Handler, + }, + { + MethodName: "ListWorkspaceTemplates", + Handler: _WorkspaceTemplateService_ListWorkspaceTemplates_Handler, + }, + { + MethodName: "ListWorkspaceTemplateVersions", + Handler: _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "workspace_template.proto", +} From 8b155bae17772b69701e3bc221dfd83fb7555da9 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 15:59:09 -0800 Subject: [PATCH 59/80] update: helper image to interact with core --- helper/Dockerfile | 27 ++++ helper/go.mod | 9 ++ helper/go.sum | 375 ++++++++++++++++++++++++++++++++++++++++++++++ helper/tools.go | 10 ++ 4 files changed, 421 insertions(+) create mode 100644 helper/Dockerfile create mode 100644 helper/go.mod create mode 100644 helper/go.sum create mode 100644 helper/tools.go diff --git a/helper/Dockerfile b/helper/Dockerfile new file mode 100644 index 00000000..1a75b979 --- /dev/null +++ b/helper/Dockerfile @@ -0,0 +1,27 @@ +FROM golang:1.15.5 AS builder + +WORKDIR / + +RUN apt-get update +RUN apt-get install unzip +RUN curl -sL -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip +RUN unzip protoc.zip -d proto +RUN curl -sL -o jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 +RUN chmod +x jq + +FROM golang:1.15.5 + +WORKDIR /root +COPY ./go.* ./ + +RUN go get -u github.com/pressly/goose/cmd/goose +RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ + github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ + google.golang.org/protobuf/cmd/protoc-gen-go \ + google.golang.org/grpc/cmd/protoc-gen-go-grpc + +COPY --from=builder /jq /usr/local/bin +COPY --from=builder /proto/bin/protoc /usr/local/bin +COPY --from=builder /proto/include /usr/local/include/ + +CMD ["/app"] \ No newline at end of file diff --git a/helper/go.mod b/helper/go.mod new file mode 100644 index 00000000..eeea1406 --- /dev/null +++ b/helper/go.mod @@ -0,0 +1,9 @@ +module core-helper/m/v2 + +go 1.15 + +require ( + github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1 + google.golang.org/protobuf v1.25.0 +) diff --git a/helper/go.sum b/helper/go.sum new file mode 100644 index 00000000..31b6bf58 --- /dev/null +++ b/helper/go.sum @@ -0,0 +1,375 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1 h1:X2vfSnm1WC8HEo0MBHZg2TcuDUHJj6kd1TmEAQncnSA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1/go.mod h1:oVMjMN64nzEcepv1kdZKgx1qNYt4Ro0Gqefiq2JWdis= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 h1:bFFRpT+e8JJVY7lMMfvezL1ZIwqiwmPl2bsE2yx4HqM= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1 h1:M8spwkmx0pHrPq+uMdl22w5CvJ/Y+oAJTIs9oGoCpOE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/helper/tools.go b/helper/tools.go new file mode 100644 index 00000000..ecf521e2 --- /dev/null +++ b/helper/tools.go @@ -0,0 +1,10 @@ +// +build tools + +package core_helper + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" + _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" + _ "google.golang.org/protobuf/cmd/protoc-gen-go" +) From 41f85087639591325d283462cf7ef8357558b18d Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 16:02:22 -0800 Subject: [PATCH 60/80] update: to go packages because of grpc update --- go.mod | 19 +++++----- go.sum | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 117 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index d32e7c90..af331ae7 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/onepanelio/core -go 1.14 +go 1.15 require ( + cloud.google.com/go/storage v1.10.0 github.com/Azure/go-autorest v14.0.0+incompatible // indirect - cloud.google.com/go/storage v1.6.0 github.com/Azure/go-autorest/autorest/adal v0.8.2 // indirect github.com/Masterminds/squirrel v1.1.0 github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6 @@ -14,11 +14,12 @@ require ( github.com/evanphx/json-patch v4.5.0+incompatible // indirect github.com/ghodss/yaml v1.0.0 github.com/go-sql-driver/mysql v1.5.0 // indirect - github.com/golang/protobuf v1.4.1 + github.com/golang/protobuf v1.4.3 github.com/google/uuid v1.1.2 github.com/gorilla/handlers v1.4.2 github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 github.com/grpc-ecosystem/grpc-gateway v1.14.4 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1 github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/jmoiron/sqlx v1.2.0 @@ -31,12 +32,12 @@ require ( github.com/spf13/cobra v0.0.5 // indirect github.com/stretchr/testify v1.4.0 github.com/tmc/grpc-websocket-proxy v0.0.0-20200122045848-3419fae592fc - golang.org/x/net v0.0.0-20200301022130-244492dfa37a - golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 - google.golang.org/grpc v1.28.0 - google.golang.org/protobuf v1.22.0 + golang.org/x/net v0.0.0-20200822124328-c89045814202 + golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 + google.golang.org/api v0.30.0 + google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 + google.golang.org/grpc v1.33.1 + google.golang.org/protobuf v1.25.0 gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 istio.io/api v0.0.0-20200107183329-ed4b507c54e1 diff --git a/go.sum b/go.sum index cdced41e..0f9d69ac 100644 --- a/go.sum +++ b/go.sum @@ -8,12 +8,21 @@ cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.55.0 h1:eoz/lYxKSL4CNAiaUJ0ZfD1J3bfMYbU5B3rwM1C1EIU= cloud.google.com/go v0.55.0/go.mod h1:ZHmoY+/lIMNkN2+fBmuTiqZ4inFhvQad8ft7MT8IV5Y= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0 h1:xE3CPsOgttP4ACBePh79zTKALtXwn/Edhcr16R5hMWU= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= @@ -21,10 +30,14 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0 h1:Lpy6hKgdcl7a3WGSfJIFmxmcdjSpP6OmBEfcOv1Y680= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-autorest v11.1.2+incompatible h1:viZ3tV5l4gE2Sw0xrasFHytCGtzYCrT+um/rrSQ1BfA= github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -68,6 +81,7 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/aliyun/aliyun-oss-go-sdk v2.0.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6 h1:461HWTh6d9fbXX9CWR98Nv/3z70/YgtbQCMiZPKHNa8= github.com/argoproj/argo v0.0.0-20200331233432-4d1175eb68f6/go.mod h1:EPALpXM4ZpKFbQmKn722bvQUiirWNIsNe1MgmTltZkI= github.com/argoproj/pkg v0.0.0-20200318225345-d3be5f29b1a8 h1:RMfnXz1F/mOr2bBwMpShDH+HlWf7MWisDmxNZmoWH2s= @@ -178,7 +192,9 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -186,6 +202,7 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -196,6 +213,9 @@ github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -205,6 +225,11 @@ github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -212,11 +237,14 @@ github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= @@ -246,6 +274,9 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9G github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.14.4 h1:IOPK2xMPP3aV6/NPt4jt//ELFo3Vv8sDVD8j3+tleDU= github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1 h1:X2vfSnm1WC8HEo0MBHZg2TcuDUHJj6kd1TmEAQncnSA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1/go.mod h1:oVMjMN64nzEcepv1kdZKgx1qNYt4Ro0Gqefiq2JWdis= github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= @@ -440,11 +471,14 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -465,6 +499,8 @@ golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d h1:9FCpayM9Egr1baVnV1SX0H87m+XB0B8S0hAMi99X/3U= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -496,6 +532,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -511,6 +548,7 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -523,6 +561,15 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -530,6 +577,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 h1:ld7aEMNHoBnnDAX15v1T6z31v8HwR2A9FYOuAhWqkwc= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -538,6 +587,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -567,8 +617,17 @@ golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -576,6 +635,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -617,13 +678,25 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200317043434-63da46f3035e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312 h1:2PHG+Ia3gK1K2kjxZnSylizb//eyaMG8gDFbOG7wLV8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -633,14 +706,22 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -659,9 +740,22 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200317114155-1f3552e48f24/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 h1:bFFRpT+e8JJVY7lMMfvezL1ZIwqiwmPl2bsE2yx4HqM= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -674,6 +768,12 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -682,6 +782,11 @@ google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zim google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -730,6 +835,7 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= istio.io/api v0.0.0-20200107183329-ed4b507c54e1 h1:q4xggEkhMn4RMRo8AJVNmMtNzy514DGiAUxRDDKPhZU= istio.io/api v0.0.0-20200107183329-ed4b507c54e1/go.mod h1:+cyHH83OwC0rFpwk8eXctzPNpiCAbB+r6kmMiAxxBHw= istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a h1:w7zILua2dnYo9CxImhpNW4NE/8ZxEoc/wfBfHrhUhrE= @@ -768,4 +874,4 @@ sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:w sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -upper.io/db.v3 v3.6.3+incompatible/go.mod h1:FgTdD24eBjJAbPKsQSiHUNgXjOR4Lub3u1UMHSIh82Y= \ No newline at end of file +upper.io/db.v3 v3.6.3+incompatible/go.mod h1:FgTdD24eBjJAbPKsQSiHUNgXjOR4Lub3u1UMHSIh82Y= From 19be6d48f6cdbdd95c846e55977f0bc823901895 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 18:16:11 -0800 Subject: [PATCH 61/80] fix: minor cleanup for helper Dockerfile --- helper/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helper/Dockerfile b/helper/Dockerfile index 1a75b979..107ae77e 100644 --- a/helper/Dockerfile +++ b/helper/Dockerfile @@ -20,8 +20,10 @@ RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway google.golang.org/protobuf/cmd/protoc-gen-go \ google.golang.org/grpc/cmd/protoc-gen-go-grpc +RUN rm go.mod go.sum + COPY --from=builder /jq /usr/local/bin COPY --from=builder /proto/bin/protoc /usr/local/bin COPY --from=builder /proto/include /usr/local/include/ -CMD ["/app"] \ No newline at end of file +CMD ["/bin/bash"] \ No newline at end of file From 5b177a112e279b861902c4cd5c0adc6842e063de Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 18:16:30 -0800 Subject: [PATCH 62/80] feat: added option to Makefile to generate api via docker image --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index f679edeb..f1b8e661 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ protoc: api: init protoc jq +api-docker: init + docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 make api version=$(version) + docker-build: docker build -t onepanel-core . docker tag onepanel-core:latest onepanel/core:$(COMMIT_HASH) From 4359f6f099f5da4ccdcad58bde4b2633191ac104 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 18:19:16 -0800 Subject: [PATCH 63/80] chore: updated api to version 0.17.0 --- api/api.swagger.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.swagger.json b/api/api.swagger.json index 84ef337f..1fca6b14 100644 --- a/api/api.swagger.json +++ b/api/api.swagger.json @@ -3,7 +3,7 @@ "info": { "title": "Onepanel", "description": "Onepanel API", - "version": "0.16.0", + "version": "0.17.0", "contact": { "name": "Onepanel project", "url": "https://github.com/onepanelio/core" From bd2d98c14616830cefb83fe36b37ff5a5eab7f97 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 22:00:29 -0800 Subject: [PATCH 64/80] fix: removed non proto files for third party --- api/api.swagger.json | 60 +- api/gen/workflow.pb.go | 274 +- api/gen/workflow.pb.gw.go | 2 +- api/proto/workflow.proto | 2 +- .../protoc-gen-openapiv2/BUILD.bazel | 30 - api/third_party/protoc-gen-openapiv2/defs.bzl | 308 -- .../internal/genopenapi/BUILD.bazel | 57 - .../internal/genopenapi/doc.go | 2 - .../internal/genopenapi/generator.go | 241 - .../internal/genopenapi/helpers.go | 9 - .../internal/genopenapi/helpers_go111_old.go | 9 - .../internal/genopenapi/template.go | 2367 --------- .../internal/genopenapi/template_test.go | 4552 ----------------- .../internal/genopenapi/types.go | 276 - api/third_party/protoc-gen-openapiv2/main.go | 220 - .../protoc-gen-openapiv2/main_test.go | 186 - .../protoc-gen-openapiv2/options/BUILD.bazel | 38 - .../options/annotations.pb.go | 241 - .../options/openapiv2.pb.go | 2790 ---------- main.go | 23 +- 20 files changed, 180 insertions(+), 11507 deletions(-) delete mode 100644 api/third_party/protoc-gen-openapiv2/BUILD.bazel delete mode 100644 api/third_party/protoc-gen-openapiv2/defs.bzl delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go delete mode 100644 api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go delete mode 100644 api/third_party/protoc-gen-openapiv2/main.go delete mode 100644 api/third_party/protoc-gen-openapiv2/main_test.go delete mode 100644 api/third_party/protoc-gen-openapiv2/options/BUILD.bazel delete mode 100644 api/third_party/protoc-gen-openapiv2/options/annotations.pb.go delete mode 100644 api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go diff --git a/api/api.swagger.json b/api/api.swagger.json index 1fca6b14..5a66f014 100644 --- a/api/api.swagger.json +++ b/api/api.swagger.json @@ -895,6 +895,36 @@ ] } }, + "/apis/v1beta1/{namespace}/workflow_execution/statistics": { + "get": { + "operationId": "GetWorkflowExecutionStatisticsForNamespace", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetWorkflowExecutionStatisticsForNamespaceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/apis/v1beta1/{namespace}/workflow_executions": { "get": { "operationId": "ListWorkflowExecutions", @@ -1012,36 +1042,6 @@ ] } }, - "/apis/v1beta1/{namespace}/workflow_executions/statistics": { - "get": { - "operationId": "GetWorkflowExecutionStatisticsForNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/GetWorkflowExecutionStatisticsForNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/google.rpc.Status" - } - } - }, - "parameters": [ - { - "name": "namespace", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "WorkflowService" - ] - } - }, "/apis/v1beta1/{namespace}/workflow_executions/{uid}": { "get": { "operationId": "GetWorkflowExecution", diff --git a/api/gen/workflow.pb.go b/api/gen/workflow.pb.go index 31cff2d3..8f5048ca 100644 --- a/api/gen/workflow.pb.go +++ b/api/gen/workflow.pb.go @@ -2258,7 +2258,7 @@ var file_workflow_proto_rawDesc = []byte{ 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x32, 0x81, 0x17, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, + 0x73, 0x32, 0x80, 0x17, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, @@ -2278,7 +2278,7 @@ var file_workflow_proto_rawDesc = []byte{ 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, - 0xdf, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, + 0xde, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, @@ -2288,164 +2288,164 @@ var file_workflow_proto_rawDesc = []byte{ 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, - 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x99, 0x01, 0x0a, - 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, - 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, + 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, + 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, - 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x16, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, + 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, + 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0xa0, + 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3e, 0x1a, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f, 0x7b, 0x70, - 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, - 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3e, 0x1a, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, + 0x46, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, + 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, + 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, + 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x22, + 0x3e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xcd, 0x01, 0x0a, 0x23, + 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x74, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, - 0x12, 0x46, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, - 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, - 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, - 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, - 0x22, 0x3e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xcd, 0x01, 0x0a, - 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x5d, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, - 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xae, 0x01, 0x0a, - 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb6, 0x01, - 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x28, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x12, 0xbc, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0xae, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x29, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb6, 0x01, 0x0a, + 0x1b, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x28, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x22, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x3a, 0x01, 0x2a, 0x12, 0xbc, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, + 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x3a, 0x01, 0x2a, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/api/gen/workflow.pb.gw.go b/api/gen/workflow.pb.gw.go index 77695766..af141e95 100644 --- a/api/gen/workflow.pb.gw.go +++ b/api/gen/workflow.pb.gw.go @@ -2087,7 +2087,7 @@ var ( pattern_WorkflowService_CloneWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid"}, "")) - pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "statistics"}, "")) + pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workflow_execution", "statistics"}, "")) pattern_WorkflowService_GetWorkflowExecution_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "uid"}, "")) diff --git a/api/proto/workflow.proto b/api/proto/workflow.proto index a5e215a5..88295a84 100644 --- a/api/proto/workflow.proto +++ b/api/proto/workflow.proto @@ -28,7 +28,7 @@ service WorkflowService { rpc GetWorkflowExecutionStatisticsForNamespace (GetWorkflowExecutionStatisticsForNamespaceRequest) returns (GetWorkflowExecutionStatisticsForNamespaceResponse) { option (google.api.http) = { - get: "/apis/v1beta1/{namespace}/workflow_executions/statistics" + get: "/apis/v1beta1/{namespace}/workflow_execution/statistics" }; } diff --git a/api/third_party/protoc-gen-openapiv2/BUILD.bazel b/api/third_party/protoc-gen-openapiv2/BUILD.bazel deleted file mode 100644 index 90e711b1..00000000 --- a/api/third_party/protoc-gen-openapiv2/BUILD.bazel +++ /dev/null @@ -1,30 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") - -package(default_visibility = ["//visibility:private"]) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2", - deps = [ - "//internal/codegenerator:go_default_library", - "//internal/descriptor:go_default_library", - "//protoc-gen-openapiv2/internal/genopenapi:go_default_library", - "@com_github_golang_glog//:go_default_library", - "@org_golang_google_protobuf//proto:go_default_library", - "@org_golang_google_protobuf//types/pluginpb:go_default_library", - ], -) - -go_binary( - name = "protoc-gen-openapiv2", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - size = "small", - srcs = ["main_test.go"], - embed = [":go_default_library"], -) diff --git a/api/third_party/protoc-gen-openapiv2/defs.bzl b/api/third_party/protoc-gen-openapiv2/defs.bzl deleted file mode 100644 index ea322676..00000000 --- a/api/third_party/protoc-gen-openapiv2/defs.bzl +++ /dev/null @@ -1,308 +0,0 @@ -"""Generated an open-api spec for a grpc api spec. - -Reads the the api spec in protobuf format and generate an open-api spec. -Optionally applies settings from the grpc-service configuration. -""" - -load("@rules_proto//proto:defs.bzl", "ProtoInfo") - -# TODO(yannic): Replace with |proto_common.direct_source_infos| when -# https://github.com/bazelbuild/rules_proto/pull/22 lands. -def _direct_source_infos(proto_info, provided_sources = []): - """Returns sequence of `ProtoFileInfo` for `proto_info`'s direct sources. - - Files that are both in `proto_info`'s direct sources and in - `provided_sources` are skipped. This is useful, e.g., for well-known - protos that are already provided by the Protobuf runtime. - - Args: - proto_info: An instance of `ProtoInfo`. - provided_sources: Optional. A sequence of files to ignore. - Usually, these files are already provided by the - Protocol Buffer runtime (e.g. Well-Known protos). - - Returns: A sequence of `ProtoFileInfo` containing information about - `proto_info`'s direct sources. - """ - - source_root = proto_info.proto_source_root - if "." == source_root: - return [struct(file = src, import_path = src.path) for src in proto_info.direct_sources] - - offset = len(source_root) + 1 # + '/'. - - infos = [] - for src in proto_info.direct_sources: - # TODO(yannic): Remove this hack when we drop support for Bazel < 1.0. - local_offset = offset - if src.root.path and not source_root.startswith(src.root.path): - # Before Bazel 1.0, `proto_source_root` wasn't guaranteed to be a - # prefix of `src.path`. This could happend, e.g., if `file` was - # generated (https://github.com/bazelbuild/bazel/issues/9215). - local_offset += len(src.root.path) + 1 # + '/'. - infos.append(struct(file = src, import_path = src.path[local_offset:])) - - return infos - -def _run_proto_gen_openapi( - actions, - proto_info, - target_name, - transitive_proto_srcs, - protoc, - protoc_gen_openapiv2, - single_output, - allow_delete_body, - grpc_api_configuration, - json_names_for_fields, - repeated_path_param_separator, - include_package_in_tags, - fqn_for_openapi_name, - use_go_templates, - disable_default_errors, - enums_as_ints, - simple_operation_ids, - openapi_configuration, - generate_unbound_methods): - args = actions.args() - - args.add("--plugin", "protoc-gen-openapiv2=%s" % protoc_gen_openapiv2.path) - - args.add("--openapiv2_opt", "logtostderr=true") - args.add("--openapiv2_opt", "allow_repeated_fields_in_body=true") - - extra_inputs = [] - if grpc_api_configuration: - extra_inputs.append(grpc_api_configuration) - args.add("--openapiv2_opt", "grpc_api_configuration=%s" % grpc_api_configuration.path) - - if openapi_configuration: - extra_inputs.append(openapi_configuration) - args.add("--openapiv2_opt", "openapi_configuration=%s" % openapi_configuration.path) - - if not json_names_for_fields: - args.add("--openapiv2_opt", "json_names_for_fields=false") - - if fqn_for_openapi_name: - args.add("--openapiv2_opt", "fqn_for_openapi_name=true") - - if generate_unbound_methods: - args.add("--openapiv2_opt", "generate_unbound_methods=true") - - if simple_operation_ids: - args.add("--openapiv2_opt", "simple_operation_ids=true") - - if allow_delete_body: - args.add("--openapiv2_opt", "allow_delete_body=true") - - if include_package_in_tags: - args.add("--openapiv2_opt", "include_package_in_tags=true") - - if use_go_templates: - args.add("--openapiv2_opt", "use_go_templates=true") - - if disable_default_errors: - args.add("--openapiv2_opt", "disable_default_errors=true") - - if enums_as_ints: - args.add("--openapiv2_opt", "enums_as_ints=true") - - args.add("--openapiv2_opt", "repeated_path_param_separator=%s" % repeated_path_param_separator) - - proto_file_infos = _direct_source_infos(proto_info) - - # TODO(yannic): Use |proto_info.transitive_descriptor_sets| when - # https://github.com/bazelbuild/bazel/issues/9337 is fixed. - args.add_all(proto_info.transitive_proto_path, format_each = "--proto_path=%s") - - if single_output: - args.add("--openapiv2_opt", "allow_merge=true") - args.add("--openapiv2_opt", "merge_file_name=%s" % target_name) - - openapi_file = actions.declare_file("%s.swagger.json" % target_name) - args.add("--openapiv2_out", openapi_file.dirname) - - args.add_all([f.import_path for f in proto_file_infos]) - - actions.run( - executable = protoc, - tools = [protoc_gen_openapiv2], - inputs = depset( - direct = extra_inputs, - transitive = [transitive_proto_srcs], - ), - outputs = [openapi_file], - arguments = [args], - ) - - return [openapi_file] - - # TODO(yannic): We may be able to generate all files in a single action, - # but that will change at least the semantics of `use_go_template.proto`. - openapi_files = [] - for proto_file_info in proto_file_infos: - # TODO(yannic): This probably doesn't work as expected: we only add this - # option after we have seen it, so `.proto` sources that happen to be - # in the list of `.proto` files before `use_go_template.proto` will be - # compiled without this option, and all sources that get compiled after - # `use_go_template.proto` will have this option on. - if proto_file_info.file.basename == "use_go_template.proto": - args.add("--openapiv2_opt", "use_go_templates=true") - - file_name = "%s.swagger.json" % proto_file_info.import_path[:-len(".proto")] - openapi_file = actions.declare_file( - "_virtual_imports/%s/%s" % (target_name, file_name), - ) - - file_args = actions.args() - - offset = len(file_name) + 1 # + '/'. - file_args.add("--openapiv2_out", openapi_file.path[:-offset]) - - file_args.add(proto_file_info.import_path) - - actions.run( - executable = protoc, - tools = [protoc_gen_openapiv2], - inputs = depset( - direct = extra_inputs, - transitive = [transitive_proto_srcs], - ), - outputs = [openapi_file], - arguments = [args, file_args], - ) - openapi_files.append(openapi_file) - - return openapi_files - -def _proto_gen_openapi_impl(ctx): - proto = ctx.attr.proto[ProtoInfo] - return [ - DefaultInfo( - files = depset( - _run_proto_gen_openapi( - actions = ctx.actions, - proto_info = proto, - target_name = ctx.attr.name, - transitive_proto_srcs = depset( - direct = ctx.files._well_known_protos, - transitive = [proto.transitive_sources], - ), - protoc = ctx.executable._protoc, - protoc_gen_openapiv2 = ctx.executable._protoc_gen_openapi, - single_output = ctx.attr.single_output, - allow_delete_body = ctx.attr.allow_delete_body, - grpc_api_configuration = ctx.file.grpc_api_configuration, - json_names_for_fields = ctx.attr.json_names_for_fields, - repeated_path_param_separator = ctx.attr.repeated_path_param_separator, - include_package_in_tags = ctx.attr.include_package_in_tags, - fqn_for_openapi_name = ctx.attr.fqn_for_openapi_name, - use_go_templates = ctx.attr.use_go_templates, - disable_default_errors = ctx.attr.disable_default_errors, - enums_as_ints = ctx.attr.enums_as_ints, - simple_operation_ids = ctx.attr.simple_operation_ids, - openapi_configuration = ctx.file.openapi_configuration, - generate_unbound_methods = ctx.attr.generate_unbound_methods, - ), - ), - ), - ] - -protoc_gen_openapiv2 = rule( - attrs = { - "proto": attr.label( - mandatory = True, - providers = [ProtoInfo], - ), - "single_output": attr.bool( - default = False, - mandatory = False, - doc = "if set, the rule will generate a single OpenAPI file", - ), - "allow_delete_body": attr.bool( - default = False, - mandatory = False, - doc = "unless set, HTTP DELETE methods may not have a body", - ), - "grpc_api_configuration": attr.label( - allow_single_file = True, - mandatory = False, - doc = "path to file which describes the gRPC API Configuration in YAML format", - ), - "json_names_for_fields": attr.bool( - default = True, - mandatory = False, - doc = "if disabled, the original proto name will be used for generating OpenAPI definitions", - ), - "repeated_path_param_separator": attr.string( - default = "csv", - mandatory = False, - values = ["csv", "pipes", "ssv", "tsv"], - doc = "configures how repeated fields should be split." + - " Allowed values are `csv`, `pipes`, `ssv` and `tsv`", - ), - "include_package_in_tags": attr.bool( - default = False, - mandatory = False, - doc = "if unset, the gRPC service name is added to the `Tags`" + - " field of each operation. If set and the `package` directive" + - " is shown in the proto file, the package name will be " + - " prepended to the service name", - ), - "fqn_for_openapi_name": attr.bool( - default = False, - mandatory = False, - doc = "if set, the object's OpenAPI names will use the fully" + - " qualified names from the proto definition" + - " (ie my.package.MyMessage.MyInnerMessage", - ), - "use_go_templates": attr.bool( - default = False, - mandatory = False, - doc = "if set, you can use Go templates in protofile comments", - ), - "disable_default_errors": attr.bool( - default = False, - mandatory = False, - doc = "if set, disables generation of default errors." + - " This is useful if you have defined custom error handling", - ), - "enums_as_ints": attr.bool( - default = False, - mandatory = False, - doc = "whether to render enum values as integers, as opposed to string values", - ), - "simple_operation_ids": attr.bool( - default = False, - mandatory = False, - doc = "whether to remove the service prefix in the operationID" + - " generation. Can introduce duplicate operationIDs, use with caution.", - ), - "openapi_configuration": attr.label( - allow_single_file = True, - mandatory = False, - doc = "path to file which describes the OpenAPI Configuration in YAML format", - ), - "generate_unbound_methods": attr.bool( - default = False, - mandatory = False, - doc = "generate swagger metadata even for RPC methods that have" + - " no HttpRule annotation", - ), - "_protoc": attr.label( - default = "@com_google_protobuf//:protoc", - executable = True, - cfg = "host", - ), - "_well_known_protos": attr.label( - default = "@com_google_protobuf//:well_known_protos", - allow_files = True, - ), - "_protoc_gen_openapi": attr.label( - default = Label("//protoc-gen-openapiv2:protoc-gen-openapiv2"), - executable = True, - cfg = "host", - ), - }, - implementation = _proto_gen_openapi_impl, -) diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel deleted file mode 100644 index 5442a8d2..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/BUILD.bazel +++ /dev/null @@ -1,57 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -package(default_visibility = ["//protoc-gen-openapiv2:__subpackages__"]) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generator.go", - "helpers.go", - "helpers_go111_old.go", - "template.go", - "types.go", - ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi", - deps = [ - "//internal/casing:go_default_library", - "//internal/descriptor:go_default_library", - "//internal/generator:go_default_library", - "//protoc-gen-openapiv2/options:go_default_library", - "@com_github_golang_glog//:go_default_library", - "@com_github_golang_protobuf//descriptor:go_default_library_gen", - "@go_googleapis//google/api:annotations_go_proto", - "@go_googleapis//google/rpc:status_go_proto", - "@io_bazel_rules_go//proto/wkt:any_go_proto", - "@io_bazel_rules_go//proto/wkt:struct_go_proto", - "@org_golang_google_protobuf//encoding/protojson:go_default_library", - "@org_golang_google_protobuf//proto:go_default_library", - "@org_golang_google_protobuf//types/descriptorpb:go_default_library", - "@org_golang_google_protobuf//types/pluginpb:go_default_library", - ], -) - -go_test( - name = "go_default_test", - size = "small", - srcs = ["template_test.go"], - embed = [":go_default_library"], - deps = [ - "//internal/descriptor:go_default_library", - "//internal/descriptor/openapiconfig:go_default_library", - "//internal/httprule:go_default_library", - "//protoc-gen-openapiv2/options:go_default_library", - "//runtime:go_default_library", - "@com_github_google_go_cmp//cmp:go_default_library", - "@go_googleapis//google/api:annotations_go_proto", - "@io_bazel_rules_go//proto/wkt:field_mask_go_proto", - "@org_golang_google_protobuf//proto:go_default_library", - "@org_golang_google_protobuf//reflect/protodesc:go_default_library", - "@org_golang_google_protobuf//types/descriptorpb:go_default_library", - "@org_golang_google_protobuf//types/known/durationpb:go_default_library", - "@org_golang_google_protobuf//types/known/structpb:go_default_library", - "@org_golang_google_protobuf//types/known/timestamppb:go_default_library", - "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library", - "@org_golang_google_protobuf//types/pluginpb:go_default_library", - ], -) diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go deleted file mode 100644 index 42f9237f..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package genopenapi provides a code generator for OpenAPI v2. -package genopenapi diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go deleted file mode 100644 index 65a2b6a2..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/generator.go +++ /dev/null @@ -1,241 +0,0 @@ -package genopenapi - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "path/filepath" - "reflect" - "strings" - - "github.com/golang/glog" - anypb "github.com/golang/protobuf/ptypes/any" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" - gen "github.com/grpc-ecosystem/grpc-gateway/v2/internal/generator" - openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - statuspb "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/descriptorpb" - "google.golang.org/protobuf/types/pluginpb" - - //nolint:staticcheck // Known issue, will be replaced when possible - legacydescriptor "github.com/golang/protobuf/descriptor" -) - -var ( - errNoTargetService = errors.New("no target service defined in the file") -) - -type generator struct { - reg *descriptor.Registry -} - -type wrapper struct { - fileName string - swagger *openapiSwaggerObject -} - -// New returns a new generator which generates grpc gateway files. -func New(reg *descriptor.Registry) gen.Generator { - return &generator{reg: reg} -} - -// Merge a lot of OpenAPI file (wrapper) to single one OpenAPI file -func mergeTargetFile(targets []*wrapper, mergeFileName string) *wrapper { - var mergedTarget *wrapper - for _, f := range targets { - if mergedTarget == nil { - mergedTarget = &wrapper{ - fileName: mergeFileName, - swagger: f.swagger, - } - } else { - for k, v := range f.swagger.Definitions { - mergedTarget.swagger.Definitions[k] = v - } - for k, v := range f.swagger.Paths { - mergedTarget.swagger.Paths[k] = v - } - for k, v := range f.swagger.SecurityDefinitions { - mergedTarget.swagger.SecurityDefinitions[k] = v - } - mergedTarget.swagger.Security = append(mergedTarget.swagger.Security, f.swagger.Security...) - } - } - return mergedTarget -} - -// Q: What's up with the alias types here? -// A: We don't want to completely override how these structs are marshaled into -// JSON, we only want to add fields (see below, extensionMarshalJSON). -// An infinite recursion would happen if we'd call json.Marshal on the struct -// that has swaggerObject as an embedded field. To avoid that, we'll create -// type aliases, and those don't have the custom MarshalJSON methods defined -// on them. See http://choly.ca/post/go-json-marshalling/ (or, if it ever -// goes away, use -// https://web.archive.org/web/20190806073003/http://choly.ca/post/go-json-marshalling/. -func (so openapiSwaggerObject) MarshalJSON() ([]byte, error) { - type alias openapiSwaggerObject - return extensionMarshalJSON(alias(so), so.extensions) -} - -func (so openapiInfoObject) MarshalJSON() ([]byte, error) { - type alias openapiInfoObject - return extensionMarshalJSON(alias(so), so.extensions) -} - -func (so openapiSecuritySchemeObject) MarshalJSON() ([]byte, error) { - type alias openapiSecuritySchemeObject - return extensionMarshalJSON(alias(so), so.extensions) -} - -func (so openapiOperationObject) MarshalJSON() ([]byte, error) { - type alias openapiOperationObject - return extensionMarshalJSON(alias(so), so.extensions) -} - -func (so openapiResponseObject) MarshalJSON() ([]byte, error) { - type alias openapiResponseObject - return extensionMarshalJSON(alias(so), so.extensions) -} - -func extensionMarshalJSON(so interface{}, extensions []extension) ([]byte, error) { - // To append arbitrary keys to the struct we'll render into json, - // we're creating another struct that embeds the original one, and - // its extra fields: - // - // The struct will look like - // struct { - // *openapiCore - // XGrpcGatewayFoo json.RawMessage `json:"x-grpc-gateway-foo"` - // XGrpcGatewayBar json.RawMessage `json:"x-grpc-gateway-bar"` - // } - // and thus render into what we want -- the JSON of openapiCore with the - // extensions appended. - fields := []reflect.StructField{ - { // embedded - Name: "Embedded", - Type: reflect.TypeOf(so), - Anonymous: true, - }, - } - for _, ext := range extensions { - fields = append(fields, reflect.StructField{ - Name: fieldName(ext.key), - Type: reflect.TypeOf(ext.value), - Tag: reflect.StructTag(fmt.Sprintf("json:\"%s\"", ext.key)), - }) - } - - t := reflect.StructOf(fields) - s := reflect.New(t).Elem() - s.Field(0).Set(reflect.ValueOf(so)) - for _, ext := range extensions { - s.FieldByName(fieldName(ext.key)).Set(reflect.ValueOf(ext.value)) - } - return json.Marshal(s.Interface()) -} - -// encodeOpenAPI converts OpenAPI file obj to pluginpb.CodeGeneratorResponse_File -func encodeOpenAPI(file *wrapper) (*descriptor.ResponseFile, error) { - var formatted bytes.Buffer - enc := json.NewEncoder(&formatted) - enc.SetIndent("", " ") - if err := enc.Encode(*file.swagger); err != nil { - return nil, err - } - name := file.fileName - ext := filepath.Ext(name) - base := strings.TrimSuffix(name, ext) - output := fmt.Sprintf("%s.swagger.json", base) - return &descriptor.ResponseFile{ - CodeGeneratorResponse_File: &pluginpb.CodeGeneratorResponse_File{ - Name: proto.String(output), - Content: proto.String(formatted.String()), - }, - }, nil -} - -func (g *generator) Generate(targets []*descriptor.File) ([]*descriptor.ResponseFile, error) { - var files []*descriptor.ResponseFile - if g.reg.IsAllowMerge() { - var mergedTarget *descriptor.File - // try to find proto leader - for _, f := range targets { - if proto.HasExtension(f.Options, openapi_options.E_Openapiv2Swagger) { - mergedTarget = f - break - } - } - // merge protos to leader - for _, f := range targets { - if mergedTarget == nil { - mergedTarget = f - } else if mergedTarget != f { - mergedTarget.Enums = append(mergedTarget.Enums, f.Enums...) - mergedTarget.Messages = append(mergedTarget.Messages, f.Messages...) - mergedTarget.Services = append(mergedTarget.Services, f.Services...) - } - } - - targets = nil - targets = append(targets, mergedTarget) - } - - var openapis []*wrapper - for _, file := range targets { - glog.V(1).Infof("Processing %s", file.GetName()) - swagger, err := applyTemplate(param{File: file, reg: g.reg}) - if err == errNoTargetService { - glog.V(1).Infof("%s: %v", file.GetName(), err) - continue - } - if err != nil { - return nil, err - } - openapis = append(openapis, &wrapper{ - fileName: file.GetName(), - swagger: swagger, - }) - } - - if g.reg.IsAllowMerge() { - targetOpenAPI := mergeTargetFile(openapis, g.reg.GetMergeFileName()) - f, err := encodeOpenAPI(targetOpenAPI) - if err != nil { - return nil, fmt.Errorf("failed to encode OpenAPI for %s: %s", g.reg.GetMergeFileName(), err) - } - files = append(files, f) - glog.V(1).Infof("New OpenAPI file will emit") - } else { - for _, file := range openapis { - f, err := encodeOpenAPI(file) - if err != nil { - return nil, fmt.Errorf("failed to encode OpenAPI for %s: %s", file.fileName, err) - } - files = append(files, f) - glog.V(1).Infof("New OpenAPI file will emit") - } - } - return files, nil -} - -// AddErrorDefs Adds google.rpc.Status and google.protobuf.Any -// to registry (used for error-related API responses) -func AddErrorDefs(reg *descriptor.Registry) error { - // load internal protos - any, _ := legacydescriptor.MessageDescriptorProto(&anypb.Any{}) - any.SourceCodeInfo = new(descriptorpb.SourceCodeInfo) - status, _ := legacydescriptor.MessageDescriptorProto(&statuspb.Status{}) - status.SourceCodeInfo = new(descriptorpb.SourceCodeInfo) - // TODO(johanbrandhorst): Use new conversion later when possible - // any := protodesc.ToFileDescriptorProto((&anypb.Any{}).ProtoReflect().Descriptor().ParentFile()) - // status := protodesc.ToFileDescriptorProto((&statuspb.Status{}).ProtoReflect().Descriptor().ParentFile()) - return reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{ - any, - status, - }, - }) -} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go deleted file mode 100644 index c53d6802..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers.go +++ /dev/null @@ -1,9 +0,0 @@ -//+build go1.12 - -package genopenapi - -import "strings" - -func fieldName(k string) string { - return strings.ReplaceAll(strings.Title(k), "-", "_") -} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go deleted file mode 100644 index b8db1196..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/helpers_go111_old.go +++ /dev/null @@ -1,9 +0,0 @@ -//+build !go1.12 - -package genopenapi - -import "strings" - -func fieldName(k string) string { - return strings.Replace(strings.Title(k), "-", "_", -1) -} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go deleted file mode 100644 index 1c079391..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template.go +++ /dev/null @@ -1,2367 +0,0 @@ -package genopenapi - -import ( - "bytes" - "encoding/json" - "fmt" - "io/ioutil" - "math" - "net/textproto" - "os" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "sync" - "text/template" - "time" - - "github.com/golang/glog" - structpb "github.com/golang/protobuf/ptypes/struct" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/casing" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" - openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - "google.golang.org/genproto/googleapis/api/annotations" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/descriptorpb" -) - -// wktSchemas are the schemas of well-known-types. -// The schemas must match with the behavior of the JSON unmarshaler in -// https://github.com/protocolbuffers/protobuf-go/blob/v1.25.0/encoding/protojson/well_known_types.go -var wktSchemas = map[string]schemaCore{ - ".google.protobuf.FieldMask": { - Type: "string", - }, - ".google.protobuf.Timestamp": { - Type: "string", - Format: "date-time", - }, - ".google.protobuf.Duration": { - Type: "string", - }, - ".google.protobuf.StringValue": { - Type: "string", - }, - ".google.protobuf.BytesValue": { - Type: "string", - Format: "byte", - }, - ".google.protobuf.Int32Value": { - Type: "integer", - Format: "int32", - }, - ".google.protobuf.UInt32Value": { - Type: "integer", - Format: "int64", - }, - ".google.protobuf.Int64Value": { - Type: "string", - Format: "int64", - }, - ".google.protobuf.UInt64Value": { - Type: "string", - Format: "uint64", - }, - ".google.protobuf.FloatValue": { - Type: "number", - Format: "float", - }, - ".google.protobuf.DoubleValue": { - Type: "number", - Format: "double", - }, - ".google.protobuf.BoolValue": { - Type: "boolean", - }, - ".google.protobuf.Empty": {}, - ".google.protobuf.Struct": { - Type: "object", - }, - ".google.protobuf.Value": { - Type: "object", - }, - ".google.protobuf.ListValue": { - Type: "array", - Items: (*openapiItemsObject)(&schemaCore{ - Type: "object", - }), - }, - ".google.protobuf.NullValue": { - Type: "string", - }, -} - -func listEnumNames(enum *descriptor.Enum) (names []string) { - for _, value := range enum.GetValue() { - names = append(names, value.GetName()) - } - return names -} - -func listEnumNumbers(enum *descriptor.Enum) (numbers []string) { - for _, value := range enum.GetValue() { - numbers = append(numbers, strconv.Itoa(int(value.GetNumber()))) - } - return -} - -func getEnumDefault(enum *descriptor.Enum) string { - for _, value := range enum.GetValue() { - if value.GetNumber() == 0 { - return value.GetName() - } - } - return "" -} - -// messageToQueryParameters converts a message to a list of OpenAPI query parameters. -func messageToQueryParameters(message *descriptor.Message, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []openapiParameterObject, err error) { - for _, field := range message.Fields { - p, err := queryParams(message, field, "", reg, pathParams, body) - if err != nil { - return nil, err - } - params = append(params, p...) - } - return params, nil -} - -// queryParams converts a field to a list of OpenAPI query parameters recursively through the use of nestedQueryParams. -func queryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body) (params []openapiParameterObject, err error) { - return nestedQueryParams(message, field, prefix, reg, pathParams, body, map[string]bool{}) -} - -// nestedQueryParams converts a field to a list of OpenAPI query parameters recursively. -// This function is a helper function for queryParams, that keeps track of cyclical message references -// through the use of -// touched map[string]bool -// If a cycle is discovered, an error is returned, as cyclical data structures aren't allowed -// in query parameters. -func nestedQueryParams(message *descriptor.Message, field *descriptor.Field, prefix string, reg *descriptor.Registry, pathParams []descriptor.Parameter, body *descriptor.Body, touchedIn map[string]bool) (params []openapiParameterObject, err error) { - // make sure the parameter is not already listed as a path parameter - for _, pathParam := range pathParams { - if pathParam.Target == field { - return nil, nil - } - } - // make sure the parameter is not already listed as a body parameter - if body != nil { - if body.FieldPath == nil { - return nil, nil - } - for _, fieldPath := range body.FieldPath { - if fieldPath.Target == field { - return nil, nil - } - } - } - schema := schemaOfField(field, reg, nil) - fieldType := field.GetTypeName() - if message.File != nil { - comments := fieldProtoComments(reg, message, field) - if err := updateOpenAPIDataFromComments(reg, &schema, message, comments, false); err != nil { - return nil, err - } - } - - isEnum := field.GetType() == descriptorpb.FieldDescriptorProto_TYPE_ENUM - items := schema.Items - if schema.Type != "" || isEnum { - if schema.Type == "object" { - return nil, nil // TODO: currently, mapping object in query parameter is not supported - } - if items != nil && (items.Type == "" || items.Type == "object") && !isEnum { - return nil, nil // TODO: currently, mapping object in query parameter is not supported - } - desc := schema.Description - if schema.Title != "" { // merge title because title of parameter object will be ignored - desc = strings.TrimSpace(schema.Title + ". " + schema.Description) - } - - // verify if the field is required - required := false - for _, fieldName := range schema.Required { - if fieldName == field.GetName() { - required = true - break - } - } - - param := openapiParameterObject{ - Description: desc, - In: "query", - Default: schema.Default, - Type: schema.Type, - Items: schema.Items, - Format: schema.Format, - Required: required, - } - if param.Type == "array" { - param.CollectionFormat = "multi" - } - - if reg.GetUseJSONNamesForFields() { - param.Name = prefix + field.GetJsonName() - } else { - param.Name = prefix + field.GetName() - } - - if isEnum { - enum, err := reg.LookupEnum("", fieldType) - if err != nil { - return nil, fmt.Errorf("unknown enum type %s", fieldType) - } - if items != nil { // array - param.Items = &openapiItemsObject{ - Type: "string", - Enum: listEnumNames(enum), - } - if reg.GetEnumsAsInts() { - param.Items.Type = "integer" - param.Items.Enum = listEnumNumbers(enum) - } - } else { - param.Type = "string" - param.Enum = listEnumNames(enum) - param.Default = getEnumDefault(enum) - if reg.GetEnumsAsInts() { - param.Type = "integer" - param.Enum = listEnumNumbers(enum) - param.Default = "0" - } - } - valueComments := enumValueProtoComments(reg, enum) - if valueComments != "" { - param.Description = strings.TrimLeft(param.Description+"\n\n "+valueComments, "\n") - } - } - return []openapiParameterObject{param}, nil - } - - // nested type, recurse - msg, err := reg.LookupMsg("", fieldType) - if err != nil { - return nil, fmt.Errorf("unknown message type %s", fieldType) - } - - // Check for cyclical message reference: - isCycle := touchedIn[*msg.Name] - if isCycle { - return nil, fmt.Errorf("recursive types are not allowed for query parameters, cycle found on %q", fieldType) - } - - // Construct a new map with the message name so a cycle further down the recursive path can be detected. - // Do not keep anything in the original touched reference and do not pass that reference along. This will - // prevent clobbering adjacent records while recursing. - touchedOut := make(map[string]bool) - for k, v := range touchedIn { - touchedOut[k] = v - } - touchedOut[*msg.Name] = true - - for _, nestedField := range msg.Fields { - var fieldName string - if reg.GetUseJSONNamesForFields() { - fieldName = field.GetJsonName() - } else { - fieldName = field.GetName() - } - p, err := nestedQueryParams(msg, nestedField, prefix+fieldName+".", reg, pathParams, body, touchedOut) - if err != nil { - return nil, err - } - params = append(params, p...) - } - return params, nil -} - -// findServicesMessagesAndEnumerations discovers all messages and enums defined in the RPC methods of the service. -func findServicesMessagesAndEnumerations(s []*descriptor.Service, reg *descriptor.Registry, m messageMap, ms messageMap, e enumMap, refs refMap) { - for _, svc := range s { - for _, meth := range svc.Methods { - // Request may be fully included in query - { - swgReqName, ok := fullyQualifiedNameToOpenAPIName(meth.RequestType.FQMN(), reg) - if !ok { - glog.Errorf("couldn't resolve OpenAPI name for FQMN '%v'", meth.RequestType.FQMN()) - continue - } - if _, ok := refs[fmt.Sprintf("#/definitions/%s", swgReqName)]; ok { - if !skipRenderingRef(meth.RequestType.FQMN()) { - m[swgReqName] = meth.RequestType - } - } - } - - swgRspName, ok := fullyQualifiedNameToOpenAPIName(meth.ResponseType.FQMN(), reg) - if !ok && !skipRenderingRef(meth.ResponseType.FQMN()) { - glog.Errorf("couldn't resolve OpenAPI name for FQMN '%v'", meth.ResponseType.FQMN()) - continue - } - - findNestedMessagesAndEnumerations(meth.RequestType, reg, m, e) - - if !skipRenderingRef(meth.ResponseType.FQMN()) { - m[swgRspName] = meth.ResponseType - } - findNestedMessagesAndEnumerations(meth.ResponseType, reg, m, e) - } - } -} - -// findNestedMessagesAndEnumerations those can be generated by the services. -func findNestedMessagesAndEnumerations(message *descriptor.Message, reg *descriptor.Registry, m messageMap, e enumMap) { - // Iterate over all the fields that - for _, t := range message.Fields { - fieldType := t.GetTypeName() - // If the type is an empty string then it is a proto primitive - if fieldType != "" { - if _, ok := m[fieldType]; !ok { - msg, err := reg.LookupMsg("", fieldType) - if err != nil { - enum, err := reg.LookupEnum("", fieldType) - if err != nil { - panic(err) - } - e[fieldType] = enum - continue - } - m[fieldType] = msg - findNestedMessagesAndEnumerations(msg, reg, m, e) - } - } - } -} - -func skipRenderingRef(refName string) bool { - _, ok := wktSchemas[refName] - return ok -} - -func renderMessagesAsDefinition(messages messageMap, d openapiDefinitionsObject, reg *descriptor.Registry, customRefs refMap) { - for name, msg := range messages { - swgName, ok := fullyQualifiedNameToOpenAPIName(msg.FQMN(), reg) - if !ok { - panic(fmt.Sprintf("can't resolve OpenAPI name from '%v'", msg.FQMN())) - } - if skipRenderingRef(name) { - continue - } - - if opt := msg.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry { - continue - } - schema := openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "object", - }, - } - msgComments := protoComments(reg, msg.File, msg.Outers, "MessageType", int32(msg.Index)) - if err := updateOpenAPIDataFromComments(reg, &schema, msg, msgComments, false); err != nil { - panic(err) - } - opts, err := getMessageOpenAPIOption(reg, msg) - if err != nil { - panic(err) - } - if opts != nil { - protoSchema := openapiSchemaFromProtoSchema(opts, reg, customRefs, msg) - - // Warning: Make sure not to overwrite any fields already set on the schema type. - schema.ExternalDocs = protoSchema.ExternalDocs - schema.ReadOnly = protoSchema.ReadOnly - schema.MultipleOf = protoSchema.MultipleOf - schema.Maximum = protoSchema.Maximum - schema.ExclusiveMaximum = protoSchema.ExclusiveMaximum - schema.Minimum = protoSchema.Minimum - schema.ExclusiveMinimum = protoSchema.ExclusiveMinimum - schema.MaxLength = protoSchema.MaxLength - schema.MinLength = protoSchema.MinLength - schema.Pattern = protoSchema.Pattern - schema.Default = protoSchema.Default - schema.MaxItems = protoSchema.MaxItems - schema.MinItems = protoSchema.MinItems - schema.UniqueItems = protoSchema.UniqueItems - schema.MaxProperties = protoSchema.MaxProperties - schema.MinProperties = protoSchema.MinProperties - schema.Required = protoSchema.Required - if protoSchema.schemaCore.Type != "" || protoSchema.schemaCore.Ref != "" { - schema.schemaCore = protoSchema.schemaCore - } - if protoSchema.Title != "" { - schema.Title = protoSchema.Title - } - if protoSchema.Description != "" { - schema.Description = protoSchema.Description - } - if protoSchema.Example != nil { - schema.Example = protoSchema.Example - } - } - - for _, f := range msg.Fields { - fieldValue := schemaOfField(f, reg, customRefs) - comments := fieldProtoComments(reg, msg, f) - if err := updateOpenAPIDataFromComments(reg, &fieldValue, f, comments, false); err != nil { - panic(err) - } - - if requiredIdx := find(schema.Required, *f.Name); requiredIdx != -1 && reg.GetUseJSONNamesForFields() { - schema.Required[requiredIdx] = f.GetJsonName() - } - - if fieldValue.Required != nil { - for _, req := range fieldValue.Required { - if reg.GetUseJSONNamesForFields() { - schema.Required = append(schema.Required, f.GetJsonName()) - } else { - schema.Required = append(schema.Required, req) - } - } - } - - kv := keyVal{Value: fieldValue} - if reg.GetUseJSONNamesForFields() { - kv.Key = f.GetJsonName() - } else { - kv.Key = f.GetName() - } - if schema.Properties == nil { - schema.Properties = &openapiSchemaObjectProperties{} - } - *schema.Properties = append(*schema.Properties, kv) - } - d[swgName] = schema - } -} - -// schemaOfField returns a OpenAPI Schema Object for a protobuf field. -func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) openapiSchemaObject { - const ( - singular = 0 - array = 1 - object = 2 - ) - var ( - core schemaCore - aggregate int - ) - - fd := f.FieldDescriptorProto - if m, err := reg.LookupMsg("", f.GetTypeName()); err == nil { - if opt := m.GetOptions(); opt != nil && opt.MapEntry != nil && *opt.MapEntry { - fd = m.GetField()[1] - aggregate = object - } - } - if fd.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED { - aggregate = array - } - - var props *openapiSchemaObjectProperties - - switch ft := fd.GetType(); ft { - case descriptorpb.FieldDescriptorProto_TYPE_ENUM, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE, descriptorpb.FieldDescriptorProto_TYPE_GROUP: - if wktSchema, ok := wktSchemas[fd.GetTypeName()]; ok { - core = wktSchema - - if fd.GetTypeName() == ".google.protobuf.Empty" { - props = &openapiSchemaObjectProperties{} - } - } else { - swgRef, ok := fullyQualifiedNameToOpenAPIName(fd.GetTypeName(), reg) - if !ok { - panic(fmt.Sprintf("can't resolve OpenAPI ref from typename '%v'", fd.GetTypeName())) - } - core = schemaCore{ - Ref: "#/definitions/" + swgRef, - } - if refs != nil { - refs[fd.GetTypeName()] = struct{}{} - } - } - default: - ftype, format, ok := primitiveSchema(ft) - if ok { - core = schemaCore{Type: ftype, Format: format} - } else { - core = schemaCore{Type: ft.String(), Format: "UNKNOWN"} - } - } - - ret := openapiSchemaObject{} - - switch aggregate { - case array: - ret = openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "array", - Items: (*openapiItemsObject)(&core), - }, - } - case object: - ret = openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "object", - }, - AdditionalProperties: &openapiSchemaObject{Properties: props, schemaCore: core}, - } - default: - ret = openapiSchemaObject{ - schemaCore: core, - Properties: props, - } - } - - if j, err := getFieldOpenAPIOption(reg, f); err == nil { - updateswaggerObjectFromJSONSchema(&ret, j, reg, f) - } - - if j, err := getFieldBehaviorOption(reg, f); err == nil { - updateSwaggerObjectFromFieldBehavior(&ret, j, f) - } - - return ret -} - -// primitiveSchema returns a pair of "Type" and "Format" in JSON Schema for -// the given primitive field type. -// The last return parameter is true iff the field type is actually primitive. -func primitiveSchema(t descriptorpb.FieldDescriptorProto_Type) (ftype, format string, ok bool) { - switch t { - case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE: - return "number", "double", true - case descriptorpb.FieldDescriptorProto_TYPE_FLOAT: - return "number", "float", true - case descriptorpb.FieldDescriptorProto_TYPE_INT64: - return "string", "int64", true - case descriptorpb.FieldDescriptorProto_TYPE_UINT64: - // 64bit integer types are marshaled as string in the default JSONPb marshaler. - // TODO(yugui) Add an option to declare 64bit integers as int64. - // - // NOTE: uint64 is not a predefined format of integer type in OpenAPI spec. - // So we cannot expect that uint64 is commonly supported by OpenAPI processor. - return "string", "uint64", true - case descriptorpb.FieldDescriptorProto_TYPE_INT32: - return "integer", "int32", true - case descriptorpb.FieldDescriptorProto_TYPE_FIXED64: - // Ditto. - return "string", "uint64", true - case descriptorpb.FieldDescriptorProto_TYPE_FIXED32: - // Ditto. - return "integer", "int64", true - case descriptorpb.FieldDescriptorProto_TYPE_BOOL: - // NOTE: in OpenAPI specification, format should be empty on boolean type - return "boolean", "", true - case descriptorpb.FieldDescriptorProto_TYPE_STRING: - // NOTE: in OpenAPI specification, format should be empty on string type - return "string", "", true - case descriptorpb.FieldDescriptorProto_TYPE_BYTES: - return "string", "byte", true - case descriptorpb.FieldDescriptorProto_TYPE_UINT32: - // Ditto. - return "integer", "int64", true - case descriptorpb.FieldDescriptorProto_TYPE_SFIXED32: - return "integer", "int32", true - case descriptorpb.FieldDescriptorProto_TYPE_SFIXED64: - return "string", "int64", true - case descriptorpb.FieldDescriptorProto_TYPE_SINT32: - return "integer", "int32", true - case descriptorpb.FieldDescriptorProto_TYPE_SINT64: - return "string", "int64", true - default: - return "", "", false - } -} - -// renderEnumerationsAsDefinition inserts enums into the definitions object. -func renderEnumerationsAsDefinition(enums enumMap, d openapiDefinitionsObject, reg *descriptor.Registry) { - for _, enum := range enums { - swgName, ok := fullyQualifiedNameToOpenAPIName(enum.FQEN(), reg) - if !ok { - panic(fmt.Sprintf("can't resolve OpenAPI name from FQEN '%v'", enum.FQEN())) - } - enumComments := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index)) - - // it may be necessary to sort the result of the GetValue function. - enumNames := listEnumNames(enum) - defaultValue := getEnumDefault(enum) - valueComments := enumValueProtoComments(reg, enum) - if valueComments != "" { - enumComments = strings.TrimLeft(enumComments+"\n\n "+valueComments, "\n") - } - enumSchemaObject := openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - Enum: enumNames, - Default: defaultValue, - }, - } - if reg.GetEnumsAsInts() { - enumSchemaObject.Type = "integer" - enumSchemaObject.Format = "int32" - enumSchemaObject.Default = "0" - enumSchemaObject.Enum = listEnumNumbers(enum) - } - if err := updateOpenAPIDataFromComments(reg, &enumSchemaObject, enum, enumComments, false); err != nil { - panic(err) - } - - d[swgName] = enumSchemaObject - } -} - -// Take in a FQMN or FQEN and return a OpenAPI safe version of the FQMN and -// a boolean indicating if FQMN was properly resolved. -func fullyQualifiedNameToOpenAPIName(fqn string, reg *descriptor.Registry) (string, bool) { - registriesSeenMutex.Lock() - defer registriesSeenMutex.Unlock() - if mapping, present := registriesSeen[reg]; present { - ret, ok := mapping[fqn] - return ret, ok - } - mapping := resolveFullyQualifiedNameToOpenAPINames(append(reg.GetAllFQMNs(), reg.GetAllFQENs()...), reg.GetUseFQNForOpenAPIName()) - registriesSeen[reg] = mapping - ret, ok := mapping[fqn] - return ret, ok -} - -// Lookup message type by location.name and return a openapiv2-safe version -// of its FQMN. -func lookupMsgAndOpenAPIName(location, name string, reg *descriptor.Registry) (*descriptor.Message, string, error) { - msg, err := reg.LookupMsg(location, name) - if err != nil { - return nil, "", err - } - swgName, ok := fullyQualifiedNameToOpenAPIName(msg.FQMN(), reg) - if !ok { - return nil, "", fmt.Errorf("can't map OpenAPI name from FQMN '%v'", msg.FQMN()) - } - return msg, swgName, nil -} - -// registriesSeen is used to memoise calls to resolveFullyQualifiedNameToOpenAPINames so -// we don't repeat it unnecessarily, since it can take some time. -var registriesSeen = map[*descriptor.Registry]map[string]string{} -var registriesSeenMutex sync.Mutex - -// Take the names of every proto and "uniq-ify" them. The idea is to produce a -// set of names that meet a couple of conditions. They must be stable, they -// must be unique, and they must be shorter than the FQN. -// -// This likely could be made better. This will always generate the same names -// but may not always produce optimal names. This is a reasonably close -// approximation of what they should look like in most cases. -func resolveFullyQualifiedNameToOpenAPINames(messages []string, useFQNForOpenAPIName bool) map[string]string { - packagesByDepth := make(map[int][][]string) - uniqueNames := make(map[string]string) - - hierarchy := func(pkg string) []string { - return strings.Split(pkg, ".") - } - - for _, p := range messages { - h := hierarchy(p) - for depth := range h { - if _, ok := packagesByDepth[depth]; !ok { - packagesByDepth[depth] = make([][]string, 0) - } - packagesByDepth[depth] = append(packagesByDepth[depth], h[len(h)-depth:]) - } - } - - count := func(list [][]string, item []string) int { - i := 0 - for _, element := range list { - if reflect.DeepEqual(element, item) { - i++ - } - } - return i - } - - for _, p := range messages { - if useFQNForOpenAPIName { - // strip leading dot from proto fqn - uniqueNames[p] = p[1:] - } else { - h := hierarchy(p) - for depth := 0; depth < len(h); depth++ { - if count(packagesByDepth[depth], h[len(h)-depth:]) == 1 { - uniqueNames[p] = strings.Join(h[len(h)-depth-1:], "") - break - } - if depth == len(h)-1 { - uniqueNames[p] = strings.Join(h, "") - } - } - } - } - return uniqueNames -} - -var canRegexp = regexp.MustCompile("{([a-zA-Z][a-zA-Z0-9_.]*).*}") - -// OpenAPI expects paths of the form /path/{string_value} but gRPC-Gateway paths are expected to be of the form /path/{string_value=strprefix/*}. This should reformat it correctly. -func templateToOpenAPIPath(path string, reg *descriptor.Registry, fields []*descriptor.Field, msgs []*descriptor.Message) string { - // It seems like the right thing to do here is to just use - // strings.Split(path, "/") but that breaks badly when you hit a url like - // /{my_field=prefix/*}/ and end up with 2 sections representing my_field. - // Instead do the right thing and write a small pushdown (counter) automata - // for it. - var parts []string - depth := 0 - buffer := "" - jsonBuffer := "" - for _, char := range path { - switch char { - case '{': - // Push on the stack - depth++ - buffer += string(char) - jsonBuffer = "" - jsonBuffer += string(char) - case '}': - if depth == 0 { - panic("Encountered } without matching { before it.") - } - // Pop from the stack - depth-- - buffer += string(char) - if reg.GetUseJSONNamesForFields() && - len(jsonBuffer) > 1 { - jsonSnakeCaseName := string(jsonBuffer[1:]) - jsonCamelCaseName := string(lowerCamelCase(jsonSnakeCaseName, fields, msgs)) - prev := string(buffer[:len(buffer)-len(jsonSnakeCaseName)-2]) - buffer = strings.Join([]string{prev, "{", jsonCamelCaseName, "}"}, "") - jsonBuffer = "" - } - case '/': - if depth == 0 { - parts = append(parts, buffer) - buffer = "" - // Since the stack was empty when we hit the '/' we are done with this - // section. - continue - } - buffer += string(char) - jsonBuffer += string(char) - default: - buffer += string(char) - jsonBuffer += string(char) - } - } - - // Now append the last element to parts - parts = append(parts, buffer) - - // Parts is now an array of segments of the path. Interestingly, since the - // syntax for this subsection CAN be handled by a regexp since it has no - // memory. - for index, part := range parts { - // If part is a resource name such as "parent", "name", "user.name", the format info must be retained. - prefix := canRegexp.ReplaceAllString(part, "$1") - if isResourceName(prefix) { - continue - } - parts[index] = canRegexp.ReplaceAllString(part, "{$1}") - } - - return strings.Join(parts, "/") -} - -func isResourceName(prefix string) bool { - words := strings.Split(prefix, ".") - l := len(words) - field := words[l-1] - words = strings.Split(field, ":") - field = words[0] - return field == "parent" || field == "name" -} - -func renderServiceTags(services []*descriptor.Service) []openapiTagObject { - var tags []openapiTagObject - for _, svc := range services { - tag := openapiTagObject{ - Name: *svc.Name, - } - if proto.HasExtension(svc.Options, openapi_options.E_Openapiv2Tag) { - ext := proto.GetExtension(svc.Options, openapi_options.E_Openapiv2Tag) - opts, ok := ext.(*openapi_options.Tag) - if !ok { - glog.Errorf("extension is %T; want an OpenAPI Tag object", ext) - return nil - } - - tag.Description = opts.Description - if opts.ExternalDocs != nil { - tag.ExternalDocs = &openapiExternalDocumentationObject{ - Description: opts.ExternalDocs.Description, - URL: opts.ExternalDocs.Url, - } - } - } - tags = append(tags, tag) - } - return tags -} - -func renderServices(services []*descriptor.Service, paths openapiPathsObject, reg *descriptor.Registry, requestResponseRefs, customRefs refMap, msgs []*descriptor.Message) error { - // Correctness of svcIdx and methIdx depends on 'services' containing the services in the same order as the 'file.Service' array. - svcBaseIdx := 0 - var lastFile *descriptor.File = nil - for svcIdx, svc := range services { - if svc.File != lastFile { - lastFile = svc.File - svcBaseIdx = svcIdx - } - for methIdx, meth := range svc.Methods { - for bIdx, b := range meth.Bindings { - // Iterate over all the OpenAPI parameters - parameters := openapiParametersObject{} - for _, parameter := range b.PathParams { - - var paramType, paramFormat, desc, collectionFormat, defaultValue string - var enumNames []string - var items *openapiItemsObject - var minItems *int - switch pt := parameter.Target.GetType(); pt { - case descriptorpb.FieldDescriptorProto_TYPE_GROUP, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE: - if descriptor.IsWellKnownType(parameter.Target.GetTypeName()) { - if parameter.IsRepeated() { - return fmt.Errorf("only primitive and enum types are allowed in repeated path parameters") - } - schema := schemaOfField(parameter.Target, reg, customRefs) - paramType = schema.Type - paramFormat = schema.Format - desc = schema.Description - defaultValue = schema.Default - } else { - return fmt.Errorf("only primitive and well-known types are allowed in path parameters") - } - case descriptorpb.FieldDescriptorProto_TYPE_ENUM: - enum, err := reg.LookupEnum("", parameter.Target.GetTypeName()) - if err != nil { - return err - } - paramType = "string" - paramFormat = "" - enumNames = listEnumNames(enum) - if reg.GetEnumsAsInts() { - paramType = "integer" - paramFormat = "" - enumNames = listEnumNumbers(enum) - } - schema := schemaOfField(parameter.Target, reg, customRefs) - desc = schema.Description - defaultValue = schema.Default - default: - var ok bool - paramType, paramFormat, ok = primitiveSchema(pt) - if !ok { - return fmt.Errorf("unknown field type %v", pt) - } - - schema := schemaOfField(parameter.Target, reg, customRefs) - desc = schema.Description - defaultValue = schema.Default - } - - if parameter.IsRepeated() { - core := schemaCore{Type: paramType, Format: paramFormat} - if parameter.IsEnum() { - var s []string - core.Enum = enumNames - enumNames = s - } - items = (*openapiItemsObject)(&core) - paramType = "array" - paramFormat = "" - collectionFormat = reg.GetRepeatedPathParamSeparatorName() - minItems = new(int) - *minItems = 1 - } - - if desc == "" { - desc = fieldProtoComments(reg, parameter.Target.Message, parameter.Target) - } - parameterString := parameter.String() - if reg.GetUseJSONNamesForFields() { - parameterString = lowerCamelCase(parameterString, meth.RequestType.Fields, msgs) - } - parameters = append(parameters, openapiParameterObject{ - Name: parameterString, - Description: desc, - In: "path", - Required: true, - Default: defaultValue, - // Parameters in gRPC-Gateway can only be strings? - Type: paramType, - Format: paramFormat, - Enum: enumNames, - Items: items, - CollectionFormat: collectionFormat, - MinItems: minItems, - }) - } - // Now check if there is a body parameter - if b.Body != nil { - var schema openapiSchemaObject - desc := "" - - if len(b.Body.FieldPath) == 0 { - schema = openapiSchemaObject{ - schemaCore: schemaCore{}, - } - - wknSchemaCore, isWkn := wktSchemas[meth.RequestType.FQMN()] - if !isWkn { - err := schema.setRefFromFQN(meth.RequestType.FQMN(), reg) - if err != nil { - return err - } - } else { - schema.schemaCore = wknSchemaCore - - // Special workaround for Empty: it's well-known type but wknSchemas only returns schema.schemaCore; but we need to set schema.Properties which is a level higher. - if meth.RequestType.FQMN() == ".google.protobuf.Empty" { - schema.Properties = &openapiSchemaObjectProperties{} - } - } - } else { - lastField := b.Body.FieldPath[len(b.Body.FieldPath)-1] - schema = schemaOfField(lastField.Target, reg, customRefs) - if schema.Description != "" { - desc = schema.Description - } else { - desc = fieldProtoComments(reg, lastField.Target.Message, lastField.Target) - } - } - - if meth.GetClientStreaming() { - desc += " (streaming inputs)" - } - parameters = append(parameters, openapiParameterObject{ - Name: "body", - Description: desc, - In: "body", - Required: true, - Schema: &schema, - }) - // add the parameters to the query string - queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body) - if err != nil { - return err - } - parameters = append(parameters, queryParams...) - } else if b.HTTPMethod == "GET" || b.HTTPMethod == "DELETE" { - // add the parameters to the query string - queryParams, err := messageToQueryParameters(meth.RequestType, reg, b.PathParams, b.Body) - if err != nil { - return err - } - parameters = append(parameters, queryParams...) - } - - pathItemObject, ok := paths[templateToOpenAPIPath(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)] - if !ok { - pathItemObject = openapiPathItemObject{} - } - - methProtoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.ServiceDescriptorProto)(nil)), "Method") - desc := "A successful response." - var responseSchema openapiSchemaObject - - if b.ResponseBody == nil || len(b.ResponseBody.FieldPath) == 0 { - responseSchema = openapiSchemaObject{ - schemaCore: schemaCore{}, - } - - // Don't link to a full definition for - // empty; it's overly verbose. - // schema.Properties{} renders it as - // well, without a definition - wknSchemaCore, isWkn := wktSchemas[meth.ResponseType.FQMN()] - if !isWkn { - err := responseSchema.setRefFromFQN(meth.ResponseType.FQMN(), reg) - if err != nil { - return err - } - } else { - responseSchema.schemaCore = wknSchemaCore - - // Special workaround for Empty: it's well-known type but wknSchemas only returns schema.schemaCore; but we need to set schema.Properties which is a level higher. - if meth.ResponseType.FQMN() == ".google.protobuf.Empty" { - responseSchema.Properties = &openapiSchemaObjectProperties{} - } - } - } else { - // This is resolving the value of response_body in the google.api.HttpRule - lastField := b.ResponseBody.FieldPath[len(b.ResponseBody.FieldPath)-1] - responseSchema = schemaOfField(lastField.Target, reg, customRefs) - if responseSchema.Description != "" { - desc = responseSchema.Description - } else { - desc = fieldProtoComments(reg, lastField.Target.Message, lastField.Target) - } - } - if meth.GetServerStreaming() { - desc += "(streaming responses)" - responseSchema.Type = "object" - swgRef, _ := fullyQualifiedNameToOpenAPIName(meth.ResponseType.FQMN(), reg) - responseSchema.Title = "Stream result of " + swgRef - - props := openapiSchemaObjectProperties{ - keyVal{ - Key: "result", - Value: openapiSchemaObject{ - schemaCore: schemaCore{ - Ref: responseSchema.Ref, - }, - }, - }, - } - statusDef, hasStatus := fullyQualifiedNameToOpenAPIName(".google.rpc.Status", reg) - if hasStatus { - props = append(props, keyVal{ - Key: "error", - Value: openapiSchemaObject{ - schemaCore: schemaCore{ - Ref: fmt.Sprintf("#/definitions/%s", statusDef)}, - }, - }) - } - responseSchema.Properties = &props - responseSchema.Ref = "" - } - - tag := svc.GetName() - if pkg := svc.File.GetPackage(); pkg != "" && reg.IsIncludePackageInTags() { - tag = pkg + "." + tag - } - - operationObject := &openapiOperationObject{ - Tags: []string{tag}, - Parameters: parameters, - Responses: openapiResponsesObject{ - "200": openapiResponseObject{ - Description: desc, - Schema: responseSchema, - Headers: openapiHeadersObject{}, - }, - }, - } - if !reg.GetDisableDefaultErrors() { - errDef, hasErrDef := fullyQualifiedNameToOpenAPIName(".google.rpc.Status", reg) - if hasErrDef { - // https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responses-object - operationObject.Responses["default"] = openapiResponseObject{ - Description: "An unexpected error response.", - Schema: openapiSchemaObject{ - schemaCore: schemaCore{ - Ref: fmt.Sprintf("#/definitions/%s", errDef), - }, - }, - } - } - } - operationObject.OperationID = fmt.Sprintf("%s_%s", svc.GetName(), meth.GetName()) - if reg.GetSimpleOperationIDs() { - operationObject.OperationID = meth.GetName() - } - if bIdx != 0 { - // OperationID must be unique in an OpenAPI v2 definition. - operationObject.OperationID += strconv.Itoa(bIdx + 1) - } - - // Fill reference map with referenced request messages - for _, param := range operationObject.Parameters { - if param.Schema != nil && param.Schema.Ref != "" { - requestResponseRefs[param.Schema.Ref] = struct{}{} - } - } - - methComments := protoComments(reg, svc.File, nil, "Service", int32(svcIdx-svcBaseIdx), methProtoPath, int32(methIdx)) - if err := updateOpenAPIDataFromComments(reg, operationObject, meth, methComments, false); err != nil { - panic(err) - } - - opts, err := getMethodOpenAPIOption(reg, meth) - if opts != nil { - if err != nil { - panic(err) - } - operationObject.ExternalDocs = protoExternalDocumentationToOpenAPIExternalDocumentation(opts.ExternalDocs, reg, meth) - // TODO(ivucica): this would be better supported by looking whether the method is deprecated in the proto file - operationObject.Deprecated = opts.Deprecated - - if opts.Summary != "" { - operationObject.Summary = opts.Summary - } - if opts.Description != "" { - operationObject.Description = opts.Description - } - if len(opts.Tags) > 0 { - operationObject.Tags = make([]string, len(opts.Tags)) - copy(operationObject.Tags, opts.Tags) - } - if opts.OperationId != "" { - operationObject.OperationID = opts.OperationId - } - if opts.Security != nil { - newSecurity := []openapiSecurityRequirementObject{} - if operationObject.Security != nil { - newSecurity = *operationObject.Security - } - for _, secReq := range opts.Security { - newSecReq := openapiSecurityRequirementObject{} - for secReqKey, secReqValue := range secReq.SecurityRequirement { - if secReqValue == nil { - continue - } - - newSecReqValue := make([]string, len(secReqValue.Scope)) - copy(newSecReqValue, secReqValue.Scope) - newSecReq[secReqKey] = newSecReqValue - } - - if len(newSecReq) > 0 { - newSecurity = append(newSecurity, newSecReq) - } - } - operationObject.Security = &newSecurity - } - if opts.Responses != nil { - for name, resp := range opts.Responses { - // Merge response data into default response if available. - respObj := operationObject.Responses[name] - if resp.Description != "" { - respObj.Description = resp.Description - } - if resp.Schema != nil { - respObj.Schema = openapiSchemaFromProtoSchema(resp.Schema, reg, customRefs, meth) - } - if resp.Examples != nil { - respObj.Examples = openapiExamplesFromProtoExamples(resp.Examples) - } - if resp.Headers != nil { - hdrs, err := processHeaders(resp.Headers) - if err != nil { - return err - } - respObj.Headers = hdrs - } - if resp.Extensions != nil { - exts, err := processExtensions(resp.Extensions) - if err != nil { - return err - } - respObj.extensions = exts - } - operationObject.Responses[name] = respObj - } - } - - if opts.Extensions != nil { - exts, err := processExtensions(opts.Extensions) - if err != nil { - return err - } - operationObject.extensions = exts - } - - if len(opts.Produces) > 0 { - operationObject.Produces = make([]string, len(opts.Produces)) - copy(operationObject.Produces, opts.Produces) - } - - // TODO(ivucica): add remaining fields of operation object - } - - switch b.HTTPMethod { - case "DELETE": - pathItemObject.Delete = operationObject - case "GET": - pathItemObject.Get = operationObject - case "POST": - pathItemObject.Post = operationObject - case "PUT": - pathItemObject.Put = operationObject - case "PATCH": - pathItemObject.Patch = operationObject - } - paths[templateToOpenAPIPath(b.PathTmpl.Template, reg, meth.RequestType.Fields, msgs)] = pathItemObject - } - } - } - - // Success! return nil on the error object - return nil -} - -// This function is called with a param which contains the entire definition of a method. -func applyTemplate(p param) (*openapiSwaggerObject, error) { - // Create the basic template object. This is the object that everything is - // defined off of. - s := openapiSwaggerObject{ - // OpenAPI 2.0 is the version of this document - Swagger: "2.0", - Consumes: []string{"application/json"}, - Produces: []string{"application/json"}, - Paths: make(openapiPathsObject), - Definitions: make(openapiDefinitionsObject), - Info: openapiInfoObject{ - Title: *p.File.Name, - Version: "version not set", - }, - } - - // Loops through all the services and their exposed GET/POST/PUT/DELETE definitions - // and create entries for all of them. - // Also adds custom user specified references to second map. - requestResponseRefs, customRefs := refMap{}, refMap{} - if err := renderServices(p.Services, s.Paths, p.reg, requestResponseRefs, customRefs, p.Messages); err != nil { - panic(err) - } - s.Tags = append(s.Tags, renderServiceTags(p.Services)...) - - messages := messageMap{} - streamingMessages := messageMap{} - enums := enumMap{} - - if !p.reg.GetDisableDefaultErrors() { - // Add the error type to the message map - runtimeError, swgRef, err := lookupMsgAndOpenAPIName("google.rpc", "Status", p.reg) - if err == nil { - messages[swgRef] = runtimeError - } else { - // just in case there is an error looking up runtimeError - glog.Error(err) - } - } - - // Find all the service's messages and enumerations that are defined (recursively) - // and write request, response and other custom (but referenced) types out as definition objects. - findServicesMessagesAndEnumerations(p.Services, p.reg, messages, streamingMessages, enums, requestResponseRefs) - renderMessagesAsDefinition(messages, s.Definitions, p.reg, customRefs) - renderEnumerationsAsDefinition(enums, s.Definitions, p.reg) - - // File itself might have some comments and metadata. - packageProtoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Package") - packageComments := protoComments(p.reg, p.File, nil, "Package", packageProtoPath) - if err := updateOpenAPIDataFromComments(p.reg, &s, p, packageComments, true); err != nil { - panic(err) - } - - // There may be additional options in the OpenAPI option in the proto. - spb, err := getFileOpenAPIOption(p.reg, p.File) - if err != nil { - panic(err) - } - if spb != nil { - if spb.Swagger != "" { - s.Swagger = spb.Swagger - } - if spb.Info != nil { - if spb.Info.Title != "" { - s.Info.Title = spb.Info.Title - } - if spb.Info.Description != "" { - s.Info.Description = spb.Info.Description - } - if spb.Info.TermsOfService != "" { - s.Info.TermsOfService = spb.Info.TermsOfService - } - if spb.Info.Version != "" { - s.Info.Version = spb.Info.Version - } - if spb.Info.Contact != nil { - if s.Info.Contact == nil { - s.Info.Contact = &openapiContactObject{} - } - if spb.Info.Contact.Name != "" { - s.Info.Contact.Name = spb.Info.Contact.Name - } - if spb.Info.Contact.Url != "" { - s.Info.Contact.URL = spb.Info.Contact.Url - } - if spb.Info.Contact.Email != "" { - s.Info.Contact.Email = spb.Info.Contact.Email - } - } - if spb.Info.License != nil { - if s.Info.License == nil { - s.Info.License = &openapiLicenseObject{} - } - if spb.Info.License.Name != "" { - s.Info.License.Name = spb.Info.License.Name - } - if spb.Info.License.Url != "" { - s.Info.License.URL = spb.Info.License.Url - } - } - if spb.Info.Extensions != nil { - exts, err := processExtensions(spb.Info.Extensions) - if err != nil { - return nil, err - } - s.Info.extensions = exts - } - } - if spb.Host != "" { - s.Host = spb.Host - } - if spb.BasePath != "" { - s.BasePath = spb.BasePath - } - if len(spb.Schemes) > 0 { - s.Schemes = make([]string, len(spb.Schemes)) - for i, scheme := range spb.Schemes { - s.Schemes[i] = strings.ToLower(scheme.String()) - } - } - if len(spb.Consumes) > 0 { - s.Consumes = make([]string, len(spb.Consumes)) - copy(s.Consumes, spb.Consumes) - } - if len(spb.Produces) > 0 { - s.Produces = make([]string, len(spb.Produces)) - copy(s.Produces, spb.Produces) - } - if spb.SecurityDefinitions != nil && spb.SecurityDefinitions.Security != nil { - if s.SecurityDefinitions == nil { - s.SecurityDefinitions = openapiSecurityDefinitionsObject{} - } - for secDefKey, secDefValue := range spb.SecurityDefinitions.Security { - var newSecDefValue openapiSecuritySchemeObject - if oldSecDefValue, ok := s.SecurityDefinitions[secDefKey]; !ok { - newSecDefValue = openapiSecuritySchemeObject{} - } else { - newSecDefValue = oldSecDefValue - } - if secDefValue.Type != openapi_options.SecurityScheme_TYPE_INVALID { - switch secDefValue.Type { - case openapi_options.SecurityScheme_TYPE_BASIC: - newSecDefValue.Type = "basic" - case openapi_options.SecurityScheme_TYPE_API_KEY: - newSecDefValue.Type = "apiKey" - case openapi_options.SecurityScheme_TYPE_OAUTH2: - newSecDefValue.Type = "oauth2" - } - } - if secDefValue.Description != "" { - newSecDefValue.Description = secDefValue.Description - } - if secDefValue.Name != "" { - newSecDefValue.Name = secDefValue.Name - } - if secDefValue.In != openapi_options.SecurityScheme_IN_INVALID { - switch secDefValue.In { - case openapi_options.SecurityScheme_IN_QUERY: - newSecDefValue.In = "query" - case openapi_options.SecurityScheme_IN_HEADER: - newSecDefValue.In = "header" - } - } - if secDefValue.Flow != openapi_options.SecurityScheme_FLOW_INVALID { - switch secDefValue.Flow { - case openapi_options.SecurityScheme_FLOW_IMPLICIT: - newSecDefValue.Flow = "implicit" - case openapi_options.SecurityScheme_FLOW_PASSWORD: - newSecDefValue.Flow = "password" - case openapi_options.SecurityScheme_FLOW_APPLICATION: - newSecDefValue.Flow = "application" - case openapi_options.SecurityScheme_FLOW_ACCESS_CODE: - newSecDefValue.Flow = "accessCode" - } - } - if secDefValue.AuthorizationUrl != "" { - newSecDefValue.AuthorizationURL = secDefValue.AuthorizationUrl - } - if secDefValue.TokenUrl != "" { - newSecDefValue.TokenURL = secDefValue.TokenUrl - } - if secDefValue.Scopes != nil { - if newSecDefValue.Scopes == nil { - newSecDefValue.Scopes = openapiScopesObject{} - } - for scopeKey, scopeDesc := range secDefValue.Scopes.Scope { - newSecDefValue.Scopes[scopeKey] = scopeDesc - } - } - if secDefValue.Extensions != nil { - exts, err := processExtensions(secDefValue.Extensions) - if err != nil { - return nil, err - } - newSecDefValue.extensions = exts - } - s.SecurityDefinitions[secDefKey] = newSecDefValue - } - } - if spb.Security != nil { - var newSecurity []openapiSecurityRequirementObject - if s.Security != nil { - newSecurity = s.Security - } - for _, secReq := range spb.Security { - newSecReq := openapiSecurityRequirementObject{} - for secReqKey, secReqValue := range secReq.SecurityRequirement { - if secReqValue == nil { - return nil, fmt.Errorf("malformed security requirement spec for key %q; value is required", secReqKey) - } - newSecReqValue := make([]string, len(secReqValue.Scope)) - copy(newSecReqValue, secReqValue.Scope) - newSecReq[secReqKey] = newSecReqValue - } - newSecurity = append(newSecurity, newSecReq) - } - s.Security = newSecurity - } - s.ExternalDocs = protoExternalDocumentationToOpenAPIExternalDocumentation(spb.ExternalDocs, p.reg, spb) - // Populate all Paths with Responses set at top level, - // preferring Responses already set over those at the top level. - if spb.Responses != nil { - for _, verbs := range s.Paths { - var maps []openapiResponsesObject - if verbs.Delete != nil { - maps = append(maps, verbs.Delete.Responses) - } - if verbs.Get != nil { - maps = append(maps, verbs.Get.Responses) - } - if verbs.Post != nil { - maps = append(maps, verbs.Post.Responses) - } - if verbs.Put != nil { - maps = append(maps, verbs.Put.Responses) - } - if verbs.Patch != nil { - maps = append(maps, verbs.Patch.Responses) - } - - for k, v := range spb.Responses { - for _, respMap := range maps { - if _, ok := respMap[k]; ok { - // Don't overwrite already existing Responses - continue - } - respMap[k] = openapiResponseObject{ - Description: v.Description, - Schema: openapiSchemaFromProtoSchema(v.Schema, p.reg, customRefs, nil), - Examples: openapiExamplesFromProtoExamples(v.Examples), - } - } - } - } - } - - if spb.Extensions != nil { - exts, err := processExtensions(spb.Extensions) - if err != nil { - return nil, err - } - s.extensions = exts - } - - // Additional fields on the OpenAPI v2 spec's "OpenAPI" object - // should be added here, once supported in the proto. - } - - // Finally add any references added by users that aren't - // otherwise rendered. - addCustomRefs(s.Definitions, p.reg, customRefs) - - return &s, nil -} - -func processExtensions(inputExts map[string]*structpb.Value) ([]extension, error) { - exts := []extension{} - for k, v := range inputExts { - if !strings.HasPrefix(k, "x-") { - return nil, fmt.Errorf("extension keys need to start with \"x-\": %q", k) - } - ext, err := (&protojson.MarshalOptions{Indent: " "}).Marshal(v) - if err != nil { - return nil, err - } - exts = append(exts, extension{key: k, value: json.RawMessage(ext)}) - } - sort.Slice(exts, func(i, j int) bool { return exts[i].key < exts[j].key }) - return exts, nil -} - -func validateHeaderTypeAndFormat(headerType string, format string) error { - // The type of the object. The value MUST be one of "string", "number", "integer", "boolean", or "array" - // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject - // Note: currently not implementing array as we are only implementing this in the operation response context - switch headerType { - // the format property is an open string-valued property, and can have any value to support documentation needs - // primary check for format is to ensure that the number/integer formats are extensions of the specified type - // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#dataTypeFormat - case "string": - return nil - case "number": - switch format { - case "uint", - "uint8", - "uint16", - "uint32", - "uint64", - "int", - "int8", - "int16", - "int32", - "int64", - "float", - "float32", - "float64", - "complex64", - "complex128", - "double", - "byte", - "rune", - "uintptr", - "": - return nil - default: - return fmt.Errorf("the provided format %q is not a valid extension of the type %q", format, headerType) - } - case "integer": - switch format { - case "uint", - "uint8", - "uint16", - "uint32", - "uint64", - "int", - "int8", - "int16", - "int32", - "int64", - "": - return nil - default: - return fmt.Errorf("the provided format %q is not a valid extension of the type %q", format, headerType) - } - case "boolean": - return nil - } - return fmt.Errorf("the provided header type %q is not supported", headerType) -} - -func validateDefaultValueTypeAndFormat(headerType string, defaultValue string, format string) error { - switch headerType { - case "string": - if !isQuotedString(defaultValue) { - return fmt.Errorf("the provided default value %q does not match provider type %q, or is not properly quoted with escaped quotations", defaultValue, headerType) - } - switch format { - case "date-time": - unquoteTime := strings.Trim(defaultValue, `"`) - _, err := time.Parse(time.RFC3339, unquoteTime) - if err != nil { - return fmt.Errorf("the provided default value %q is not a valid RFC3339 date-time string", defaultValue) - } - case "date": - const ( - layoutRFC3339Date = "2006-01-02" - ) - unquoteDate := strings.Trim(defaultValue, `"`) - _, err := time.Parse(layoutRFC3339Date, unquoteDate) - if err != nil { - return fmt.Errorf("the provided default value %q is not a valid RFC3339 date-time string", defaultValue) - } - } - case "number": - err := isJSONNumber(defaultValue, headerType) - if err != nil { - return err - } - case "integer": - switch format { - case "int32": - _, err := strconv.ParseInt(defaultValue, 0, 32) - if err != nil { - return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) - } - case "uint32": - _, err := strconv.ParseUint(defaultValue, 0, 32) - if err != nil { - return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) - } - case "int64": - _, err := strconv.ParseInt(defaultValue, 0, 64) - if err != nil { - return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) - } - case "uint64": - _, err := strconv.ParseUint(defaultValue, 0, 64) - if err != nil { - return fmt.Errorf("the provided default value %q does not match provided format %q", defaultValue, format) - } - default: - _, err := strconv.ParseInt(defaultValue, 0, 64) - if err != nil { - return fmt.Errorf("the provided default value %q does not match provided type %q", defaultValue, headerType) - } - } - case "boolean": - if !isBool(defaultValue) { - return fmt.Errorf("the provided default value %q does not match provider type %q", defaultValue, headerType) - } - } - return nil -} - -func isQuotedString(s string) bool { - return len(s) >= 2 && s[0] == '"' && s[len(s)-1] == '"' -} - -func isJSONNumber(s string, t string) error { - val, err := strconv.ParseFloat(s, 64) - if err != nil { - return fmt.Errorf("the provided default value %q does not match provider type %q", s, t) - } - // Floating point values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted. - // See: https://tools.ietf.org/html/rfc4627#section-2.4 - if math.IsInf(val, 0) || math.IsNaN(val) { - return fmt.Errorf("the provided number %q is not a valid JSON number", s) - } - - return nil -} - -func isBool(s string) bool { - // Unable to use strconv.ParseBool because it returns truthy values https://golang.org/pkg/strconv/#example_ParseBool - // per https://swagger.io/specification/v2/#data-types - // type: boolean represents two values: true and false. Note that truthy and falsy values such as "true", "", 0 or null are not considered boolean values. - return s == "true" || s == "false" -} - -func processHeaders(inputHdrs map[string]*openapi_options.Header) (openapiHeadersObject, error) { - hdrs := map[string]openapiHeaderObject{} - for k, v := range inputHdrs { - header := textproto.CanonicalMIMEHeaderKey(k) - ret := openapiHeaderObject{ - Description: v.Description, - Format: v.Format, - Pattern: v.Pattern, - } - err := validateHeaderTypeAndFormat(v.Type, v.Format) - if err != nil { - return nil, err - } - ret.Type = v.Type - if v.Default != "" { - err := validateDefaultValueTypeAndFormat(v.Type, v.Default, v.Format) - if err != nil { - return nil, err - } - ret.Default = json.RawMessage(v.Default) - } - hdrs[header] = ret - } - return hdrs, nil -} - -// updateOpenAPIDataFromComments updates a OpenAPI object based on a comment -// from the proto file. -// -// First paragraph of a comment is used for summary. Remaining paragraphs of -// a comment are used for description. If 'Summary' field is not present on -// the passed swaggerObject, the summary and description are joined by \n\n. -// -// If there is a field named 'Info', its 'Summary' and 'Description' fields -// will be updated instead. -// -// If there is no 'Summary', the same behavior will be attempted on 'Title', -// but only if the last character is not a period. -func updateOpenAPIDataFromComments(reg *descriptor.Registry, swaggerObject interface{}, data interface{}, comment string, isPackageObject bool) error { - if len(comment) == 0 { - return nil - } - - // Checks whether the "use_go_templates" flag is set to true - if reg.GetUseGoTemplate() { - comment = goTemplateComments(comment, data, reg) - } - - // Figure out what to apply changes to. - swaggerObjectValue := reflect.ValueOf(swaggerObject) - infoObjectValue := swaggerObjectValue.Elem().FieldByName("Info") - if !infoObjectValue.CanSet() { - // No such field? Apply summary and description directly to - // passed object. - infoObjectValue = swaggerObjectValue.Elem() - } - - // Figure out which properties to update. - summaryValue := infoObjectValue.FieldByName("Summary") - descriptionValue := infoObjectValue.FieldByName("Description") - readOnlyValue := infoObjectValue.FieldByName("ReadOnly") - - if readOnlyValue.Kind() == reflect.Bool && readOnlyValue.CanSet() && strings.Contains(comment, "Output only.") { - readOnlyValue.Set(reflect.ValueOf(true)) - } - - usingTitle := false - if !summaryValue.CanSet() { - summaryValue = infoObjectValue.FieldByName("Title") - usingTitle = true - } - - paragraphs := strings.Split(comment, "\n\n") - - // If there is a summary (or summary-equivalent) and it's empty, use the first - // paragraph as summary, and the rest as description. - if summaryValue.CanSet() { - summary := strings.TrimSpace(paragraphs[0]) - description := strings.TrimSpace(strings.Join(paragraphs[1:], "\n\n")) - if !usingTitle || (len(summary) > 0 && summary[len(summary)-1] != '.') { - // overrides the schema value only if it's empty - // keep the comment precedence when updating the package definition - if summaryValue.Len() == 0 || isPackageObject { - summaryValue.Set(reflect.ValueOf(summary)) - } - if len(description) > 0 { - if !descriptionValue.CanSet() { - return fmt.Errorf("encountered object type with a summary, but no description") - } - // overrides the schema value only if it's empty - // keep the comment precedence when updating the package definition - if descriptionValue.Len() == 0 || isPackageObject { - descriptionValue.Set(reflect.ValueOf(description)) - } - } - return nil - } - } - - // There was no summary field on the swaggerObject. Try to apply the - // whole comment into description if the OpenAPI object description is empty. - if descriptionValue.CanSet() { - if descriptionValue.Len() == 0 || isPackageObject { - descriptionValue.Set(reflect.ValueOf(strings.Join(paragraphs, "\n\n"))) - } - return nil - } - - return fmt.Errorf("no description nor summary property") -} - -func fieldProtoComments(reg *descriptor.Registry, msg *descriptor.Message, field *descriptor.Field) string { - protoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.DescriptorProto)(nil)), "Field") - for i, f := range msg.Fields { - if f == field { - return protoComments(reg, msg.File, msg.Outers, "MessageType", int32(msg.Index), protoPath, int32(i)) - } - } - return "" -} - -func enumValueProtoComments(reg *descriptor.Registry, enum *descriptor.Enum) string { - protoPath := protoPathIndex(reflect.TypeOf((*descriptorpb.EnumDescriptorProto)(nil)), "Value") - var comments []string - for idx, value := range enum.GetValue() { - name := value.GetName() - if reg.GetEnumsAsInts() { - name = strconv.Itoa(int(value.GetNumber())) - } - str := protoComments(reg, enum.File, enum.Outers, "EnumType", int32(enum.Index), protoPath, int32(idx)) - if str != "" { - comments = append(comments, name+": "+str) - } - } - if len(comments) > 0 { - return "- " + strings.Join(comments, "\n - ") - } - return "" -} - -func protoComments(reg *descriptor.Registry, file *descriptor.File, outers []string, typeName string, typeIndex int32, fieldPaths ...int32) string { - if file.SourceCodeInfo == nil { - fmt.Fprintln(os.Stderr, "descriptor.File should not contain nil SourceCodeInfo") - return "" - } - - outerPaths := make([]int32, len(outers)) - for i := range outers { - location := "" - if file.Package != nil { - location = file.GetPackage() - } - - msg, err := reg.LookupMsg(location, strings.Join(outers[:i+1], ".")) - if err != nil { - panic(err) - } - outerPaths[i] = int32(msg.Index) - } - - for _, loc := range file.SourceCodeInfo.Location { - if !isProtoPathMatches(loc.Path, outerPaths, typeName, typeIndex, fieldPaths) { - continue - } - comments := "" - if loc.LeadingComments != nil { - comments = strings.TrimRight(*loc.LeadingComments, "\n") - comments = strings.TrimSpace(comments) - // TODO(ivucica): this is a hack to fix "// " being interpreted as "//". - // perhaps we should: - // - split by \n - // - determine if every (but first and last) line begins with " " - // - trim every line only if that is the case - // - join by \n - comments = strings.Replace(comments, "\n ", "\n", -1) - } - return comments - } - return "" -} - -func goTemplateComments(comment string, data interface{}, reg *descriptor.Registry) string { - var temp bytes.Buffer - tpl, err := template.New("").Funcs(template.FuncMap{ - // Allows importing documentation from a file - "import": func(name string) string { - file, err := ioutil.ReadFile(name) - if err != nil { - return err.Error() - } - // Runs template over imported file - return goTemplateComments(string(file), data, reg) - }, - // Grabs title and description from a field - "fieldcomments": func(msg *descriptor.Message, field *descriptor.Field) string { - return strings.Replace(fieldProtoComments(reg, msg, field), "\n", "
", -1) - }, - }).Parse(comment) - if err != nil { - // If there is an error parsing the templating insert the error as string in the comment - // to make it easier to debug the template error - return err.Error() - } - err = tpl.Execute(&temp, data) - if err != nil { - // If there is an error executing the templating insert the error as string in the comment - // to make it easier to debug the error - return err.Error() - } - return temp.String() -} - -var messageProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "MessageType") -var nestedProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.DescriptorProto)(nil)), "NestedType") -var packageProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Package") -var serviceProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)), "Service") -var methodProtoPath = protoPathIndex(reflect.TypeOf((*descriptorpb.ServiceDescriptorProto)(nil)), "Method") - -func isProtoPathMatches(paths []int32, outerPaths []int32, typeName string, typeIndex int32, fieldPaths []int32) bool { - if typeName == "Package" && typeIndex == packageProtoPath { - // path for package comments is just [2], and all the other processing - // is too complex for it. - if len(paths) == 0 || typeIndex != paths[0] { - return false - } - return true - } - - if len(paths) != len(outerPaths)*2+2+len(fieldPaths) { - return false - } - - if typeName == "Method" { - if paths[0] != serviceProtoPath || paths[2] != methodProtoPath { - return false - } - paths = paths[2:] - } else { - typeNameDescriptor := reflect.TypeOf((*descriptorpb.FileDescriptorProto)(nil)) - - if len(outerPaths) > 0 { - if paths[0] != messageProtoPath || paths[1] != outerPaths[0] { - return false - } - paths = paths[2:] - outerPaths = outerPaths[1:] - - for i, v := range outerPaths { - if paths[i*2] != nestedProtoPath || paths[i*2+1] != v { - return false - } - } - paths = paths[len(outerPaths)*2:] - - if typeName == "MessageType" { - typeName = "NestedType" - } - typeNameDescriptor = reflect.TypeOf((*descriptorpb.DescriptorProto)(nil)) - } - - if paths[0] != protoPathIndex(typeNameDescriptor, typeName) || paths[1] != typeIndex { - return false - } - paths = paths[2:] - } - - for i, v := range fieldPaths { - if paths[i] != v { - return false - } - } - return true -} - -// protoPathIndex returns a path component for google.protobuf.descriptor.SourceCode_Location. -// -// Specifically, it returns an id as generated from descriptor proto which -// can be used to determine what type the id following it in the path is. -// For example, if we are trying to locate comments related to a field named -// `Address` in a message named `Person`, the path will be: -// -// [4, a, 2, b] -// -// While `a` gets determined by the order in which the messages appear in -// the proto file, and `b` is the field index specified in the proto -// file itself, the path actually needs to specify that `a` refers to a -// message and not, say, a service; and that `b` refers to a field and not -// an option. -// -// protoPathIndex figures out the values 4 and 2 in the above example. Because -// messages are top level objects, the value of 4 comes from field id for -// `MessageType` inside `google.protobuf.descriptor.FileDescriptor` message. -// This field has a message type `google.protobuf.descriptor.DescriptorProto`. -// And inside message `DescriptorProto`, there is a field named `Field` with id -// 2. -// -// Some code generators seem to be hardcoding these values; this method instead -// interprets them from `descriptor.proto`-derived Go source as necessary. -func protoPathIndex(descriptorType reflect.Type, what string) int32 { - field, ok := descriptorType.Elem().FieldByName(what) - if !ok { - panic(fmt.Errorf("could not find protobuf descriptor type id for %s", what)) - } - pbtag := field.Tag.Get("protobuf") - if pbtag == "" { - panic(fmt.Errorf("no Go tag 'protobuf' on protobuf descriptor for %s", what)) - } - path, err := strconv.Atoi(strings.Split(pbtag, ",")[1]) - if err != nil { - panic(fmt.Errorf("protobuf descriptor id for %s cannot be converted to a number: %s", what, err.Error())) - } - - return int32(path) -} - -// extractOperationOptionFromMethodDescriptor extracts the message of type -// openapi_options.Operation from a given proto method's descriptor. -func extractOperationOptionFromMethodDescriptor(meth *descriptorpb.MethodDescriptorProto) (*openapi_options.Operation, error) { - if meth.Options == nil { - return nil, nil - } - if !proto.HasExtension(meth.Options, openapi_options.E_Openapiv2Operation) { - return nil, nil - } - ext := proto.GetExtension(meth.Options, openapi_options.E_Openapiv2Operation) - opts, ok := ext.(*openapi_options.Operation) - if !ok { - return nil, fmt.Errorf("extension is %T; want an Operation", ext) - } - return opts, nil -} - -// extractSchemaOptionFromMessageDescriptor extracts the message of type -// openapi_options.Schema from a given proto message's descriptor. -func extractSchemaOptionFromMessageDescriptor(msg *descriptorpb.DescriptorProto) (*openapi_options.Schema, error) { - if msg.Options == nil { - return nil, nil - } - if !proto.HasExtension(msg.Options, openapi_options.E_Openapiv2Schema) { - return nil, nil - } - ext := proto.GetExtension(msg.Options, openapi_options.E_Openapiv2Schema) - opts, ok := ext.(*openapi_options.Schema) - if !ok { - return nil, fmt.Errorf("extension is %T; want a Schema", ext) - } - return opts, nil -} - -// extractOpenAPIOptionFromFileDescriptor extracts the message of type -// openapi_options.OpenAPI from a given proto method's descriptor. -func extractOpenAPIOptionFromFileDescriptor(file *descriptorpb.FileDescriptorProto) (*openapi_options.Swagger, error) { - if file.Options == nil { - return nil, nil - } - if !proto.HasExtension(file.Options, openapi_options.E_Openapiv2Swagger) { - return nil, nil - } - ext := proto.GetExtension(file.Options, openapi_options.E_Openapiv2Swagger) - opts, ok := ext.(*openapi_options.Swagger) - if !ok { - return nil, fmt.Errorf("extension is %T; want a OpenAPI object", ext) - } - return opts, nil -} - -func extractJSONSchemaFromFieldDescriptor(fd *descriptorpb.FieldDescriptorProto) (*openapi_options.JSONSchema, error) { - if fd.Options == nil { - return nil, nil - } - if !proto.HasExtension(fd.Options, openapi_options.E_Openapiv2Field) { - return nil, nil - } - ext := proto.GetExtension(fd.Options, openapi_options.E_Openapiv2Field) - opts, ok := ext.(*openapi_options.JSONSchema) - if !ok { - return nil, fmt.Errorf("extension is %T; want a JSONSchema object", ext) - } - return opts, nil -} - -func extractFieldBehaviorFromFieldDescriptor(fd *descriptorpb.FieldDescriptorProto) ([]annotations.FieldBehavior, error) { - if fd.Options == nil { - return nil, nil - } - if !proto.HasExtension(fd.Options, annotations.E_FieldBehavior) { - return nil, nil - } - ext := proto.GetExtension(fd.Options, annotations.E_FieldBehavior) - opts, ok := ext.([]annotations.FieldBehavior) - if !ok { - return nil, fmt.Errorf("extension is %T; want a []FieldBehavior object", ext) - } - return opts, nil -} - -func getMethodOpenAPIOption(reg *descriptor.Registry, meth *descriptor.Method) (*openapi_options.Operation, error) { - opts, err := extractOperationOptionFromMethodDescriptor(meth.MethodDescriptorProto) - if err != nil { - return nil, err - } - if opts != nil { - return opts, nil - } - opts, ok := reg.GetOpenAPIMethodOption(meth.FQMN()) - if !ok { - return nil, nil - } - return opts, nil -} - -func getMessageOpenAPIOption(reg *descriptor.Registry, msg *descriptor.Message) (*openapi_options.Schema, error) { - opts, err := extractSchemaOptionFromMessageDescriptor(msg.DescriptorProto) - if err != nil { - return nil, err - } - if opts != nil { - return opts, nil - } - opts, ok := reg.GetOpenAPIMessageOption(msg.FQMN()) - if !ok { - return nil, nil - } - return opts, nil -} - -func getFileOpenAPIOption(reg *descriptor.Registry, file *descriptor.File) (*openapi_options.Swagger, error) { - opts, err := extractOpenAPIOptionFromFileDescriptor(file.FileDescriptorProto) - if err != nil { - return nil, err - } - if opts != nil { - return opts, nil - } - opts, ok := reg.GetOpenAPIFileOption(*file.Name) - if !ok { - return nil, nil - } - return opts, nil -} - -func getFieldOpenAPIOption(reg *descriptor.Registry, fd *descriptor.Field) (*openapi_options.JSONSchema, error) { - opts, err := extractJSONSchemaFromFieldDescriptor(fd.FieldDescriptorProto) - if err != nil { - return nil, err - } - if opts != nil { - return opts, nil - } - opts, ok := reg.GetOpenAPIFieldOption(fd.FQFN()) - if !ok { - return nil, nil - } - return opts, nil -} - -func getFieldBehaviorOption(reg *descriptor.Registry, fd *descriptor.Field) ([]annotations.FieldBehavior, error) { - opts, err := extractFieldBehaviorFromFieldDescriptor(fd.FieldDescriptorProto) - if err != nil { - return nil, err - } - if opts != nil { - return opts, nil - } - return opts, nil -} - -func protoJSONSchemaToOpenAPISchemaCore(j *openapi_options.JSONSchema, reg *descriptor.Registry, refs refMap) schemaCore { - ret := schemaCore{} - - if j.GetRef() != "" { - openapiName, ok := fullyQualifiedNameToOpenAPIName(j.GetRef(), reg) - if ok { - ret.Ref = "#/definitions/" + openapiName - if refs != nil { - refs[j.GetRef()] = struct{}{} - } - } else { - ret.Ref += j.GetRef() - } - } else { - f, t := protoJSONSchemaTypeToFormat(j.GetType()) - ret.Format = f - ret.Type = t - } - - return ret -} - -func updateswaggerObjectFromJSONSchema(s *openapiSchemaObject, j *openapi_options.JSONSchema, reg *descriptor.Registry, data interface{}) { - s.Title = j.GetTitle() - s.Description = j.GetDescription() - if reg.GetUseGoTemplate() { - s.Title = goTemplateComments(s.Title, data, reg) - s.Description = goTemplateComments(s.Description, data, reg) - } - - s.ReadOnly = j.GetReadOnly() - s.MultipleOf = j.GetMultipleOf() - s.Maximum = j.GetMaximum() - s.ExclusiveMaximum = j.GetExclusiveMaximum() - s.Minimum = j.GetMinimum() - s.ExclusiveMinimum = j.GetExclusiveMinimum() - s.MaxLength = j.GetMaxLength() - s.MinLength = j.GetMinLength() - s.Pattern = j.GetPattern() - s.Default = j.GetDefault() - s.MaxItems = j.GetMaxItems() - s.MinItems = j.GetMinItems() - s.UniqueItems = j.GetUniqueItems() - s.MaxProperties = j.GetMaxProperties() - s.MinProperties = j.GetMinProperties() - s.Required = j.GetRequired() - s.Enum = j.GetEnum() - if overrideType := j.GetType(); len(overrideType) > 0 { - s.Type = strings.ToLower(overrideType[0].String()) - } - if j != nil && j.GetExample() != "" { - s.Example = json.RawMessage(j.GetExample()) - } - if j != nil && j.GetFormat() != "" { - s.Format = j.GetFormat() - } -} - -func updateSwaggerObjectFromFieldBehavior(s *openapiSchemaObject, j []annotations.FieldBehavior, field *descriptor.Field) { - for _, fb := range j { - switch fb { - case annotations.FieldBehavior_REQUIRED: - s.Required = append(s.Required, *field.Name) - case annotations.FieldBehavior_OUTPUT_ONLY: - s.ReadOnly = true - case annotations.FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED: - case annotations.FieldBehavior_OPTIONAL: - case annotations.FieldBehavior_INPUT_ONLY: - // OpenAPI v3 supports a writeOnly property, but this is not supported in Open API v2 - case annotations.FieldBehavior_IMMUTABLE: - } - } -} - -func openapiSchemaFromProtoSchema(s *openapi_options.Schema, reg *descriptor.Registry, refs refMap, data interface{}) openapiSchemaObject { - ret := openapiSchemaObject{ - ExternalDocs: protoExternalDocumentationToOpenAPIExternalDocumentation(s.GetExternalDocs(), reg, data), - } - - ret.schemaCore = protoJSONSchemaToOpenAPISchemaCore(s.GetJsonSchema(), reg, refs) - updateswaggerObjectFromJSONSchema(&ret, s.GetJsonSchema(), reg, data) - - if s != nil && s.Example != "" { - ret.Example = json.RawMessage(s.Example) - } - - return ret -} - -func openapiExamplesFromProtoExamples(in map[string]string) map[string]interface{} { - if len(in) == 0 { - return nil - } - out := make(map[string]interface{}) - for mimeType, exampleStr := range in { - switch mimeType { - case "application/json": - // JSON example objects are rendered raw. - out[mimeType] = json.RawMessage(exampleStr) - default: - // All other mimetype examples are rendered as strings. - out[mimeType] = exampleStr - } - } - return out -} - -func protoJSONSchemaTypeToFormat(in []openapi_options.JSONSchema_JSONSchemaSimpleTypes) (string, string) { - if len(in) == 0 { - return "", "" - } - - // Can't support more than 1 type, just return the first element. - // This is due to an inconsistency in the design of the openapiv2 proto - // and that used in schemaCore. schemaCore uses the v3 definition of types, - // which only allows a single string, while the openapiv2 proto uses the OpenAPI v2 - // definition, which defers to the JSON schema definition, which allows a string or an array. - // Sources: - // https://swagger.io/specification/#itemsObject - // https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.2 - switch in[0] { - case openapi_options.JSONSchema_UNKNOWN, openapi_options.JSONSchema_NULL: - return "", "" - case openapi_options.JSONSchema_OBJECT: - return "object", "" - case openapi_options.JSONSchema_ARRAY: - return "array", "" - case openapi_options.JSONSchema_BOOLEAN: - // NOTE: in OpenAPI specification, format should be empty on boolean type - return "boolean", "" - case openapi_options.JSONSchema_INTEGER: - return "integer", "int32" - case openapi_options.JSONSchema_NUMBER: - return "number", "double" - case openapi_options.JSONSchema_STRING: - // NOTE: in OpenAPI specification, format should be empty on string type - return "string", "" - default: - // Maybe panic? - return "", "" - } -} - -func protoExternalDocumentationToOpenAPIExternalDocumentation(in *openapi_options.ExternalDocumentation, reg *descriptor.Registry, data interface{}) *openapiExternalDocumentationObject { - if in == nil { - return nil - } - - if reg.GetUseGoTemplate() { - in.Description = goTemplateComments(in.Description, data, reg) - } - - return &openapiExternalDocumentationObject{ - Description: in.Description, - URL: in.Url, - } -} - -func addCustomRefs(d openapiDefinitionsObject, reg *descriptor.Registry, refs refMap) { - if len(refs) == 0 { - return - } - msgMap := make(messageMap) - enumMap := make(enumMap) - for ref := range refs { - swgName, swgOk := fullyQualifiedNameToOpenAPIName(ref, reg) - if !swgOk { - glog.Errorf("can't resolve OpenAPI name from CustomRef '%v'", ref) - continue - } - if _, ok := d[swgName]; ok { - // Skip already existing definitions - delete(refs, ref) - continue - } - msg, err := reg.LookupMsg("", ref) - if err == nil { - msgMap[swgName] = msg - continue - } - enum, err := reg.LookupEnum("", ref) - if err == nil { - enumMap[swgName] = enum - continue - } - - // ?? Should be either enum or msg - } - renderMessagesAsDefinition(msgMap, d, reg, refs) - renderEnumerationsAsDefinition(enumMap, d, reg) - - // Run again in case any new refs were added - addCustomRefs(d, reg, refs) -} - -func lowerCamelCase(fieldName string, fields []*descriptor.Field, msgs []*descriptor.Message) string { - for _, oneField := range fields { - if oneField.GetName() == fieldName { - return oneField.GetJsonName() - } - } - messageNameToFieldsToJSONName := make(map[string]map[string]string) - fieldNameToType := make(map[string]string) - for _, msg := range msgs { - fieldNameToJSONName := make(map[string]string) - for _, oneField := range msg.GetField() { - fieldNameToJSONName[oneField.GetName()] = oneField.GetJsonName() - fieldNameToType[oneField.GetName()] = oneField.GetTypeName() - } - messageNameToFieldsToJSONName[msg.GetName()] = fieldNameToJSONName - } - if strings.Contains(fieldName, ".") { - fieldNames := strings.Split(fieldName, ".") - fieldNamesWithCamelCase := make([]string, 0) - for i := 0; i < len(fieldNames)-1; i++ { - fieldNamesWithCamelCase = append(fieldNamesWithCamelCase, doCamelCase(string(fieldNames[i]))) - } - prefix := strings.Join(fieldNamesWithCamelCase, ".") - reservedJSONName := getReservedJSONName(fieldName, messageNameToFieldsToJSONName, fieldNameToType) - if reservedJSONName != "" { - return prefix + "." + reservedJSONName - } - } - return doCamelCase(fieldName) -} - -func doCamelCase(input string) string { - parameterString := casing.Camel(input) - builder := &strings.Builder{} - builder.WriteString(strings.ToLower(string(parameterString[0]))) - builder.WriteString(parameterString[1:]) - return builder.String() -} - -func getReservedJSONName(fieldName string, messageNameToFieldsToJSONName map[string]map[string]string, fieldNameToType map[string]string) string { - if len(strings.Split(fieldName, ".")) == 2 { - fieldNames := strings.Split(fieldName, ".") - firstVariable := fieldNames[0] - firstType := fieldNameToType[firstVariable] - firstTypeShortNames := strings.Split(firstType, ".") - firstTypeShortName := firstTypeShortNames[len(firstTypeShortNames)-1] - return messageNameToFieldsToJSONName[firstTypeShortName][fieldNames[1]] - } - fieldNames := strings.Split(fieldName, ".") - return getReservedJSONName(strings.Join(fieldNames[1:], "."), messageNameToFieldsToJSONName, fieldNameToType) -} - -func find(a []string, x string) int { - // This is a linear search but we are dealing with a small number of fields - for i, n := range a { - if x == n { - return i - } - } - return -1 -} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go deleted file mode 100644 index 2188e739..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/template_test.go +++ /dev/null @@ -1,4552 +0,0 @@ -package genopenapi - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "reflect" - "strings" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor/openapiconfig" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule" - openapi_options "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "google.golang.org/genproto/googleapis/api/annotations" - "google.golang.org/genproto/protobuf/field_mask" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protodesc" - "google.golang.org/protobuf/types/descriptorpb" - "google.golang.org/protobuf/types/known/durationpb" - "google.golang.org/protobuf/types/known/structpb" - "google.golang.org/protobuf/types/known/timestamppb" - "google.golang.org/protobuf/types/known/wrapperspb" - "google.golang.org/protobuf/types/pluginpb" -) - -var marshaler = &runtime.JSONPb{} - -func crossLinkFixture(f *descriptor.File) *descriptor.File { - for _, m := range f.Messages { - m.File = f - } - for _, svc := range f.Services { - svc.File = f - for _, m := range svc.Methods { - m.Service = svc - for _, b := range m.Bindings { - b.Method = m - for _, param := range b.PathParams { - param.Method = m - } - } - } - } - return f -} - -func reqFromFile(f *descriptor.File) *pluginpb.CodeGeneratorRequest { - return &pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{ - f.FileDescriptorProto, - }, - FileToGenerate: []string{f.GetName()}, - } -} - -func TestMessageToQueryParametersWithEnumAsInt(t *testing.T) { - type test struct { - MsgDescs []*descriptorpb.DescriptorProto - Message string - Params []openapiParameterObject - } - - tests := []test{ - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("a"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("b"), - Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(), - Number: proto.Int32(2), - }, - { - Name: proto.String("c"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Number: proto.Int32(3), - }, - }, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "a", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "b", - In: "query", - Required: false, - Type: "number", - Format: "double", - }, - { - Name: "c", - In: "query", - Required: false, - Type: "array", - CollectionFormat: "multi", - }, - }, - }, - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Nested"), - Number: proto.Int32(1), - }, - }, - }, - { - Name: proto.String("Nested"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("a"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("deep"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Nested.DeepNested"), - Number: proto.Int32(2), - }, - }, - NestedType: []*descriptorpb.DescriptorProto{{ - Name: proto.String("DeepNested"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("b"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("c"), - Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), - TypeName: proto.String(".example.Nested.DeepNested.DeepEnum"), - Number: proto.Int32(2), - }, - }, - EnumType: []*descriptorpb.EnumDescriptorProto{ - { - Name: proto.String("DeepEnum"), - Value: []*descriptorpb.EnumValueDescriptorProto{ - {Name: proto.String("FALSE"), Number: proto.Int32(0)}, - {Name: proto.String("TRUE"), Number: proto.Int32(1)}, - }, - }, - }, - }}, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "nested.a", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "nested.deep.b", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "nested.deep.c", - In: "query", - Required: false, - Type: "integer", - Enum: []string{"0", "1"}, - Default: "0", - }, - }, - }, - } - - for _, test := range tests { - reg := descriptor.NewRegistry() - reg.SetEnumsAsInts(true) - msgs := []*descriptor.Message{} - for _, msgdesc := range test.MsgDescs { - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.MsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - message, err := reg.LookupMsg("", ".example."+test.Message) - if err != nil { - t.Fatalf("failed to lookup message: %s", err) - } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) - if err != nil { - t.Fatalf("failed to convert message to query parameters: %s", err) - } - // avoid checking Items for array types - for i := range params { - params[i].Items = nil - } - if !reflect.DeepEqual(params, test.Params) { - t.Errorf("expected %v, got %v", test.Params, params) - } - } -} - -func TestMessageToQueryParameters(t *testing.T) { - type test struct { - MsgDescs []*descriptorpb.DescriptorProto - Message string - Params []openapiParameterObject - } - - tests := []test{ - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("a"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("b"), - Type: descriptorpb.FieldDescriptorProto_TYPE_DOUBLE.Enum(), - Number: proto.Int32(2), - }, - { - Name: proto.String("c"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Number: proto.Int32(3), - }, - }, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "a", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "b", - In: "query", - Required: false, - Type: "number", - Format: "double", - }, - { - Name: "c", - In: "query", - Required: false, - Type: "array", - CollectionFormat: "multi", - }, - }, - }, - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Nested"), - Number: proto.Int32(1), - }, - }, - }, - { - Name: proto.String("Nested"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("a"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("deep"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Nested.DeepNested"), - Number: proto.Int32(2), - }, - }, - NestedType: []*descriptorpb.DescriptorProto{{ - Name: proto.String("DeepNested"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("b"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("c"), - Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), - TypeName: proto.String(".example.Nested.DeepNested.DeepEnum"), - Number: proto.Int32(2), - }, - }, - EnumType: []*descriptorpb.EnumDescriptorProto{ - { - Name: proto.String("DeepEnum"), - Value: []*descriptorpb.EnumValueDescriptorProto{ - {Name: proto.String("FALSE"), Number: proto.Int32(0)}, - {Name: proto.String("TRUE"), Number: proto.Int32(1)}, - }, - }, - }, - }}, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "nested.a", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "nested.deep.b", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "nested.deep.c", - In: "query", - Required: false, - Type: "string", - Enum: []string{"FALSE", "TRUE"}, - Default: "FALSE", - }, - }, - }, - } - - for _, test := range tests { - reg := descriptor.NewRegistry() - msgs := []*descriptor.Message{} - for _, msgdesc := range test.MsgDescs { - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.MsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - message, err := reg.LookupMsg("", ".example."+test.Message) - if err != nil { - t.Fatalf("failed to lookup message: %s", err) - } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) - if err != nil { - t.Fatalf("failed to convert message to query parameters: %s", err) - } - // avoid checking Items for array types - for i := range params { - params[i].Items = nil - } - if !reflect.DeepEqual(params, test.Params) { - t.Errorf("expected %v, got %v", test.Params, params) - } - } -} - -// TestMessagetoQueryParametersNoRecursive, is a check that cyclical references between messages -// are not falsely detected given previous known edge-cases. -func TestMessageToQueryParametersNoRecursive(t *testing.T) { - type test struct { - MsgDescs []*descriptorpb.DescriptorProto - Message string - } - - tests := []test{ - // First test: - // Here is a message that has two of another message adjacent to one another in a nested message. - // There is no loop but this was previouly falsely flagged as a cycle. - // Example proto: - // message NonRecursiveMessage { - // string field = 1; - // } - // message BaseMessage { - // NonRecursiveMessage first = 1; - // NonRecursiveMessage second = 2; - // } - // message QueryMessage { - // BaseMessage first = 1; - // string second = 2; - // } - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("QueryMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("first"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.BaseMessage"), - Number: proto.Int32(1), - }, - { - Name: proto.String("second"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(2), - }, - }, - }, - { - Name: proto.String("BaseMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("first"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.NonRecursiveMessage"), - Number: proto.Int32(1), - }, - { - Name: proto.String("second"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.NonRecursiveMessage"), - Number: proto.Int32(2), - }, - }, - }, - // Note there is no recursive nature to this message - { - Name: proto.String("NonRecursiveMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("field"), - //Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - }, - }, - }, - Message: "QueryMessage", - }, - } - - for _, test := range tests { - reg := descriptor.NewRegistry() - msgs := []*descriptor.Message{} - for _, msgdesc := range test.MsgDescs { - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.MsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - message, err := reg.LookupMsg("", ".example."+test.Message) - if err != nil { - t.Fatalf("failed to lookup message: %s", err) - } - - _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) - if err != nil { - t.Fatalf("No recursion error should be thrown: %s", err) - } - } -} - -// TestMessagetoQueryParametersRecursive, is a check that cyclical references between messages -// are handled gracefully. The goal is to insure that attempts to add messages with cyclical -// references to query-parameters returns an error message. -func TestMessageToQueryParametersRecursive(t *testing.T) { - type test struct { - MsgDescs []*descriptorpb.DescriptorProto - Message string - } - - tests := []test{ - // First test: - // Here we test that a message that references it self through a field will return an error. - // Example proto: - // message DirectRecursiveMessage { - // DirectRecursiveMessage nested = 1; - // } - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("DirectRecursiveMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.DirectRecursiveMessage"), - Number: proto.Int32(1), - }, - }, - }, - }, - Message: "DirectRecursiveMessage", - }, - // Second test: - // Here we test that a cycle through multiple messages is detected and that an error is returned. - // Sample: - // message Root { NodeMessage nested = 1; } - // message NodeMessage { CycleMessage nested = 1; } - // message CycleMessage { Root nested = 1; } - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("RootMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.NodeMessage"), - Number: proto.Int32(1), - }, - }, - }, - { - Name: proto.String("NodeMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.CycleMessage"), - Number: proto.Int32(1), - }, - }, - }, - { - Name: proto.String("CycleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.RootMessage"), - Number: proto.Int32(1), - }, - }, - }, - }, - Message: "RootMessage", - }, - } - - for _, test := range tests { - reg := descriptor.NewRegistry() - msgs := []*descriptor.Message{} - for _, msgdesc := range test.MsgDescs { - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.MsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - message, err := reg.LookupMsg("", ".example."+test.Message) - if err != nil { - t.Fatalf("failed to lookup message: %s", err) - } - _, err = messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) - if err == nil { - t.Fatalf("It should not be allowed to have recursive query parameters") - } - } -} - -func TestMessageToQueryParametersWithJsonName(t *testing.T) { - type test struct { - MsgDescs []*descriptorpb.DescriptorProto - Message string - Params []openapiParameterObject - } - - tests := []test{ - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("test_field_a"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - JsonName: proto.String("testFieldA"), - }, - }, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "testFieldA", - In: "query", - Required: false, - Type: "string", - }, - }, - }, - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("SubMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("test_field_a"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - JsonName: proto.String("testFieldA"), - }, - }, - }, - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("sub_message"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.SubMessage"), - Number: proto.Int32(1), - JsonName: proto.String("subMessage"), - }, - }, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "subMessage.testFieldA", - In: "query", - Required: false, - Type: "string", - }, - }, - }, - } - - for _, test := range tests { - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(true) - msgs := []*descriptor.Message{} - for _, msgdesc := range test.MsgDescs { - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.MsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - message, err := reg.LookupMsg("", ".example."+test.Message) - if err != nil { - t.Fatalf("failed to lookup message: %s", err) - } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) - if err != nil { - t.Fatalf("failed to convert message to query parameters: %s", err) - } - if !reflect.DeepEqual(params, test.Params) { - t.Errorf("expected %v, got %v", test.Params, params) - } - } -} - -func TestMessageToQueryParametersWellKnownTypes(t *testing.T) { - type test struct { - MsgDescs []*descriptorpb.DescriptorProto - WellKnownMsgDescs []*descriptorpb.DescriptorProto - Message string - Params []openapiParameterObject - } - - tests := []test{ - { - MsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("a_field_mask"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".google.protobuf.FieldMask"), - Number: proto.Int32(1), - }, - { - Name: proto.String("a_timestamp"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".google.protobuf.Timestamp"), - Number: proto.Int32(2), - }, - }, - }, - }, - WellKnownMsgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("FieldMask"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("paths"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Number: proto.Int32(1), - }, - }, - }, - { - Name: proto.String("Timestamp"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("seconds"), - Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("nanos"), - Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), - Number: proto.Int32(2), - }, - }, - }, - }, - Message: "ExampleMessage", - Params: []openapiParameterObject{ - { - Name: "a_field_mask", - In: "query", - Required: false, - Type: "string", - }, - { - Name: "a_timestamp", - In: "query", - Required: false, - Type: "string", - Format: "date-time", - }, - }, - }, - } - - for _, test := range tests { - reg := descriptor.NewRegistry() - reg.SetEnumsAsInts(true) - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{ - { - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("google/well_known.proto"), - Package: proto.String("google.protobuf"), - Dependency: []string{}, - MessageType: test.WellKnownMsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String("google/well_known"), - }, - }, - { - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("acme/example.proto"), - Package: proto.String("example"), - Dependency: []string{"google/well_known.proto"}, - MessageType: test.MsgDescs, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String("acme/example"), - }, - }, - }, - }) - if err != nil { - t.Fatalf("failed to load CodeGeneratorRequest: %v", err) - } - - message, err := reg.LookupMsg("", ".example."+test.Message) - if err != nil { - t.Fatalf("failed to lookup message: %s", err) - } - params, err := messageToQueryParameters(message, reg, []descriptor.Parameter{}, nil) - if err != nil { - t.Fatalf("failed to convert message to query parameters: %s", err) - } - if !reflect.DeepEqual(params, test.Params) { - t.Errorf("expected %v, got %v", test.Params, params) - } - } -} - -func TestApplyTemplateSimple(t *testing.T) { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Example"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - Body: &descriptor.Body{FieldPath: nil}, - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", // TODO(achew22): Figure out what this should really be - }, - }, - }, - }, - }, - }, - }, - } - reg := descriptor.NewRegistry() - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - fileCL := crossLinkFixture(&file) - err := reg.Load(reqFromFile(fileCL)) - if err != nil { - t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) - return - } - result, err := applyTemplate(param{File: fileCL, reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - if want, is, name := "2.0", result.Swagger, "Swagger"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - if want, is, name := "", result.BasePath, "BasePath"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - if want, is, name := ([]string)(nil), result.Schemes, "Schemes"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - if want, is, name := []string{"application/json"}, result.Consumes, "Consumes"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - if want, is, name := []string{"application/json"}, result.Produces, "Produces"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", file) - t.Errorf("got: %s", fmt.Sprint(result)) - } -} - -func TestApplyTemplateMultiService(t *testing.T) { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Example"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - } - - // Create two services that have the same method name. We will test that the - // operation IDs are different - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - svc2 := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("OtherService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - Body: &descriptor.Body{FieldPath: nil}, - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", - }, - }, - }, - }, - }, - }, - { - ServiceDescriptorProto: svc2, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - Body: &descriptor.Body{FieldPath: nil}, - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/ping", - }, - }, - }, - }, - }, - }, - }, - } - reg := descriptor.NewRegistry() - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - fileCL := crossLinkFixture(&file) - err := reg.Load(reqFromFile(fileCL)) - if err != nil { - t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) - return - } - result, err := applyTemplate(param{File: fileCL, reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - - // Check that the two services have unique operation IDs even though they - // have the same method name. - if want, is := "ExampleService_Example", result.Paths["/v1/echo"].Get.OperationID; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", file, is, want) - } - if want, is := "OtherService_Example", result.Paths["/v1/ping"].Get.OperationID; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", file, is, want) - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", file) - t.Errorf("got: %s", fmt.Sprint(result)) - } -} - -func TestApplyTemplateOverrideOperationID(t *testing.T) { - newFile := func() *descriptor.File { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Example"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - Options: &descriptorpb.MethodOptions{}, - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - return &descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - Body: &descriptor.Body{FieldPath: nil}, - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", // TODO(achew22): Figure out what this should really be - }, - }, - }, - }, - }, - }, - }, - } - } - - verifyTemplateFromReq := func(t *testing.T, reg *descriptor.Registry, file *descriptor.File, opts *openapiconfig.OpenAPIOptions) { - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - fileCL := crossLinkFixture(file) - err := reg.Load(reqFromFile(fileCL)) - if err != nil { - t.Errorf("reg.Load(%#v) failed with %v; want success", *file, err) - return - } - if opts != nil { - if err := reg.RegisterOpenAPIOptions(opts); err != nil { - t.Fatalf("failed to register OpenAPI options: %s", err) - } - } - result, err := applyTemplate(param{File: fileCL, reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", *file, err) - return - } - if want, is := "MyExample", result.Paths["/v1/echo"].Get.OperationID; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).Paths[0].Get.OperationID = %s want to be %s", *file, is, want) - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", *file) - t.Errorf("got: %s", fmt.Sprint(result)) - } - } - - openapiOperation := openapi_options.Operation{ - OperationId: "MyExample", - } - - t.Run("verify override via method option", func(t *testing.T) { - file := newFile() - proto.SetExtension(proto.Message(file.Services[0].Methods[0].MethodDescriptorProto.Options), - openapi_options.E_Openapiv2Operation, &openapiOperation) - - reg := descriptor.NewRegistry() - verifyTemplateFromReq(t, reg, file, nil) - }) - - t.Run("verify override options annotations", func(t *testing.T) { - file := newFile() - reg := descriptor.NewRegistry() - opts := &openapiconfig.OpenAPIOptions{ - Method: []*openapiconfig.OpenAPIMethodOption{ - { - Method: "example.ExampleService.Example", - Option: &openapiOperation, - }, - }, - } - verifyTemplateFromReq(t, reg, file, opts) - }) -} - -func TestApplyTemplateExtensions(t *testing.T) { - newFile := func() *descriptor.File { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Example"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - Options: &descriptorpb.MethodOptions{}, - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - return &descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - Body: &descriptor.Body{FieldPath: nil}, - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", // TODO(achew22): Figure out what this should really be - }, - }, - }, - }, - }, - }, - }, - } - } - swagger := openapi_options.Swagger{ - Info: &openapi_options.Info{ - Title: "test", - Extensions: map[string]*structpb.Value{ - "x-info-extension": {Kind: &structpb.Value_StringValue{StringValue: "bar"}}, - }, - }, - Extensions: map[string]*structpb.Value{ - "x-foo": {Kind: &structpb.Value_StringValue{StringValue: "bar"}}, - "x-bar": {Kind: &structpb.Value_ListValue{ListValue: &structpb.ListValue{ - Values: []*structpb.Value{{Kind: &structpb.Value_StringValue{StringValue: "baz"}}}, - }}}, - }, - SecurityDefinitions: &openapi_options.SecurityDefinitions{ - Security: map[string]*openapi_options.SecurityScheme{ - "somescheme": { - Extensions: map[string]*structpb.Value{ - "x-security-baz": {Kind: &structpb.Value_BoolValue{BoolValue: true}}, - }, - }, - }, - }, - } - openapiOperation := openapi_options.Operation{ - Responses: map[string]*openapi_options.Response{ - "200": { - Extensions: map[string]*structpb.Value{ - "x-resp-id": {Kind: &structpb.Value_StringValue{StringValue: "resp1000"}}, - }, - }, - }, - Extensions: map[string]*structpb.Value{ - "x-op-foo": {Kind: &structpb.Value_StringValue{StringValue: "baz"}}, - }, - } - verifyTemplateExtensions := func(t *testing.T, reg *descriptor.Registry, file *descriptor.File, - opts *openapiconfig.OpenAPIOptions) { - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - fileCL := crossLinkFixture(file) - err := reg.Load(reqFromFile(fileCL)) - if err != nil { - t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) - return - } - if opts != nil { - if err := reg.RegisterOpenAPIOptions(opts); err != nil { - t.Fatalf("failed to register OpenAPI annotations: %s", err) - } - } - result, err := applyTemplate(param{File: fileCL, reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - if want, is, name := "2.0", result.Swagger, "Swagger"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - if got, want := len(result.extensions), 2; got != want { - t.Fatalf("len(applyTemplate(%#v).Extensions) = %d want to be %d", file, got, want) - } - if got, want := result.extensions[0].key, "x-bar"; got != want { - t.Errorf("applyTemplate(%#v).Extensions[0].key = %s want to be %s", file, got, want) - } - if got, want := result.extensions[1].key, "x-foo"; got != want { - t.Errorf("applyTemplate(%#v).Extensions[1].key = %s want to be %s", file, got, want) - } - { - var got []string - err = marshaler.Unmarshal(result.extensions[0].value, &got) - if err != nil { - t.Fatalf("marshaler.Unmarshal failed: %v", err) - } - want := []string{"baz"} - if diff := cmp.Diff(got, want); diff != "" { - t.Errorf(diff) - } - } - { - var got string - err = marshaler.Unmarshal(result.extensions[1].value, &got) - if err != nil { - t.Fatalf("marshaler.Unmarshal failed: %v", err) - } - want := "bar" - if diff := cmp.Diff(got, want); diff != "" { - t.Errorf(diff) - } - } - - var scheme openapiSecuritySchemeObject - for _, v := range result.SecurityDefinitions { - scheme = v - } - if want, is, name := []extension{ - {key: "x-security-baz", value: json.RawMessage("true")}, - }, scheme.extensions, "SecurityScheme.Extensions"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - - if want, is, name := []extension{ - {key: "x-info-extension", value: json.RawMessage("\"bar\"")}, - }, result.Info.extensions, "Info.Extensions"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - - var operation *openapiOperationObject - var response openapiResponseObject - for _, v := range result.Paths { - operation = v.Get - response = v.Get.Responses["200"] - } - if want, is, name := []extension{ - {key: "x-op-foo", value: json.RawMessage("\"baz\"")}, - }, operation.extensions, "operation.Extensions"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - if want, is, name := []extension{ - {key: "x-resp-id", value: json.RawMessage("\"resp1000\"")}, - }, response.extensions, "response.Extensions"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - } - t.Run("verify template options set via proto options", func(t *testing.T) { - file := newFile() - proto.SetExtension(proto.Message(file.FileDescriptorProto.Options), openapi_options.E_Openapiv2Swagger, &swagger) - proto.SetExtension(proto.Message(file.Services[0].Methods[0].Options), openapi_options.E_Openapiv2Operation, &openapiOperation) - reg := descriptor.NewRegistry() - verifyTemplateExtensions(t, reg, file, nil) - }) - t.Run("verify template options set via annotations", func(t *testing.T) { - file := newFile() - opts := &openapiconfig.OpenAPIOptions{ - File: []*openapiconfig.OpenAPIFileOption{ - { - File: "example.proto", - Option: &swagger, - }, - }, - Method: []*openapiconfig.OpenAPIMethodOption{ - { - Method: "example.ExampleService.Example", - Option: &openapiOperation, - }, - }, - } - reg := descriptor.NewRegistry() - verifyTemplateExtensions(t, reg, file, opts) - }) -} - -func TestApplyTemplateHeaders(t *testing.T) { - newFile := func() *descriptor.File { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Example"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - Options: &descriptorpb.MethodOptions{}, - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - return &descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - Body: &descriptor.Body{FieldPath: nil}, - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", // TODO(achew22): Figure out what this should really be - }, - }, - }, - }, - }, - }, - }, - } - } - openapiOperation := openapi_options.Operation{ - Responses: map[string]*openapi_options.Response{ - "200": &openapi_options.Response{ - Description: "Testing Headers", - Headers: map[string]*openapi_options.Header{ - "string": { - Description: "string header description", - Type: "string", - Format: "uuid", - Pattern: "", - }, - "boolean": { - Description: "boolean header description", - Type: "boolean", - Default: "true", - Pattern: "^true|false$", - }, - "integer": { - Description: "integer header description", - Type: "integer", - Default: "0", - Pattern: "^[0-9]$", - }, - "number": { - Description: "number header description", - Type: "number", - Default: "1.2", - Pattern: "^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$", - }, - }, - }, - }, - } - verifyTemplateHeaders := func(t *testing.T, reg *descriptor.Registry, file *descriptor.File, - opts *openapiconfig.OpenAPIOptions) { - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - fileCL := crossLinkFixture(file) - err := reg.Load(reqFromFile(fileCL)) - if err != nil { - t.Errorf("reg.Load(%#v) failed with %v; want success", file, err) - return - } - if opts != nil { - if err := reg.RegisterOpenAPIOptions(opts); err != nil { - t.Fatalf("failed to register OpenAPI annotations: %s", err) - } - } - result, err := applyTemplate(param{File: fileCL, reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - if want, is, name := "2.0", result.Swagger, "Swagger"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - - var response openapiResponseObject - for _, v := range result.Paths { - response = v.Get.Responses["200"] - } - if want, is, name := []openapiHeadersObject{ - { - "String": openapiHeaderObject{ - Description: "string header description", - Type: "string", - Format: "uuid", - Pattern: "", - }, - "Boolean": openapiHeaderObject{ - Description: "boolean header description", - Type: "boolean", - Default: json.RawMessage("true"), - Pattern: "^true|false$", - }, - "Integer": openapiHeaderObject{ - Description: "integer header description", - Type: "integer", - Default: json.RawMessage("0"), - Pattern: "^[0-9]$", - }, - "Number": openapiHeaderObject{ - Description: "number header description", - Type: "number", - Default: json.RawMessage("1.2"), - Pattern: "^[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$", - }, - }, - }[0], response.Headers, "response.Headers"; !reflect.DeepEqual(is, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, is, want) - } - - } - t.Run("verify template options set via proto options", func(t *testing.T) { - file := newFile() - proto.SetExtension(proto.Message(file.Services[0].Methods[0].Options), openapi_options.E_Openapiv2Operation, &openapiOperation) - reg := descriptor.NewRegistry() - verifyTemplateHeaders(t, reg, file, nil) - }) -} - -func TestValidateHeaderType(t *testing.T) { - type test struct { - Type string - Format string - expectedError error - } - tests := []test{ - { - "string", - "date-time", - nil, - }, - { - "boolean", - "", - nil, - }, - { - "integer", - "uint", - nil, - }, - { - "integer", - "uint8", - nil, - }, - { - "integer", - "uint16", - nil, - }, - { - "integer", - "uint32", - nil, - }, - { - "integer", - "uint64", - nil, - }, - { - "integer", - "int", - nil, - }, - { - "integer", - "int8", - nil, - }, - { - "integer", - "int16", - nil, - }, - { - "integer", - "int32", - nil, - }, - { - "integer", - "int64", - nil, - }, - { - "integer", - "float64", - errors.New("the provided format \"float64\" is not a valid extension of the type \"integer\""), - }, - { - "integer", - "uuid", - errors.New("the provided format \"uuid\" is not a valid extension of the type \"integer\""), - }, - { - "number", - "uint", - nil, - }, - { - "number", - "uint8", - nil, - }, - { - "number", - "uint16", - nil, - }, - { - "number", - "uint32", - nil, - }, - { - "number", - "uint64", - nil, - }, - { - "number", - "int", - nil, - }, - { - "number", - "int8", - nil, - }, - { - "number", - "int16", - nil, - }, - { - "number", - "int32", - nil, - }, - { - "number", - "int64", - nil, - }, - { - "number", - "float", - nil, - }, - { - "number", - "float32", - nil, - }, - { - "number", - "float64", - nil, - }, - { - "number", - "complex64", - nil, - }, - { - "number", - "complex128", - nil, - }, - { - "number", - "double", - nil, - }, - { - "number", - "byte", - nil, - }, - { - "number", - "rune", - nil, - }, - { - "number", - "uintptr", - nil, - }, - { - "number", - "date", - errors.New("the provided format \"date\" is not a valid extension of the type \"number\""), - }, - { - "array", - "", - errors.New("the provided header type \"array\" is not supported"), - }, - { - "foo", - "", - errors.New("the provided header type \"foo\" is not supported"), - }, - } - for _, v := range tests { - err := validateHeaderTypeAndFormat(v.Type, v.Format) - - if v.expectedError == nil { - if err != nil { - t.Errorf("unexpected error %v", err) - } - } else { - if err == nil { - t.Fatal("expected header error not returned") - } - if err.Error() != v.expectedError.Error() { - t.Errorf("expected error malformed, expected %q, got %q", v.expectedError.Error(), err.Error()) - } - } - } - -} - -func TestValidateDefaultValueType(t *testing.T) { - type test struct { - Type string - Value string - Format string - expectedError error - } - tests := []test{ - { - "string", - `"string"`, - "", - nil, - }, - { - "string", - "\"2012-11-01T22:08:41+00:00\"", - "date-time", - nil, - }, - { - "string", - "\"2012-11-01\"", - "date", - nil, - }, - { - "string", - "0", - "", - errors.New("the provided default value \"0\" does not match provider type \"string\", or is not properly quoted with escaped quotations"), - }, - { - "string", - "false", - "", - errors.New("the provided default value \"false\" does not match provider type \"string\", or is not properly quoted with escaped quotations"), - }, - { - "boolean", - "true", - "", - nil, - }, - { - "boolean", - "0", - "", - errors.New("the provided default value \"0\" does not match provider type \"boolean\""), - }, - { - "boolean", - `"string"`, - "", - errors.New("the provided default value \"\\\"string\\\"\" does not match provider type \"boolean\""), - }, - { - "number", - "1.2", - "", - nil, - }, - { - "number", - "123", - "", - nil, - }, - { - "number", - "nan", - "", - errors.New("the provided number \"nan\" is not a valid JSON number"), - }, - { - "number", - "NaN", - "", - errors.New("the provided number \"NaN\" is not a valid JSON number"), - }, - { - "number", - "-459.67", - "", - nil, - }, - { - "number", - "inf", - "", - errors.New("the provided number \"inf\" is not a valid JSON number"), - }, - { - "number", - "infinity", - "", - errors.New("the provided number \"infinity\" is not a valid JSON number"), - }, - { - "number", - "Inf", - "", - errors.New("the provided number \"Inf\" is not a valid JSON number"), - }, - { - "number", - "Infinity", - "", - errors.New("the provided number \"Infinity\" is not a valid JSON number"), - }, - { - "number", - "false", - "", - errors.New("the provided default value \"false\" does not match provider type \"number\""), - }, - { - "number", - `"string"`, - "", - errors.New("the provided default value \"\\\"string\\\"\" does not match provider type \"number\""), - }, - { - "integer", - "2", - "", - nil, - }, - { - "integer", - fmt.Sprint(math.MaxInt32), - "int32", - nil, - }, - { - "integer", - fmt.Sprint(math.MaxInt32 + 1), - "int32", - errors.New("the provided default value \"2147483648\" does not match provided format \"int32\""), - }, - { - "integer", - fmt.Sprint(math.MaxInt64), - "int64", - nil, - }, - { - "integer", - "9223372036854775808", - "int64", - errors.New("the provided default value \"9223372036854775808\" does not match provided format \"int64\""), - }, - { - "integer", - "18446744073709551615", - "uint64", - nil, - }, - { - "integer", - "false", - "", - errors.New("the provided default value \"false\" does not match provided type \"integer\""), - }, - { - "integer", - "1.2", - "", - errors.New("the provided default value \"1.2\" does not match provided type \"integer\""), - }, - { - "integer", - `"string"`, - "", - errors.New("the provided default value \"\\\"string\\\"\" does not match provided type \"integer\""), - }, - } - for _, v := range tests { - err := validateDefaultValueTypeAndFormat(v.Type, v.Value, v.Format) - - if v.expectedError == nil { - if err != nil { - t.Errorf("unexpected error '%v'", err) - } - } else { - if err == nil { - t.Error("expected update error not returned") - } - if err.Error() != v.expectedError.Error() { - t.Errorf("expected error malformed, expected %q, got %q", v.expectedError.Error(), err.Error()) - } - } - } - -} - -func TestApplyTemplateRequestWithoutClientStreaming(t *testing.T) { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String("NestedMessage"), - Number: proto.Int32(1), - }, - }, - } - nesteddesc := &descriptorpb.DescriptorProto{ - Name: proto.String("NestedMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("int32"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("bool"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_BOOL.Enum(), - Number: proto.Int32(2), - }, - }, - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Echo"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - ClientStreaming: proto.Bool(false), - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - - meth.ServerStreaming = proto.Bool(false) - - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - nested := &descriptor.Message{ - DescriptorProto: nesteddesc, - } - - nestedField := &descriptor.Field{ - Message: msg, - FieldDescriptorProto: msg.GetField()[0], - } - intField := &descriptor.Field{ - Message: nested, - FieldDescriptorProto: nested.GetField()[0], - } - boolField := &descriptor.Field{ - Message: nested, - FieldDescriptorProto: nested.GetField()[1], - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc, nesteddesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg, nested}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "POST", - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", // TODO(achew): Figure out what this hsould really be - }, - PathParams: []descriptor.Parameter{ - { - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "nested", - Target: nestedField, - }, - { - Name: "int32", - Target: intField, - }, - }), - Target: intField, - }, - }, - Body: &descriptor.Body{ - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "nested", - Target: nestedField, - }, - { - Name: "bool", - Target: boolField, - }, - }), - }, - }, - }, - }, - }, - }, - }, - } - reg := descriptor.NewRegistry() - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - if want, got := "2.0", result.Swagger; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).Swagger = %s want to be %s", file, got, want) - } - if want, got := "", result.BasePath; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).BasePath = %s want to be %s", file, got, want) - } - if want, got := ([]string)(nil), result.Schemes; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).Schemes = %s want to be %s", file, got, want) - } - if want, got := []string{"application/json"}, result.Consumes; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).Consumes = %s want to be %s", file, got, want) - } - if want, got := []string{"application/json"}, result.Produces; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).Produces = %s want to be %s", file, got, want) - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", file) - t.Errorf("got: %s", fmt.Sprint(result)) - } -} - -func TestApplyTemplateRequestWithClientStreaming(t *testing.T) { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("nested"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String("NestedMessage"), - Number: proto.Int32(1), - }, - }, - } - nesteddesc := &descriptorpb.DescriptorProto{ - Name: proto.String("NestedMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("int32"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("bool"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_BOOL.Enum(), - Number: proto.Int32(2), - }, - }, - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Echo"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - ClientStreaming: proto.Bool(true), - ServerStreaming: proto.Bool(true), - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - nested := &descriptor.Message{ - DescriptorProto: nesteddesc, - } - - nestedField := &descriptor.Field{ - Message: msg, - FieldDescriptorProto: msg.GetField()[0], - } - intField := &descriptor.Field{ - Message: nested, - FieldDescriptorProto: nested.GetField()[0], - } - boolField := &descriptor.Field{ - Message: nested, - FieldDescriptorProto: nested.GetField()[1], - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc, nesteddesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg, nested}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "POST", - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", // TODO(achew): Figure out what this hsould really be - }, - PathParams: []descriptor.Parameter{ - { - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "nested", - Target: nestedField, - }, - { - Name: "int32", - Target: intField, - }, - }), - Target: intField, - }, - }, - Body: &descriptor.Body{ - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "nested", - Target: nestedField, - }, - { - Name: "bool", - Target: boolField, - }, - }), - }, - }, - }, - }, - }, - }, - }, - } - reg := descriptor.NewRegistry() - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - - // Only ExampleMessage must be present, not NestedMessage - if want, got, name := 3, len(result.Definitions), "len(Definitions)"; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) - } - if _, ok := result.Paths["/v1/echo"].Post.Responses["200"]; !ok { - t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", file, `result.Paths["/v1/echo"].Post.Responses["200"]`) - } else { - if want, got, name := "A successful response.(streaming responses)", result.Paths["/v1/echo"].Post.Responses["200"].Description, `result.Paths["/v1/echo"].Post.Responses["200"].Description`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - streamExampleExampleMessage := result.Paths["/v1/echo"].Post.Responses["200"].Schema - if want, got, name := "object", streamExampleExampleMessage.Type, `result.Paths["/v1/echo"].Post.Responses["200"].Schema.Type`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - if want, got, name := "Stream result of exampleExampleMessage", streamExampleExampleMessage.Title, `result.Paths["/v1/echo"].Post.Responses["200"].Schema.Title`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - streamExampleExampleMessageProperties := *(streamExampleExampleMessage.Properties) - if want, got, name := 2, len(streamExampleExampleMessageProperties), `len(StreamDefinitions["exampleExampleMessage"].Properties)`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) - } else { - resultProperty := streamExampleExampleMessageProperties[0] - if want, got, name := "result", resultProperty.Key, `(*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Key`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - result := resultProperty.Value.(openapiSchemaObject) - if want, got, name := "#/definitions/exampleExampleMessage", result.Ref, `((*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Value.(openapiSchemaObject)).Ref`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - errorProperty := streamExampleExampleMessageProperties[1] - if want, got, name := "error", errorProperty.Key, `(*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Key`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - err := errorProperty.Value.(openapiSchemaObject) - if want, got, name := "#/definitions/rpcStatus", err.Ref, `((*(StreamDefinitions["exampleExampleMessage"].Properties))[0].Value.(openapiSchemaObject)).Ref`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %s want to be %s", file, name, got, want) - } - } - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", file) - t.Errorf("got: %s", fmt.Sprint(result)) - } -} - -func TestApplyTemplateRequestWithUnusedReferences(t *testing.T) { - reqdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("string"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - }, - } - respdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("EmptyMessage"), - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Example"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("EmptyMessage"), - ClientStreaming: proto.Bool(false), - ServerStreaming: proto.Bool(false), - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - - req := &descriptor.Message{ - DescriptorProto: reqdesc, - } - resp := &descriptor.Message{ - DescriptorProto: respdesc, - } - stringField := &descriptor.Field{ - Message: req, - FieldDescriptorProto: req.GetField()[0], - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{reqdesc, respdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{req, resp}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: req, - ResponseType: resp, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "GET", - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/example", - }, - }, - { - HTTPMethod: "POST", - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/example/{string}", - }, - PathParams: []descriptor.Parameter{ - { - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "string", - Target: stringField, - }, - }), - Target: stringField, - }, - }, - Body: &descriptor.Body{ - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "string", - Target: stringField, - }, - }), - }, - }, - }, - }, - }, - }, - }, - } - - reg := descriptor.NewRegistry() - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - - // Only EmptyMessage must be present, not ExampleMessage (plus error status) - if want, got, name := 3, len(result.Definitions), "len(Definitions)"; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", file) - t.Errorf("got: %s", fmt.Sprint(result)) - } -} - -func TestApplyTemplateRequestWithBodyQueryParameters(t *testing.T) { - bookDesc := &descriptorpb.DescriptorProto{ - Name: proto.String("Book"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("name"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("id"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(2), - }, - }, - } - createDesc := &descriptorpb.DescriptorProto{ - Name: proto.String("CreateBookRequest"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("parent"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("book"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(2), - }, - { - Name: proto.String("book_id"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(3), - }, - }, - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("CreateBook"), - InputType: proto.String("CreateBookRequest"), - OutputType: proto.String("Book"), - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("BookService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - - bookMsg := &descriptor.Message{ - DescriptorProto: bookDesc, - } - createMsg := &descriptor.Message{ - DescriptorProto: createDesc, - } - - parentField := &descriptor.Field{ - Message: createMsg, - FieldDescriptorProto: createMsg.GetField()[0], - } - bookField := &descriptor.Field{ - Message: createMsg, - FieldMessage: bookMsg, - FieldDescriptorProto: createMsg.GetField()[1], - } - bookIDField := &descriptor.Field{ - Message: createMsg, - FieldDescriptorProto: createMsg.GetField()[2], - } - - createMsg.Fields = []*descriptor.Field{parentField, bookField, bookIDField} - - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("book.proto"), - MessageType: []*descriptorpb.DescriptorProto{bookDesc, createDesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/book.pb", - Name: "book_pb", - }, - Messages: []*descriptor.Message{bookMsg, createMsg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: createMsg, - ResponseType: bookMsg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "POST", - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/{parent=publishers/*}/books", - }, - PathParams: []descriptor.Parameter{ - { - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "parent", - Target: parentField, - }, - }), - Target: parentField, - }, - }, - Body: &descriptor.Body{ - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{ - { - Name: "book", - Target: bookField, - }, - }), - }, - }, - }, - }, - }, - }, - }, - } - reg := descriptor.NewRegistry() - if err := AddErrorDefs(reg); err != nil { - t.Errorf("AddErrorDefs(%#v) failed with %v; want success", reg, err) - return - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}}) - if err != nil { - t.Errorf("Registry.Load() failed with %v; want success", err) - return - } - result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - - if _, ok := result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]; !ok { - t.Errorf("applyTemplate(%#v).%s = expected 200 response to be defined", file, `result.Paths["/v1/{parent=publishers/*}/books"].Post.Responses["200"]`) - } else { - if want, got, name := 3, len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters), `len(result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters)`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %d want to be %d", file, name, got, want) - } - - type param struct { - Name string - In string - Required bool - } - - p0 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0] - if want, got, name := (param{"parent", "path", true}), (param{p0.Name, p0.In, p0.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[0]`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) - } - p1 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1] - if want, got, name := (param{"body", "body", true}), (param{p1.Name, p1.In, p1.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) - } - p2 := result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[2] - if want, got, name := (param{"book_id", "query", false}), (param{p2.Name, p2.In, p2.Required}), `result.Paths["/v1/{parent=publishers/*}/books"].Post.Parameters[1]`; !reflect.DeepEqual(got, want) { - t.Errorf("applyTemplate(%#v).%s = %v want to be %v", file, name, got, want) - } - } - - // If there was a failure, print out the input and the json result for debugging. - if t.Failed() { - t.Errorf("had: %s", file) - t.Errorf("got: %s", fmt.Sprint(result)) - } -} - -func generateFieldsForJSONReservedName() []*descriptor.Field { - fields := make([]*descriptor.Field, 0) - fieldName := string("json_name") - fieldJSONName := string("jsonNAME") - fieldDescriptor := descriptorpb.FieldDescriptorProto{Name: &fieldName, JsonName: &fieldJSONName} - field := &descriptor.Field{FieldDescriptorProto: &fieldDescriptor} - return append(fields, field) -} - -func generateMsgsForJSONReservedName() []*descriptor.Message { - result := make([]*descriptor.Message, 0) - // The first message, its field is field_abc and its type is NewType - // NewType field_abc - fieldName := "field_abc" - fieldJSONName := "fieldAbc" - messageName1 := "message1" - messageType := "pkg.a.NewType" - pfd := descriptorpb.FieldDescriptorProto{Name: &fieldName, JsonName: &fieldJSONName, TypeName: &messageType} - result = append(result, - &descriptor.Message{ - DescriptorProto: &descriptorpb.DescriptorProto{ - Name: &messageName1, Field: []*descriptorpb.FieldDescriptorProto{&pfd}, - }, - }) - // The second message, its name is NewName, its type is string - // message NewType { - // string field_newName [json_name = RESERVEDJSONNAME] - // } - messageName := "NewType" - field := "field_newName" - fieldJSONName2 := "RESERVEDJSONNAME" - pfd2 := descriptorpb.FieldDescriptorProto{Name: &field, JsonName: &fieldJSONName2} - result = append(result, &descriptor.Message{ - DescriptorProto: &descriptorpb.DescriptorProto{ - Name: &messageName, Field: []*descriptorpb.FieldDescriptorProto{&pfd2}, - }, - }) - return result -} - -func TestTemplateWithJsonCamelCase(t *testing.T) { - var tests = []struct { - input string - expected string - }{ - {"/test/{test_id}", "/test/{testId}"}, - {"/test1/{test1_id}/test2/{test2_id}", "/test1/{test1Id}/test2/{test2Id}"}, - {"/test1/{test1_id}/{test2_id}", "/test1/{test1Id}/{test2Id}"}, - {"/test1/test2/{test1_id}/{test2_id}", "/test1/test2/{test1Id}/{test2Id}"}, - {"/test1/{test1_id1_id2}", "/test1/{test1Id1Id2}"}, - {"/test1/{test1_id1_id2}/test2/{test2_id3_id4}", "/test1/{test1Id1Id2}/test2/{test2Id3Id4}"}, - {"/test1/test2/{test1_id1_id2}/{test2_id3_id4}", "/test1/test2/{test1Id1Id2}/{test2Id3Id4}"}, - {"test/{a}", "test/{a}"}, - {"test/{ab}", "test/{ab}"}, - {"test/{a_a}", "test/{aA}"}, - {"test/{ab_c}", "test/{abC}"}, - {"test/{json_name}", "test/{jsonNAME}"}, - {"test/{field_abc.field_newName}", "test/{fieldAbc.RESERVEDJSONNAME}"}, - } - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(true) - for _, data := range tests { - actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - if data.expected != actual { - t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) - } - } -} - -func TestTemplateWithoutJsonCamelCase(t *testing.T) { - var tests = []struct { - input string - expected string - }{ - {"/test/{test_id}", "/test/{test_id}"}, - {"/test1/{test1_id}/test2/{test2_id}", "/test1/{test1_id}/test2/{test2_id}"}, - {"/test1/{test1_id}/{test2_id}", "/test1/{test1_id}/{test2_id}"}, - {"/test1/test2/{test1_id}/{test2_id}", "/test1/test2/{test1_id}/{test2_id}"}, - {"/test1/{test1_id1_id2}", "/test1/{test1_id1_id2}"}, - {"/test1/{test1_id1_id2}/test2/{test2_id3_id4}", "/test1/{test1_id1_id2}/test2/{test2_id3_id4}"}, - {"/test1/test2/{test1_id1_id2}/{test2_id3_id4}", "/test1/test2/{test1_id1_id2}/{test2_id3_id4}"}, - {"test/{a}", "test/{a}"}, - {"test/{ab}", "test/{ab}"}, - {"test/{a_a}", "test/{a_a}"}, - {"test/{json_name}", "test/{json_name}"}, - {"test/{field_abc.field_newName}", "test/{field_abc.field_newName}"}, - } - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(false) - for _, data := range tests { - actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - if data.expected != actual { - t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) - } - } -} - -func TestTemplateToOpenAPIPath(t *testing.T) { - var tests = []struct { - input string - expected string - }{ - {"/test", "/test"}, - {"/{test}", "/{test}"}, - {"/{test=prefix/*}", "/{test}"}, - {"/{test=prefix/that/has/multiple/parts/to/it/*}", "/{test}"}, - {"/{test1}/{test2}", "/{test1}/{test2}"}, - {"/{test1}/{test2}/", "/{test1}/{test2}/"}, - {"/{name=prefix/*}", "/{name=prefix/*}"}, - {"/{name=prefix1/*/prefix2/*}", "/{name=prefix1/*/prefix2/*}"}, - {"/{user.name=prefix/*}", "/{user.name=prefix/*}"}, - {"/{user.name=prefix1/*/prefix2/*}", "/{user.name=prefix1/*/prefix2/*}"}, - {"/{parent=prefix/*}/children", "/{parent=prefix/*}/children"}, - {"/{name=prefix/*}:customMethod", "/{name=prefix/*}:customMethod"}, - {"/{name=prefix1/*/prefix2/*}:customMethod", "/{name=prefix1/*/prefix2/*}:customMethod"}, - {"/{user.name=prefix/*}:customMethod", "/{user.name=prefix/*}:customMethod"}, - {"/{user.name=prefix1/*/prefix2/*}:customMethod", "/{user.name=prefix1/*/prefix2/*}:customMethod"}, - {"/{parent=prefix/*}/children:customMethod", "/{parent=prefix/*}/children:customMethod"}, - } - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(false) - for _, data := range tests { - actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - if data.expected != actual { - t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) - } - } - reg.SetUseJSONNamesForFields(true) - for _, data := range tests { - actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - if data.expected != actual { - t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) - } - } -} - -func BenchmarkTemplateToOpenAPIPath(b *testing.B) { - const input = "/{user.name=prefix1/*/prefix2/*}:customMethod" - - b.Run("with JSON names", func(b *testing.B) { - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(false) - - for i := 0; i < b.N; i++ { - _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - } - }) - - b.Run("without JSON names", func(b *testing.B) { - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(true) - - for i := 0; i < b.N; i++ { - _ = templateToOpenAPIPath(input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - } - }) -} - -func TestResolveFullyQualifiedNameToOpenAPIName(t *testing.T) { - var tests = []struct { - input string - output string - listOfFQMNs []string - useFQNForOpenAPIName bool - }{ - { - ".a.b.C", - "C", - []string{ - ".a.b.C", - }, - false, - }, - { - ".a.b.C", - "abC", - []string{ - ".a.C", - ".a.b.C", - }, - false, - }, - { - ".a.b.C", - "abC", - []string{ - ".C", - ".a.C", - ".a.b.C", - }, - false, - }, - { - ".a.b.C", - "a.b.C", - []string{ - ".C", - ".a.C", - ".a.b.C", - }, - true, - }, - } - - for _, data := range tests { - names := resolveFullyQualifiedNameToOpenAPINames(data.listOfFQMNs, data.useFQNForOpenAPIName) - output := names[data.input] - if output != data.output { - t.Errorf("Expected fullyQualifiedNameToOpenAPIName(%v) to be %s but got %s", - data.input, data.output, output) - } - } -} - -func TestFQMNtoOpenAPIName(t *testing.T) { - var tests = []struct { - input string - expected string - }{ - {"/test", "/test"}, - {"/{test}", "/{test}"}, - {"/{test=prefix/*}", "/{test}"}, - {"/{test=prefix/that/has/multiple/parts/to/it/*}", "/{test}"}, - {"/{test1}/{test2}", "/{test1}/{test2}"}, - {"/{test1}/{test2}/", "/{test1}/{test2}/"}, - } - reg := descriptor.NewRegistry() - reg.SetUseJSONNamesForFields(false) - for _, data := range tests { - actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - if data.expected != actual { - t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) - } - } - reg.SetUseJSONNamesForFields(true) - for _, data := range tests { - actual := templateToOpenAPIPath(data.input, reg, generateFieldsForJSONReservedName(), generateMsgsForJSONReservedName()) - if data.expected != actual { - t.Errorf("Expected templateToOpenAPIPath(%v) = %v, actual: %v", data.input, data.expected, actual) - } - } -} - -func TestSchemaOfField(t *testing.T) { - type test struct { - field *descriptor.Field - refs refMap - expected openapiSchemaObject - openAPIOptions *openapiconfig.OpenAPIOptions - } - - jsonSchema := &openapi_options.JSONSchema{ - Title: "field title", - Description: "field description", - } - - var fieldOptions = new(descriptorpb.FieldOptions) - proto.SetExtension(fieldOptions, openapi_options.E_Openapiv2Field, jsonSchema) - - var requiredField = []annotations.FieldBehavior{annotations.FieldBehavior_REQUIRED} - var requiredFieldOptions = new(descriptorpb.FieldOptions) - proto.SetExtension(requiredFieldOptions, annotations.E_FieldBehavior, requiredField) - - var outputOnlyField = []annotations.FieldBehavior{annotations.FieldBehavior_OUTPUT_ONLY} - var outputOnlyOptions = new(descriptorpb.FieldOptions) - proto.SetExtension(outputOnlyOptions, annotations.E_FieldBehavior, outputOnlyField) - - tests := []test{ - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("primitive_field"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("repeated_primitive_field"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "array", - Items: &openapiItemsObject{ - Type: "string", - }, - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.FieldMask"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.Timestamp"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - Format: "date-time", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.Duration"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.StringValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("repeated_wrapped_field"), - TypeName: proto.String(".google.protobuf.StringValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "array", - Items: &openapiItemsObject{ - Type: "string", - }, - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.BytesValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - Format: "byte", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.Int32Value"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "integer", - Format: "int32", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.UInt32Value"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "integer", - Format: "int64", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.Int64Value"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - Format: "int64", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.UInt64Value"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - Format: "uint64", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.FloatValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "number", - Format: "float", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.DoubleValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "number", - Format: "double", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.BoolValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "boolean", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.Struct"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "object", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.Value"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "object", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.ListValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "array", - Items: (*openapiItemsObject)(&schemaCore{ - Type: "object", - }), - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("wrapped_field"), - TypeName: proto.String(".google.protobuf.NullValue"), - Type: descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum(), - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("message_field"), - TypeName: proto.String(".example.Message"), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - }, - }, - refs: refMap{".example.Message": struct{}{}}, - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Ref: "#/definitions/exampleMessage", - }, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("map_field"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Message.MapFieldEntry"), - Options: fieldOptions, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "object", - }, - AdditionalProperties: &openapiSchemaObject{ - schemaCore: schemaCore{Type: "string"}, - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("array_field"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Options: fieldOptions, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "array", - Items: (*openapiItemsObject)(&schemaCore{Type: "string"}), - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("primitive_field"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), - Options: fieldOptions, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "integer", - Format: "int32", - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("message_field"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Empty"), - Options: fieldOptions, - }, - }, - refs: refMap{".example.Empty": struct{}{}}, - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Ref: "#/definitions/exampleEmpty", - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("map_field"), // should be called map_field_option but it's not valid map field name - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Message.MapFieldEntry"), - }, - }, - openAPIOptions: &openapiconfig.OpenAPIOptions{ - Field: []*openapiconfig.OpenAPIFieldOption{ - { - Field: "example.Message.map_field", - Option: jsonSchema, - }, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "object", - }, - AdditionalProperties: &openapiSchemaObject{ - schemaCore: schemaCore{Type: "string"}, - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("array_field_option"), - Label: descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - }, - }, - openAPIOptions: &openapiconfig.OpenAPIOptions{ - Field: []*openapiconfig.OpenAPIFieldOption{ - { - Field: "example.Message.array_field_option", - Option: jsonSchema, - }, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "array", - Items: (*openapiItemsObject)(&schemaCore{Type: "string"}), - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("primitive_field_option"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_INT32.Enum(), - }, - }, - openAPIOptions: &openapiconfig.OpenAPIOptions{ - Field: []*openapiconfig.OpenAPIFieldOption{ - { - Field: "example.Message.primitive_field_option", - Option: jsonSchema, - }, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "integer", - Format: "int32", - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("message_field_option"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), - TypeName: proto.String(".example.Empty"), - }, - }, - openAPIOptions: &openapiconfig.OpenAPIOptions{ - Field: []*openapiconfig.OpenAPIFieldOption{ - { - Field: "example.Message.message_field_option", - Option: jsonSchema, - }, - }, - }, - refs: refMap{".example.Empty": struct{}{}}, - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Ref: "#/definitions/exampleEmpty", - }, - Title: "field title", - Description: "field description", - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("required_via_field_behavior_field"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Options: requiredFieldOptions, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - Required: []string{"required_via_field_behavior_field"}, - }, - }, - { - field: &descriptor.Field{ - FieldDescriptorProto: &descriptorpb.FieldDescriptorProto{ - Name: proto.String("readonly_via_field_behavior_field"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Options: outputOnlyOptions, - }, - }, - refs: make(refMap), - expected: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - ReadOnly: true, - }, - }, - } - for _, test := range tests { - reg := descriptor.NewRegistry() - req := &pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{ - { - Name: proto.String("third_party/google.proto"), - Package: proto.String("google.protobuf"), - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String("third_party/google"), - }, - MessageType: []*descriptorpb.DescriptorProto{ - protodesc.ToDescriptorProto((&structpb.Struct{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&structpb.Value{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&structpb.ListValue{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&field_mask.FieldMask{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((×tamppb.Timestamp{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&durationpb.Duration{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.StringValue{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.BytesValue{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.Int32Value{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.UInt32Value{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.Int64Value{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.UInt64Value{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.FloatValue{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.DoubleValue{}).ProtoReflect().Descriptor()), - protodesc.ToDescriptorProto((&wrapperspb.BoolValue{}).ProtoReflect().Descriptor()), - }, - EnumType: []*descriptorpb.EnumDescriptorProto{ - protodesc.ToEnumDescriptorProto(structpb.NullValue(0).Descriptor()), - }, - }, - { - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{"third_party/google.proto"}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - MessageType: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("Message"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("value"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - func() *descriptorpb.FieldDescriptorProto { - fd := test.field.FieldDescriptorProto - fd.Number = proto.Int32(2) - return fd - }(), - }, - NestedType: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("MapFieldEntry"), - Options: &descriptorpb.MessageOptions{MapEntry: proto.Bool(true)}, - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("key"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - }, - { - Name: proto.String("value"), - Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(2), - }, - }, - }, - }, - }, - { - Name: proto.String("Empty"), - }, - }, - EnumType: []*descriptorpb.EnumDescriptorProto{ - { - Name: proto.String("MessageType"), - Value: []*descriptorpb.EnumValueDescriptorProto{ - { - Name: proto.String("MESSAGE_TYPE_1"), - Number: proto.Int32(0), - }, - }, - }, - }, - Service: []*descriptorpb.ServiceDescriptorProto{}, - }, - }, - } - err := reg.Load(req) - if err != nil { - t.Errorf("failed to reg.Load(req): %v", err) - } - - // set field's parent message pointer to message so field can resolve its FQFN - test.field.Message = &descriptor.Message{ - DescriptorProto: req.ProtoFile[1].MessageType[0], - File: &descriptor.File{ - FileDescriptorProto: req.ProtoFile[1], - }, - } - - if test.openAPIOptions != nil { - if err := reg.RegisterOpenAPIOptions(test.openAPIOptions); err != nil { - t.Fatalf("failed to register OpenAPI options: %s", err) - } - } - - refs := make(refMap) - actual := schemaOfField(test.field, reg, refs) - expectedSchemaObject := test.expected - if e, a := expectedSchemaObject, actual; !reflect.DeepEqual(a, e) { - t.Errorf("Expected schemaOfField(%v) = \n%#+v, actual: \n%#+v", test.field, e, a) - } - if !reflect.DeepEqual(refs, test.refs) { - t.Errorf("Expected schemaOfField(%v) to add refs %v, not %v", test.field, test.refs, refs) - } - } -} - -func TestRenderMessagesAsDefinition(t *testing.T) { - jsonSchema := &openapi_options.JSONSchema{ - Title: "field title", - Description: "field description", - Required: []string{"aRequiredField"}, - } - - var requiredField = new(descriptorpb.FieldOptions) - proto.SetExtension(requiredField, openapi_options.E_Openapiv2Field, jsonSchema) - - var fieldBehaviorRequired = []annotations.FieldBehavior{annotations.FieldBehavior_REQUIRED} - var requiredFieldOptions = new(descriptorpb.FieldOptions) - proto.SetExtension(requiredFieldOptions, annotations.E_FieldBehavior, fieldBehaviorRequired) - - var fieldBehaviorOutputOnlyField = []annotations.FieldBehavior{annotations.FieldBehavior_OUTPUT_ONLY} - var fieldBehaviorOutputOnlyOptions = new(descriptorpb.FieldOptions) - proto.SetExtension(fieldBehaviorOutputOnlyOptions, annotations.E_FieldBehavior, fieldBehaviorOutputOnlyField) - - tests := []struct { - descr string - msgDescs []*descriptorpb.DescriptorProto - schema map[string]openapi_options.Schema // per-message schema to add - defs openapiDefinitionsObject - openAPIOptions *openapiconfig.OpenAPIOptions - }{ - { - descr: "no OpenAPI options", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{}, - defs: map[string]openapiSchemaObject{ - "Message": {schemaCore: schemaCore{Type: "object"}}, - }, - }, - { - descr: "example option", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - Example: `{"foo":"bar"}`, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": {schemaCore: schemaCore{ - Type: "object", - Example: json.RawMessage(`{"foo":"bar"}`), - }}, - }, - }, - { - descr: "example option with something non-json", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - Example: `XXXX anything goes XXXX`, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": {schemaCore: schemaCore{ - Type: "object", - Example: json.RawMessage(`XXXX anything goes XXXX`), - }}, - }, - }, - { - descr: "external docs option", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - ExternalDocs: &openapi_options.ExternalDocumentation{ - Description: "glorious docs", - Url: "https://nada", - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - ExternalDocs: &openapiExternalDocumentationObject{ - Description: "glorious docs", - URL: "https://nada", - }, - }, - }, - }, - { - descr: "JSONSchema options", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - JsonSchema: &openapi_options.JSONSchema{ - Title: "title", - Description: "desc", - MultipleOf: 100, - Maximum: 101, - ExclusiveMaximum: true, - Minimum: 1, - ExclusiveMinimum: true, - MaxLength: 10, - MinLength: 3, - Pattern: "[a-z]+", - MaxItems: 20, - MinItems: 2, - UniqueItems: true, - MaxProperties: 33, - MinProperties: 22, - Required: []string{"req"}, - ReadOnly: true, - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "title", - Description: "desc", - MultipleOf: 100, - Maximum: 101, - ExclusiveMaximum: true, - Minimum: 1, - ExclusiveMinimum: true, - MaxLength: 10, - MinLength: 3, - Pattern: "[a-z]+", - MaxItems: 20, - MinItems: 2, - UniqueItems: true, - MaxProperties: 33, - MinProperties: 22, - Required: []string{"req"}, - ReadOnly: true, - }, - }, - }, - { - descr: "JSONSchema options from registry", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - openAPIOptions: &openapiconfig.OpenAPIOptions{ - Message: []*openapiconfig.OpenAPIMessageOption{ - { - Message: "example.Message", - Option: &openapi_options.Schema{ - JsonSchema: &openapi_options.JSONSchema{ - Title: "title", - Description: "desc", - MultipleOf: 100, - Maximum: 101, - ExclusiveMaximum: true, - Minimum: 1, - ExclusiveMinimum: true, - MaxLength: 10, - MinLength: 3, - Pattern: "[a-z]+", - MaxItems: 20, - MinItems: 2, - UniqueItems: true, - MaxProperties: 33, - MinProperties: 22, - Required: []string{"req"}, - ReadOnly: true, - }, - }, - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "title", - Description: "desc", - MultipleOf: 100, - Maximum: 101, - ExclusiveMaximum: true, - Minimum: 1, - ExclusiveMinimum: true, - MaxLength: 10, - MinLength: 3, - Pattern: "[a-z]+", - MaxItems: 20, - MinItems: 2, - UniqueItems: true, - MaxProperties: 33, - MinProperties: 22, - Required: []string{"req"}, - ReadOnly: true, - }, - }, - }, - { - descr: "JSONSchema with required properties", - msgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("Message"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("aRequiredField"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - Options: requiredField, - }, - }, - }, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - JsonSchema: &openapi_options.JSONSchema{ - Title: "title", - Description: "desc", - Required: []string{"req"}, - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "title", - Description: "desc", - Required: []string{"req", "aRequiredField"}, - Properties: &openapiSchemaObjectProperties{ - { - Key: "aRequiredField", - Value: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - Description: "field description", - Title: "field title", - Required: []string{"aRequiredField"}, - }, - }, - }, - }, - }, - }, - { - descr: "JSONSchema with required properties via field_behavior", - msgDescs: []*descriptorpb.DescriptorProto{ - { - Name: proto.String("Message"), - Field: []*descriptorpb.FieldDescriptorProto{ - { - Name: proto.String("aRequiredField"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(1), - Options: requiredFieldOptions, - }, - { - Name: proto.String("aOutputOnlyField"), - Type: descriptorpb.FieldDescriptorProto_TYPE_STRING.Enum(), - Number: proto.Int32(2), - Options: fieldBehaviorOutputOnlyOptions, - }, - }, - }, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - JsonSchema: &openapi_options.JSONSchema{ - Title: "title", - Description: "desc", - Required: []string{"req"}, - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "title", - Description: "desc", - Required: []string{"req", "aRequiredField"}, - Properties: &openapiSchemaObjectProperties{ - { - Key: "aRequiredField", - Value: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - Required: []string{"aRequiredField"}, - }, - }, - { - Key: "aOutputOnlyField", - Value: openapiSchemaObject{ - schemaCore: schemaCore{ - Type: "string", - }, - ReadOnly: true, - }, - }, - }, - }, - }, - }, - } - - for _, test := range tests { - t.Run(test.descr, func(t *testing.T) { - - msgs := []*descriptor.Message{} - for _, msgdesc := range test.msgDescs { - msgdesc.Options = &descriptorpb.MessageOptions{} - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - - reg := descriptor.NewRegistry() - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.msgDescs, - EnumType: []*descriptorpb.EnumDescriptorProto{}, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - msgMap := map[string]*descriptor.Message{} - for _, d := range test.msgDescs { - name := d.GetName() - msg, err := reg.LookupMsg("example", name) - if err != nil { - t.Fatalf("lookup message %v: %v", name, err) - } - msgMap[msg.FQMN()] = msg - - if schema, ok := test.schema[name]; ok { - proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, &schema) - } - } - - if test.openAPIOptions != nil { - if err := reg.RegisterOpenAPIOptions(test.openAPIOptions); err != nil { - t.Fatalf("failed to register OpenAPI options: %s", err) - } - } - - refs := make(refMap) - actual := make(openapiDefinitionsObject) - renderMessagesAsDefinition(msgMap, actual, reg, refs) - - if !reflect.DeepEqual(actual, test.defs) { - t.Errorf("Expected renderMessagesAsDefinition() to add defs %+v, not %+v", test.defs, actual) - } - }) - } -} - -func TestUpdateOpenAPIDataFromComments(t *testing.T) { - - tests := []struct { - descr string - openapiSwaggerObject interface{} - comments string - expectedError error - expectedOpenAPIObject interface{} - useGoTemplate bool - }{ - { - descr: "empty comments", - openapiSwaggerObject: nil, - expectedOpenAPIObject: nil, - comments: "", - expectedError: nil, - }, - { - descr: "set field to read only", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - ReadOnly: true, - Description: "... Output only. ...", - }, - comments: "... Output only. ...", - expectedError: nil, - }, - { - descr: "set title", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Title: "Comment with no trailing dot", - }, - comments: "Comment with no trailing dot", - expectedError: nil, - }, - { - descr: "set description", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Description: "Comment with trailing dot.", - }, - comments: "Comment with trailing dot.", - expectedError: nil, - }, - { - descr: "use info object", - openapiSwaggerObject: &openapiSwaggerObject{ - Info: openapiInfoObject{}, - }, - expectedOpenAPIObject: &openapiSwaggerObject{ - Info: openapiInfoObject{ - Description: "Comment with trailing dot.", - }, - }, - comments: "Comment with trailing dot.", - expectedError: nil, - }, - { - descr: "multi line comment with title", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Title: "First line", - Description: "Second line", - }, - comments: "First line\n\nSecond line", - expectedError: nil, - }, - { - descr: "multi line comment no title", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Description: "First line.\n\nSecond line", - }, - comments: "First line.\n\nSecond line", - expectedError: nil, - }, - { - descr: "multi line comment with summary with dot", - openapiSwaggerObject: &openapiOperationObject{}, - expectedOpenAPIObject: &openapiOperationObject{ - Summary: "First line.", - Description: "Second line", - }, - comments: "First line.\n\nSecond line", - expectedError: nil, - }, - { - descr: "multi line comment with summary no dot", - openapiSwaggerObject: &openapiOperationObject{}, - expectedOpenAPIObject: &openapiOperationObject{ - Summary: "First line", - Description: "Second line", - }, - comments: "First line\n\nSecond line", - expectedError: nil, - }, - { - descr: "multi line comment with summary no dot", - openapiSwaggerObject: &schemaCore{}, - expectedOpenAPIObject: &schemaCore{}, - comments: "Any comment", - expectedError: errors.New("no description nor summary property"), - }, - { - descr: "without use_go_template", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Title: "First line", - Description: "{{import \"documentation.md\"}}", - }, - comments: "First line\n\n{{import \"documentation.md\"}}", - expectedError: nil, - }, - { - descr: "error with use_go_template", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Title: "First line", - Description: "open noneexistingfile.txt: no such file or directory", - }, - comments: "First line\n\n{{import \"noneexistingfile.txt\"}}", - expectedError: nil, - useGoTemplate: true, - }, - { - descr: "template with use_go_template", - openapiSwaggerObject: &openapiSchemaObject{}, - expectedOpenAPIObject: &openapiSchemaObject{ - Title: "Template", - Description: `Description "which means nothing"`, - }, - comments: "Template\n\nDescription {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - expectedError: nil, - useGoTemplate: true, - }, - } - - for _, test := range tests { - t.Run(test.descr, func(t *testing.T) { - reg := descriptor.NewRegistry() - if test.useGoTemplate { - reg.SetUseGoTemplate(true) - } - err := updateOpenAPIDataFromComments(reg, test.openapiSwaggerObject, nil, test.comments, false) - if test.expectedError == nil { - if err != nil { - t.Errorf("unexpected error '%v'", err) - } - if !reflect.DeepEqual(test.openapiSwaggerObject, test.expectedOpenAPIObject) { - t.Errorf("openapiSwaggerObject was not updated correctly, expected '%+v', got '%+v'", test.expectedOpenAPIObject, test.openapiSwaggerObject) - } - } else { - if err == nil { - t.Error("expected update error not returned") - } - if !reflect.DeepEqual(test.openapiSwaggerObject, test.expectedOpenAPIObject) { - t.Errorf("openapiSwaggerObject was not updated correctly, expected '%+v', got '%+v'", test.expectedOpenAPIObject, test.openapiSwaggerObject) - } - if err.Error() != test.expectedError.Error() { - t.Errorf("expected error malformed, expected %q, got %q", test.expectedError.Error(), err.Error()) - } - } - }) - } -} - -func TestMessageOptionsWithGoTemplate(t *testing.T) { - tests := []struct { - descr string - msgDescs []*descriptorpb.DescriptorProto - schema map[string]openapi_options.Schema // per-message schema to add - defs openapiDefinitionsObject - openAPIOptions *openapiconfig.OpenAPIOptions - useGoTemplate bool - }{ - { - descr: "external docs option", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - JsonSchema: &openapi_options.JSONSchema{ - Title: "{{.Name}}", - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - ExternalDocs: &openapi_options.ExternalDocumentation{ - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "Message", - Description: `Description "which means nothing"`, - ExternalDocs: &openapiExternalDocumentationObject{ - Description: `Description "which means nothing"`, - }, - }, - }, - useGoTemplate: true, - }, - { - descr: "external docs option", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - schema: map[string]openapi_options.Schema{ - "Message": { - JsonSchema: &openapi_options.JSONSchema{ - Title: "{{.Name}}", - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - ExternalDocs: &openapi_options.ExternalDocumentation{ - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "{{.Name}}", - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - ExternalDocs: &openapiExternalDocumentationObject{ - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - }, - }, - useGoTemplate: false, - }, - { - descr: "registered OpenAPIOption", - msgDescs: []*descriptorpb.DescriptorProto{ - {Name: proto.String("Message")}, - }, - openAPIOptions: &openapiconfig.OpenAPIOptions{ - Message: []*openapiconfig.OpenAPIMessageOption{ - { - Message: "example.Message", - Option: &openapi_options.Schema{ - JsonSchema: &openapi_options.JSONSchema{ - Title: "{{.Name}}", - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - ExternalDocs: &openapi_options.ExternalDocumentation{ - Description: "Description {{with \"which means nothing\"}}{{printf \"%q\" .}}{{end}}", - }, - }, - }, - }, - }, - defs: map[string]openapiSchemaObject{ - "Message": { - schemaCore: schemaCore{ - Type: "object", - }, - Title: "Message", - Description: `Description "which means nothing"`, - ExternalDocs: &openapiExternalDocumentationObject{ - Description: `Description "which means nothing"`, - }, - }, - }, - useGoTemplate: true, - }, - } - - for _, test := range tests { - t.Run(test.descr, func(t *testing.T) { - - msgs := []*descriptor.Message{} - for _, msgdesc := range test.msgDescs { - msgdesc.Options = &descriptorpb.MessageOptions{} - msgs = append(msgs, &descriptor.Message{DescriptorProto: msgdesc}) - } - - reg := descriptor.NewRegistry() - reg.SetUseGoTemplate(test.useGoTemplate) - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Dependency: []string{}, - MessageType: test.msgDescs, - EnumType: []*descriptorpb.EnumDescriptorProto{}, - Service: []*descriptorpb.ServiceDescriptorProto{}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - Messages: msgs, - } - err := reg.Load(&pluginpb.CodeGeneratorRequest{ - ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}, - }) - if err != nil { - t.Fatalf("failed to load code generator request: %v", err) - } - - msgMap := map[string]*descriptor.Message{} - for _, d := range test.msgDescs { - name := d.GetName() - msg, err := reg.LookupMsg("example", name) - if err != nil { - t.Fatalf("lookup message %v: %v", name, err) - } - msgMap[msg.FQMN()] = msg - - if schema, ok := test.schema[name]; ok { - proto.SetExtension(d.Options, openapi_options.E_Openapiv2Schema, &schema) - } - } - - if test.openAPIOptions != nil { - if err := reg.RegisterOpenAPIOptions(test.openAPIOptions); err != nil { - t.Fatalf("failed to register OpenAPI options: %s", err) - } - } - - refs := make(refMap) - actual := make(openapiDefinitionsObject) - renderMessagesAsDefinition(msgMap, actual, reg, refs) - - if !reflect.DeepEqual(actual, test.defs) { - t.Errorf("Expected renderMessagesAsDefinition() to add defs %+v, not %+v", test.defs, actual) - } - }) - } -} - -func TestTemplateWithoutErrorDefinition(t *testing.T) { - msgdesc := &descriptorpb.DescriptorProto{ - Name: proto.String("ExampleMessage"), - Field: []*descriptorpb.FieldDescriptorProto{}, - } - meth := &descriptorpb.MethodDescriptorProto{ - Name: proto.String("Echo"), - InputType: proto.String("ExampleMessage"), - OutputType: proto.String("ExampleMessage"), - } - svc := &descriptorpb.ServiceDescriptorProto{ - Name: proto.String("ExampleService"), - Method: []*descriptorpb.MethodDescriptorProto{meth}, - } - - msg := &descriptor.Message{ - DescriptorProto: msgdesc, - } - - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - MessageType: []*descriptorpb.DescriptorProto{msgdesc}, - Service: []*descriptorpb.ServiceDescriptorProto{svc}, - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - GoPkg: descriptor.GoPackage{ - Path: "example.com/path/to/example/example.pb", - Name: "example_pb", - }, - Messages: []*descriptor.Message{msg}, - Services: []*descriptor.Service{ - { - ServiceDescriptorProto: svc, - Methods: []*descriptor.Method{ - { - MethodDescriptorProto: meth, - RequestType: msg, - ResponseType: msg, - Bindings: []*descriptor.Binding{ - { - HTTPMethod: "POST", - PathTmpl: httprule.Template{ - Version: 1, - OpCodes: []int{0, 0}, - Template: "/v1/echo", - }, - Body: &descriptor.Body{ - FieldPath: descriptor.FieldPath([]descriptor.FieldPathComponent{}), - }, - }, - }, - }, - }, - }, - }, - } - reg := descriptor.NewRegistry() - err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}}) - if err != nil { - t.Errorf("failed to reg.Load(): %v", err) - return - } - result, err := applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) - if err != nil { - t.Errorf("applyTemplate(%#v) failed with %v; want success", file, err) - return - } - - defRsp, ok := result.Paths["/v1/echo"].Post.Responses["default"] - if !ok { - return - } - - ref := defRsp.Schema.schemaCore.Ref - refName := strings.TrimPrefix(ref, "#/definitions/") - if refName == "" { - t.Fatal("created default Error response with empty reflink") - } - - if _, ok := result.Definitions[refName]; !ok { - t.Errorf("default Error response with reflink '%v', but its definition was not found", refName) - } -} - -func Test_getReservedJsonName(t *testing.T) { - type args struct { - fieldName string - messageNameToFieldsToJSONName map[string]map[string]string - fieldNameToType map[string]string - } - tests := []struct { - name string - args args - want string - }{ - { - "test case 1: single dot use case", - args{ - fieldName: "abc.a_1", - messageNameToFieldsToJSONName: map[string]map[string]string{ - "Msg": { - "a_1": "a1JSONNAME", - "b_1": "b1JSONNAME", - }, - }, - fieldNameToType: map[string]string{ - "abc": "pkg1.test.Msg", - "bcd": "pkg1.test.Msg", - }, - }, - "a1JSONNAME", - }, - { - "test case 2: single dot use case with no existing field", - args{ - fieldName: "abc.d_1", - messageNameToFieldsToJSONName: map[string]map[string]string{ - "Msg": { - "a_1": "a1JSONNAME", - "b_1": "b1JSONNAME", - }, - }, - fieldNameToType: map[string]string{ - "abc": "pkg1.test.Msg", - "bcd": "pkg1.test.Msg", - }, - }, - "", - }, - { - "test case 3: double dot use case", - args{ - fieldName: "pkg.abc.a_1", - messageNameToFieldsToJSONName: map[string]map[string]string{ - "Msg": { - "a_1": "a1JSONNAME", - "b_1": "b1JSONNAME", - }, - }, - fieldNameToType: map[string]string{ - "abc": "pkg1.test.Msg", - "bcd": "pkg1.test.Msg", - }, - }, - "a1JSONNAME", - }, - { - "test case 4: double dot use case with a not existed field", - args{ - fieldName: "pkg.abc.c_1", - messageNameToFieldsToJSONName: map[string]map[string]string{ - "Msg": { - "a_1": "a1JSONNAME", - "b_1": "b1JSONNAME", - }, - }, - fieldNameToType: map[string]string{ - "abc": "pkg1.test.Msg", - "bcd": "pkg1.test.Msg", - }, - }, - "", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := getReservedJSONName(tt.args.fieldName, tt.args.messageNameToFieldsToJSONName, tt.args.fieldNameToType); got != tt.want { - t.Errorf("getReservedJSONName() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestParseIncompleteSecurityRequirement(t *testing.T) { - swagger := openapi_options.Swagger{ - Security: []*openapi_options.SecurityRequirement{ - { - SecurityRequirement: map[string]*openapi_options.SecurityRequirement_SecurityRequirementValue{ - "key": nil, - }, - }, - }, - } - file := descriptor.File{ - FileDescriptorProto: &descriptorpb.FileDescriptorProto{ - SourceCodeInfo: &descriptorpb.SourceCodeInfo{}, - Name: proto.String("example.proto"), - Package: proto.String("example"), - Options: &descriptorpb.FileOptions{ - GoPackage: proto.String(".;example"), - }, - }, - } - proto.SetExtension(proto.Message(file.FileDescriptorProto.Options), openapi_options.E_Openapiv2Swagger, &swagger) - reg := descriptor.NewRegistry() - err := reg.Load(&pluginpb.CodeGeneratorRequest{ProtoFile: []*descriptorpb.FileDescriptorProto{file.FileDescriptorProto}}) - if err != nil { - t.Errorf("failed to reg.Load(): %v", err) - return - } - _, err = applyTemplate(param{File: crossLinkFixture(&file), reg: reg}) - if err == nil { - t.Errorf("applyTemplate(%#v) did not error as expected", file) - return - } -} diff --git a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go b/api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go deleted file mode 100644 index 505cfc68..00000000 --- a/api/third_party/protoc-gen-openapiv2/internal/genopenapi/types.go +++ /dev/null @@ -1,276 +0,0 @@ -package genopenapi - -import ( - "bytes" - "encoding/json" - "fmt" - - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" -) - -type param struct { - *descriptor.File - reg *descriptor.Registry -} - -// http://swagger.io/specification/#infoObject -type openapiInfoObject struct { - Title string `json:"title"` - Description string `json:"description,omitempty"` - TermsOfService string `json:"termsOfService,omitempty"` - Version string `json:"version"` - - Contact *openapiContactObject `json:"contact,omitempty"` - License *openapiLicenseObject `json:"license,omitempty"` - - extensions []extension -} - -// https://swagger.io/specification/#tagObject -type openapiTagObject struct { - Name string `json:"name"` - Description string `json:"description,omitempty"` - ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` -} - -// http://swagger.io/specification/#contactObject -type openapiContactObject struct { - Name string `json:"name,omitempty"` - URL string `json:"url,omitempty"` - Email string `json:"email,omitempty"` -} - -// http://swagger.io/specification/#licenseObject -type openapiLicenseObject struct { - Name string `json:"name,omitempty"` - URL string `json:"url,omitempty"` -} - -// http://swagger.io/specification/#externalDocumentationObject -type openapiExternalDocumentationObject struct { - Description string `json:"description,omitempty"` - URL string `json:"url,omitempty"` -} - -type extension struct { - key string - value json.RawMessage -} - -// http://swagger.io/specification/#swaggerObject -type openapiSwaggerObject struct { - Swagger string `json:"swagger"` - Info openapiInfoObject `json:"info"` - Tags []openapiTagObject `json:"tags,omitempty"` - Host string `json:"host,omitempty"` - BasePath string `json:"basePath,omitempty"` - Schemes []string `json:"schemes,omitempty"` - Consumes []string `json:"consumes"` - Produces []string `json:"produces"` - Paths openapiPathsObject `json:"paths"` - Definitions openapiDefinitionsObject `json:"definitions"` - SecurityDefinitions openapiSecurityDefinitionsObject `json:"securityDefinitions,omitempty"` - Security []openapiSecurityRequirementObject `json:"security,omitempty"` - ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` - - extensions []extension -} - -// http://swagger.io/specification/#securityDefinitionsObject -type openapiSecurityDefinitionsObject map[string]openapiSecuritySchemeObject - -// http://swagger.io/specification/#securitySchemeObject -type openapiSecuritySchemeObject struct { - Type string `json:"type"` - Description string `json:"description,omitempty"` - Name string `json:"name,omitempty"` - In string `json:"in,omitempty"` - Flow string `json:"flow,omitempty"` - AuthorizationURL string `json:"authorizationUrl,omitempty"` - TokenURL string `json:"tokenUrl,omitempty"` - Scopes openapiScopesObject `json:"scopes,omitempty"` - - extensions []extension -} - -// http://swagger.io/specification/#scopesObject -type openapiScopesObject map[string]string - -// http://swagger.io/specification/#securityRequirementObject -type openapiSecurityRequirementObject map[string][]string - -// http://swagger.io/specification/#pathsObject -type openapiPathsObject map[string]openapiPathItemObject - -// http://swagger.io/specification/#pathItemObject -type openapiPathItemObject struct { - Get *openapiOperationObject `json:"get,omitempty"` - Delete *openapiOperationObject `json:"delete,omitempty"` - Post *openapiOperationObject `json:"post,omitempty"` - Put *openapiOperationObject `json:"put,omitempty"` - Patch *openapiOperationObject `json:"patch,omitempty"` -} - -// http://swagger.io/specification/#operationObject -type openapiOperationObject struct { - Summary string `json:"summary,omitempty"` - Description string `json:"description,omitempty"` - OperationID string `json:"operationId"` - Responses openapiResponsesObject `json:"responses"` - Parameters openapiParametersObject `json:"parameters,omitempty"` - Tags []string `json:"tags,omitempty"` - Deprecated bool `json:"deprecated,omitempty"` - Produces []string `json:"produces,omitempty"` - - Security *[]openapiSecurityRequirementObject `json:"security,omitempty"` - ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` - - extensions []extension -} - -type openapiParametersObject []openapiParameterObject - -// http://swagger.io/specification/#parameterObject -type openapiParameterObject struct { - Name string `json:"name"` - Description string `json:"description,omitempty"` - In string `json:"in,omitempty"` - Required bool `json:"required"` - Type string `json:"type,omitempty"` - Format string `json:"format,omitempty"` - Items *openapiItemsObject `json:"items,omitempty"` - Enum []string `json:"enum,omitempty"` - CollectionFormat string `json:"collectionFormat,omitempty"` - Default string `json:"default,omitempty"` - MinItems *int `json:"minItems,omitempty"` - - // Or you can explicitly refer to another type. If this is defined all - // other fields should be empty - Schema *openapiSchemaObject `json:"schema,omitempty"` -} - -// core part of schema, which is common to itemsObject and schemaObject. -// http://swagger.io/specification/#itemsObject -type schemaCore struct { - Type string `json:"type,omitempty"` - Format string `json:"format,omitempty"` - Ref string `json:"$ref,omitempty"` - Example json.RawMessage `json:"example,omitempty"` - - Items *openapiItemsObject `json:"items,omitempty"` - - // If the item is an enumeration include a list of all the *NAMES* of the - // enum values. I'm not sure how well this will work but assuming all enums - // start from 0 index it will be great. I don't think that is a good assumption. - Enum []string `json:"enum,omitempty"` - Default string `json:"default,omitempty"` -} - -func (s *schemaCore) setRefFromFQN(ref string, reg *descriptor.Registry) error { - name, ok := fullyQualifiedNameToOpenAPIName(ref, reg) - if !ok { - return fmt.Errorf("setRefFromFQN: can't resolve OpenAPI name from '%v'", ref) - } - s.Ref = fmt.Sprintf("#/definitions/%s", name) - return nil -} - -type openapiItemsObject schemaCore - -// http://swagger.io/specification/#responsesObject -type openapiResponsesObject map[string]openapiResponseObject - -// http://swagger.io/specification/#responseObject -type openapiResponseObject struct { - Description string `json:"description"` - Schema openapiSchemaObject `json:"schema"` - Examples map[string]interface{} `json:"examples,omitempty"` - Headers openapiHeadersObject `json:"headers,omitempty"` - - extensions []extension -} - -type openapiHeadersObject map[string]openapiHeaderObject - -// http://swagger.io/specification/#headerObject -type openapiHeaderObject struct { - Description string `json:"description,omitempty"` - Type string `json:"type,omitempty"` - Format string `json:"format,omitempty"` - Default json.RawMessage `json:"default,omitempty"` - Pattern string `json:"pattern,omitempty"` -} - -type keyVal struct { - Key string - Value interface{} -} - -type openapiSchemaObjectProperties []keyVal - -func (op openapiSchemaObjectProperties) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - buf.WriteString("{") - for i, kv := range op { - if i != 0 { - buf.WriteString(",") - } - key, err := json.Marshal(kv.Key) - if err != nil { - return nil, err - } - buf.Write(key) - buf.WriteString(":") - val, err := json.Marshal(kv.Value) - if err != nil { - return nil, err - } - buf.Write(val) - } - - buf.WriteString("}") - return buf.Bytes(), nil -} - -// http://swagger.io/specification/#schemaObject -type openapiSchemaObject struct { - schemaCore - // Properties can be recursively defined - Properties *openapiSchemaObjectProperties `json:"properties,omitempty"` - AdditionalProperties *openapiSchemaObject `json:"additionalProperties,omitempty"` - - Description string `json:"description,omitempty"` - Title string `json:"title,omitempty"` - - ExternalDocs *openapiExternalDocumentationObject `json:"externalDocs,omitempty"` - - ReadOnly bool `json:"readOnly,omitempty"` - MultipleOf float64 `json:"multipleOf,omitempty"` - Maximum float64 `json:"maximum,omitempty"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` - Minimum float64 `json:"minimum,omitempty"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` - MaxLength uint64 `json:"maxLength,omitempty"` - MinLength uint64 `json:"minLength,omitempty"` - Pattern string `json:"pattern,omitempty"` - MaxItems uint64 `json:"maxItems,omitempty"` - MinItems uint64 `json:"minItems,omitempty"` - UniqueItems bool `json:"uniqueItems,omitempty"` - MaxProperties uint64 `json:"maxProperties,omitempty"` - MinProperties uint64 `json:"minProperties,omitempty"` - Required []string `json:"required,omitempty"` -} - -// http://swagger.io/specification/#definitionsObject -type openapiDefinitionsObject map[string]openapiSchemaObject - -// Internal type mapping from FQMN to descriptor.Message. Used as a set by the -// findServiceMessages function. -type messageMap map[string]*descriptor.Message - -// Internal type mapping from FQEN to descriptor.Enum. Used as a set by the -// findServiceMessages function. -type enumMap map[string]*descriptor.Enum - -// Internal type to store used references. -type refMap map[string]struct{} diff --git a/api/third_party/protoc-gen-openapiv2/main.go b/api/third_party/protoc-gen-openapiv2/main.go deleted file mode 100644 index ea3d82a7..00000000 --- a/api/third_party/protoc-gen-openapiv2/main.go +++ /dev/null @@ -1,220 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os" - "strings" - - "github.com/golang/glog" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/codegenerator" - "github.com/grpc-ecosystem/grpc-gateway/v2/internal/descriptor" - "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/pluginpb" -) - -var ( - importPrefix = flag.String("import_prefix", "", "prefix to be added to go package paths for imported proto files") - file = flag.String("file", "-", "where to load data from") - allowDeleteBody = flag.Bool("allow_delete_body", false, "unless set, HTTP DELETE methods may not have a body") - grpcAPIConfiguration = flag.String("grpc_api_configuration", "", "path to file which describes the gRPC API Configuration in YAML format") - allowMerge = flag.Bool("allow_merge", false, "if set, generation one OpenAPI file out of multiple protos") - mergeFileName = flag.String("merge_file_name", "apidocs", "target OpenAPI file name prefix after merge") - useJSONNamesForFields = flag.Bool("json_names_for_fields", true, "if disabled, the original proto name will be used for generating OpenAPI definitions") - repeatedPathParamSeparator = flag.String("repeated_path_param_separator", "csv", "configures how repeated fields should be split. Allowed values are `csv`, `pipes`, `ssv` and `tsv`") - versionFlag = flag.Bool("version", false, "print the current version") - allowRepeatedFieldsInBody = flag.Bool("allow_repeated_fields_in_body", false, "allows to use repeated field in `body` and `response_body` field of `google.api.http` annotation option") - includePackageInTags = flag.Bool("include_package_in_tags", false, "if unset, the gRPC service name is added to the `Tags` field of each operation. If set and the `package` directive is shown in the proto file, the package name will be prepended to the service name") - useFQNForOpenAPIName = flag.Bool("fqn_for_openapi_name", false, "if set, the object's OpenAPI names will use the fully qualified names from the proto definition (ie my.package.MyMessage.MyInnerMessage") - useGoTemplate = flag.Bool("use_go_templates", false, "if set, you can use Go templates in protofile comments") - disableDefaultErrors = flag.Bool("disable_default_errors", false, "if set, disables generation of default errors. This is useful if you have defined custom error handling") - enumsAsInts = flag.Bool("enums_as_ints", false, "whether to render enum values as integers, as opposed to string values") - simpleOperationIDs = flag.Bool("simple_operation_ids", false, "whether to remove the service prefix in the operationID generation. Can introduce duplicate operationIDs, use with caution.") - openAPIConfiguration = flag.String("openapi_configuration", "", "path to file which describes the OpenAPI Configuration in YAML format") - generateUnboundMethods = flag.Bool("generate_unbound_methods", false, "generate swagger metadata even for RPC methods that have no HttpRule annotation") -) - -// Variables set by goreleaser at build time -var ( - version = "dev" - commit = "unknown" - date = "unknown" -) - -func main() { - flag.Parse() - defer glog.Flush() - - if *versionFlag { - fmt.Printf("Version %v, commit %v, built at %v\n", version, commit, date) - os.Exit(0) - } - - reg := descriptor.NewRegistry() - - glog.V(1).Info("Processing code generator request") - f := os.Stdin - if *file != "-" { - var err error - f, err = os.Open(*file) - if err != nil { - glog.Fatal(err) - } - } - glog.V(1).Info("Parsing code generator request") - req, err := codegenerator.ParseRequest(f) - if err != nil { - glog.Fatal(err) - } - glog.V(1).Info("Parsed code generator request") - pkgMap := make(map[string]string) - if req.Parameter != nil { - err := parseReqParam(req.GetParameter(), flag.CommandLine, pkgMap) - if err != nil { - glog.Fatalf("Error parsing flags: %v", err) - } - } - - reg.SetPrefix(*importPrefix) - reg.SetAllowDeleteBody(*allowDeleteBody) - reg.SetAllowMerge(*allowMerge) - reg.SetMergeFileName(*mergeFileName) - reg.SetUseJSONNamesForFields(*useJSONNamesForFields) - reg.SetAllowRepeatedFieldsInBody(*allowRepeatedFieldsInBody) - reg.SetIncludePackageInTags(*includePackageInTags) - reg.SetUseFQNForOpenAPIName(*useFQNForOpenAPIName) - reg.SetUseGoTemplate(*useGoTemplate) - reg.SetEnumsAsInts(*enumsAsInts) - reg.SetDisableDefaultErrors(*disableDefaultErrors) - reg.SetSimpleOperationIDs(*simpleOperationIDs) - reg.SetGenerateUnboundMethods(*generateUnboundMethods) - if err := reg.SetRepeatedPathParamSeparator(*repeatedPathParamSeparator); err != nil { - emitError(err) - return - } - for k, v := range pkgMap { - reg.AddPkgMap(k, v) - } - - if *grpcAPIConfiguration != "" { - if err := reg.LoadGrpcAPIServiceFromYAML(*grpcAPIConfiguration); err != nil { - emitError(err) - return - } - } - - g := genopenapi.New(reg) - - if err := genopenapi.AddErrorDefs(reg); err != nil { - emitError(err) - return - } - - if err := reg.Load(req); err != nil { - emitError(err) - return - } - - if *openAPIConfiguration != "" { - if err := reg.LoadOpenAPIConfigFromYAML(*openAPIConfiguration); err != nil { - emitError(err) - return - } - } - - var targets []*descriptor.File - for _, target := range req.FileToGenerate { - f, err := reg.LookupFile(target) - if err != nil { - glog.Fatal(err) - } - targets = append(targets, f) - } - - out, err := g.Generate(targets) - glog.V(1).Info("Processed code generator request") - if err != nil { - emitError(err) - return - } - emitFiles(out) -} - -func emitFiles(out []*descriptor.ResponseFile) { - files := make([]*pluginpb.CodeGeneratorResponse_File, len(out)) - for idx, item := range out { - files[idx] = item.CodeGeneratorResponse_File - } - emitResp(&pluginpb.CodeGeneratorResponse{File: files}) -} - -func emitError(err error) { - emitResp(&pluginpb.CodeGeneratorResponse{Error: proto.String(err.Error())}) -} - -func emitResp(resp *pluginpb.CodeGeneratorResponse) { - buf, err := proto.Marshal(resp) - if err != nil { - glog.Fatal(err) - } - if _, err := os.Stdout.Write(buf); err != nil { - glog.Fatal(err) - } -} - -// parseReqParam parses a CodeGeneratorRequest parameter and adds the -// extracted values to the given FlagSet and pkgMap. Returns a non-nil -// error if setting a flag failed. -func parseReqParam(param string, f *flag.FlagSet, pkgMap map[string]string) error { - if param == "" { - return nil - } - for _, p := range strings.Split(param, ",") { - spec := strings.SplitN(p, "=", 2) - if len(spec) == 1 { - if spec[0] == "allow_delete_body" { - err := f.Set(spec[0], "true") - if err != nil { - return fmt.Errorf("cannot set flag %s: %v", p, err) - } - continue - } - if spec[0] == "allow_merge" { - err := f.Set(spec[0], "true") - if err != nil { - return fmt.Errorf("cannot set flag %s: %v", p, err) - } - continue - } - if spec[0] == "allow_repeated_fields_in_body" { - err := f.Set(spec[0], "true") - if err != nil { - return fmt.Errorf("cannot set flag %s: %v", p, err) - } - continue - } - if spec[0] == "include_package_in_tags" { - err := f.Set(spec[0], "true") - if err != nil { - return fmt.Errorf("cannot set flag %s: %v", p, err) - } - continue - } - err := f.Set(spec[0], "") - if err != nil { - return fmt.Errorf("cannot set flag %s: %v", p, err) - } - continue - } - name, value := spec[0], spec[1] - if strings.HasPrefix(name, "M") { - pkgMap[name[1:]] = value - continue - } - if err := f.Set(name, value); err != nil { - return fmt.Errorf("cannot set flag %s: %v", p, err) - } - } - return nil -} diff --git a/api/third_party/protoc-gen-openapiv2/main_test.go b/api/third_party/protoc-gen-openapiv2/main_test.go deleted file mode 100644 index 514840a2..00000000 --- a/api/third_party/protoc-gen-openapiv2/main_test.go +++ /dev/null @@ -1,186 +0,0 @@ -package main - -import ( - "errors" - "flag" - "reflect" - "testing" -) - -func TestParseReqParam(t *testing.T) { - - testcases := []struct { - name string - expected map[string]string - request string - expectedError error - allowDeleteBodyV bool - allowMergeV bool - allowRepeatedFieldsInBodyV bool - includePackageInTagsV bool - fileV string - importPathV string - mergeFileNameV string - useFQNForOpenAPINameV bool - }{ - { - // this one must be first - with no leading clearFlags call it - // verifies our expectation of default values as we reset by - // clearFlags - name: "Test 0", - expected: map[string]string{}, - request: "", - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "-", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 1", - expected: map[string]string{"google/api/annotations.proto": "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"}, - request: "allow_delete_body,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api", - allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true, - fileV: "./foo.pb", importPathV: "/bar/baz", mergeFileNameV: "apidocs", - }, - { - name: "Test 2", - expected: map[string]string{"google/api/annotations.proto": "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"}, - request: "allow_delete_body=true,allow_merge=true,allow_repeated_fields_in_body=true,include_package_in_tags=true,merge_file_name=test_name,file=./foo.pb,import_prefix=/bar/baz,Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api", - allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true, - fileV: "./foo.pb", importPathV: "/bar/baz", mergeFileNameV: "test_name", - }, - { - name: "Test 3", - expected: map[string]string{"a/b/c.proto": "github.com/x/y/z", "f/g/h.proto": "github.com/1/2/3/"}, - request: "allow_delete_body=false,allow_merge=false,Ma/b/c.proto=github.com/x/y/z,Mf/g/h.proto=github.com/1/2/3/", - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 4", - expected: map[string]string{}, - request: "", - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 5", - expected: map[string]string{}, - request: "unknown_param=17", - expectedError: errors.New("cannot set flag unknown_param=17: no such flag -unknown_param"), - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 6", - expected: map[string]string{}, - request: "Mfoo", - expectedError: errors.New("cannot set flag Mfoo: no such flag -Mfoo"), - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 7", - expected: map[string]string{}, - request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body,include_package_in_tags,merge_file_name", - allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: true, includePackageInTagsV: true, - fileV: "", importPathV: "", mergeFileNameV: "", - }, - { - name: "Test 8", - expected: map[string]string{}, - request: "allow_delete_body,file,import_prefix,allow_merge,allow_repeated_fields_in_body=3,merge_file_name", - expectedError: errors.New(`cannot set flag allow_repeated_fields_in_body=3: parse error`), - allowDeleteBodyV: true, allowMergeV: true, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 9", - expected: map[string]string{}, - request: "include_package_in_tags=3", - expectedError: errors.New(`cannot set flag include_package_in_tags=3: parse error`), - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 10", - expected: map[string]string{}, - request: "fqn_for_openapi_name=3", - expectedError: errors.New(`cannot set flag fqn_for_openapi_name=3: parse error`), - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForOpenAPINameV: false, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - { - name: "Test 11", - expected: map[string]string{}, - request: "fqn_for_openapi_name=true", - allowDeleteBodyV: false, allowMergeV: false, allowRepeatedFieldsInBodyV: false, includePackageInTagsV: false, useFQNForOpenAPINameV: true, - fileV: "stdin", importPathV: "", mergeFileNameV: "apidocs", - }, - } - - for i, tc := range testcases { - t.Run(tc.name, func(tt *testing.T) { - f := flag.CommandLine - pkgMap := make(map[string]string) - err := parseReqParam(tc.request, f, pkgMap) - if tc.expectedError == nil { - if err != nil { - tt.Errorf("unexpected parse error '%v'", err) - } - if !reflect.DeepEqual(pkgMap, tc.expected) { - tt.Errorf("pkgMap parse error, expected '%v', got '%v'", tc.expected, pkgMap) - } - } else { - if err == nil { - tt.Error("expected parse error not returned") - } - if !reflect.DeepEqual(pkgMap, tc.expected) { - tt.Errorf("pkgMap parse error, expected '%v', got '%v'", tc.expected, pkgMap) - } - if err.Error() != tc.expectedError.Error() { - tt.Errorf("expected error malformed, expected %q, got %q", tc.expectedError.Error(), err.Error()) - } - } - checkFlags(tc.allowDeleteBodyV, tc.allowMergeV, tc.allowRepeatedFieldsInBodyV, tc.includePackageInTagsV, tc.useFQNForOpenAPINameV, tc.fileV, tc.importPathV, tc.mergeFileNameV, tt, i) - - clearFlags() - }) - } - -} - -func checkFlags(allowDeleteV, allowMergeV, allowRepeatedFieldsInBodyV, includePackageInTagsV bool, useFQNForOpenAPINameV bool, fileV, importPathV, mergeFileNameV string, t *testing.T, tid int) { - if *importPrefix != importPathV { - t.Errorf("Test %v: import_prefix misparsed, expected '%v', got '%v'", tid, importPathV, *importPrefix) - } - if *file != fileV { - t.Errorf("Test %v: file misparsed, expected '%v', got '%v'", tid, fileV, *file) - } - if *allowDeleteBody != allowDeleteV { - t.Errorf("Test %v: allow_delete_body misparsed, expected '%v', got '%v'", tid, allowDeleteV, *allowDeleteBody) - } - if *allowMerge != allowMergeV { - t.Errorf("Test %v: allow_merge misparsed, expected '%v', got '%v'", tid, allowMergeV, *allowMerge) - } - if *mergeFileName != mergeFileNameV { - t.Errorf("Test %v: merge_file_name misparsed, expected '%v', got '%v'", tid, mergeFileNameV, *mergeFileName) - } - if *allowRepeatedFieldsInBody != allowRepeatedFieldsInBodyV { - t.Errorf("Test %v: allow_repeated_fields_in_body misparsed, expected '%v', got '%v'", tid, allowRepeatedFieldsInBodyV, *allowRepeatedFieldsInBody) - } - if *includePackageInTags != includePackageInTagsV { - t.Errorf("Test %v: include_package_in_tags misparsed, expected '%v', got '%v'", tid, includePackageInTagsV, *includePackageInTags) - } - if *useFQNForOpenAPIName != useFQNForOpenAPINameV { - t.Errorf("Test %v: fqn_for_openapi_name misparsed, expected '%v', got '%v'", tid, useFQNForOpenAPINameV, *useFQNForOpenAPIName) - } -} - -func clearFlags() { - *importPrefix = "" - *file = "stdin" - *allowDeleteBody = false - *allowMerge = false - *allowRepeatedFieldsInBody = false - *includePackageInTags = false - *mergeFileName = "apidocs" -} diff --git a/api/third_party/protoc-gen-openapiv2/options/BUILD.bazel b/api/third_party/protoc-gen-openapiv2/options/BUILD.bazel deleted file mode 100644 index 36369994..00000000 --- a/api/third_party/protoc-gen-openapiv2/options/BUILD.bazel +++ /dev/null @@ -1,38 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("@io_bazel_rules_go//go:def.bzl", "go_library") -load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") - -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "options_proto_files", - srcs = [ - "annotations.proto", - "openapiv2.proto", - ], -) - -go_library( - name = "go_default_library", - embed = [":options_go_proto"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", -) - -proto_library( - name = "options_proto", - srcs = [ - "annotations.proto", - "openapiv2.proto", - ], - deps = [ - "@com_google_protobuf//:descriptor_proto", - "@com_google_protobuf//:struct_proto", - ], -) - -go_proto_library( - name = "options_go_proto", - compilers = ["//:go_apiv2"], - importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options", - proto = ":options_proto", -) diff --git a/api/third_party/protoc-gen-openapiv2/options/annotations.pb.go b/api/third_party/protoc-gen-openapiv2/options/annotations.pb.go deleted file mode 100644 index dbe53516..00000000 --- a/api/third_party/protoc-gen-openapiv2/options/annotations.pb.go +++ /dev/null @@ -1,241 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.0 -// source: protoc-gen-openapiv2/options/annotations.proto - -package options - -import ( - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*Swagger)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", - Tag: "bytes,1042,opt,name=openapiv2_swagger", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.MethodOptions)(nil), - ExtensionType: (*Operation)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", - Tag: "bytes,1042,opt,name=openapiv2_operation", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*Schema)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", - Tag: "bytes,1042,opt,name=openapiv2_schema", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.ServiceOptions)(nil), - ExtensionType: (*Tag)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", - Tag: "bytes,1042,opt,name=openapiv2_tag", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, - { - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*JSONSchema)(nil), - Field: 1042, - Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", - Tag: "bytes,1042,opt,name=openapiv2_field", - Filename: "protoc-gen-openapiv2/options/annotations.proto", - }, -} - -// Extension fields to descriptor.FileOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; - E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] -) - -// Extension fields to descriptor.MethodOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; - E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] -) - -// Extension fields to descriptor.MessageOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; - E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] -) - -// Extension fields to descriptor.ServiceOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; - E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] -) - -// Extension fields to descriptor.FieldOptions. -var ( - // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - // - // All IDs are the same, as assigned. It is okay that they are the same, as they extend - // different descriptor messages. - // - // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; - E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] -) - -var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor - -var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x2c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, - 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, - 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []interface{}{ - (*descriptor.FileOptions)(nil), // 0: google.protobuf.FileOptions - (*descriptor.MethodOptions)(nil), // 1: google.protobuf.MethodOptions - (*descriptor.MessageOptions)(nil), // 2: google.protobuf.MessageOptions - (*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions - (*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions - (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger - (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation - (*Schema)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Schema - (*Tag)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Tag - (*JSONSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema -} -var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ - 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions - 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions - 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions - 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions - 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions - 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger - 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation - 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema - 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag - 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 5, // [5:10] is the sub-list for extension type_name - 0, // [0:5] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } -func file_protoc_gen_openapiv2_options_annotations_proto_init() { - if File_protoc_gen_openapiv2_options_annotations_proto != nil { - return - } - file_protoc_gen_openapiv2_options_openapiv2_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 5, - NumServices: 0, - }, - GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, - DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, - ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, - }.Build() - File_protoc_gen_openapiv2_options_annotations_proto = out.File - file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil - file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil - file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil -} diff --git a/api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go b/api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go deleted file mode 100644 index e3ef175d..00000000 --- a/api/third_party/protoc-gen-openapiv2/options/openapiv2.pb.go +++ /dev/null @@ -1,2790 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.0 -// source: protoc-gen-openapiv2/options/openapiv2.proto - -package options - -import ( - proto "github.com/golang/protobuf/proto" - _struct "github.com/golang/protobuf/ptypes/struct" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -// Scheme describes the schemes supported by the OpenAPI Swagger -// and Operation objects. -type Scheme int32 - -const ( - Scheme_UNKNOWN Scheme = 0 - Scheme_HTTP Scheme = 1 - Scheme_HTTPS Scheme = 2 - Scheme_WS Scheme = 3 - Scheme_WSS Scheme = 4 -) - -// Enum value maps for Scheme. -var ( - Scheme_name = map[int32]string{ - 0: "UNKNOWN", - 1: "HTTP", - 2: "HTTPS", - 3: "WS", - 4: "WSS", - } - Scheme_value = map[string]int32{ - "UNKNOWN": 0, - "HTTP": 1, - "HTTPS": 2, - "WS": 3, - "WSS": 4, - } -) - -func (x Scheme) Enum() *Scheme { - p := new(Scheme) - *p = x - return p -} - -func (x Scheme) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Scheme) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() -} - -func (Scheme) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] -} - -func (x Scheme) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Scheme.Descriptor instead. -func (Scheme) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} -} - -type JSONSchema_JSONSchemaSimpleTypes int32 - -const ( - JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 - JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 - JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 - JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 - JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 - JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 - JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 - JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 -) - -// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. -var ( - JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ - 0: "UNKNOWN", - 1: "ARRAY", - 2: "BOOLEAN", - 3: "INTEGER", - 4: "NULL", - 5: "NUMBER", - 6: "OBJECT", - 7: "STRING", - } - JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ - "UNKNOWN": 0, - "ARRAY": 1, - "BOOLEAN": 2, - "INTEGER": 3, - "NULL": 4, - "NUMBER": 5, - "OBJECT": 6, - "STRING": 7, - } -) - -func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { - p := new(JSONSchema_JSONSchemaSimpleTypes) - *p = x - return p -} - -func (x JSONSchema_JSONSchemaSimpleTypes) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() -} - -func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] -} - -func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead. -func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9, 0} -} - -// The type of the security scheme. Valid values are "basic", -// "apiKey" or "oauth2". -type SecurityScheme_Type int32 - -const ( - SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 - SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 - SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 - SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 -) - -// Enum value maps for SecurityScheme_Type. -var ( - SecurityScheme_Type_name = map[int32]string{ - 0: "TYPE_INVALID", - 1: "TYPE_BASIC", - 2: "TYPE_API_KEY", - 3: "TYPE_OAUTH2", - } - SecurityScheme_Type_value = map[string]int32{ - "TYPE_INVALID": 0, - "TYPE_BASIC": 1, - "TYPE_API_KEY": 2, - "TYPE_OAUTH2": 3, - } -) - -func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { - p := new(SecurityScheme_Type) - *p = x - return p -} - -func (x SecurityScheme_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() -} - -func (SecurityScheme_Type) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] -} - -func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityScheme_Type.Descriptor instead. -func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0} -} - -// The location of the API key. Valid values are "query" or "header". -type SecurityScheme_In int32 - -const ( - SecurityScheme_IN_INVALID SecurityScheme_In = 0 - SecurityScheme_IN_QUERY SecurityScheme_In = 1 - SecurityScheme_IN_HEADER SecurityScheme_In = 2 -) - -// Enum value maps for SecurityScheme_In. -var ( - SecurityScheme_In_name = map[int32]string{ - 0: "IN_INVALID", - 1: "IN_QUERY", - 2: "IN_HEADER", - } - SecurityScheme_In_value = map[string]int32{ - "IN_INVALID": 0, - "IN_QUERY": 1, - "IN_HEADER": 2, - } -) - -func (x SecurityScheme_In) Enum() *SecurityScheme_In { - p := new(SecurityScheme_In) - *p = x - return p -} - -func (x SecurityScheme_In) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() -} - -func (SecurityScheme_In) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] -} - -func (x SecurityScheme_In) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityScheme_In.Descriptor instead. -func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 1} -} - -// The flow used by the OAuth2 security scheme. Valid values are -// "implicit", "password", "application" or "accessCode". -type SecurityScheme_Flow int32 - -const ( - SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 - SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 - SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 - SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 - SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 -) - -// Enum value maps for SecurityScheme_Flow. -var ( - SecurityScheme_Flow_name = map[int32]string{ - 0: "FLOW_INVALID", - 1: "FLOW_IMPLICIT", - 2: "FLOW_PASSWORD", - 3: "FLOW_APPLICATION", - 4: "FLOW_ACCESS_CODE", - } - SecurityScheme_Flow_value = map[string]int32{ - "FLOW_INVALID": 0, - "FLOW_IMPLICIT": 1, - "FLOW_PASSWORD": 2, - "FLOW_APPLICATION": 3, - "FLOW_ACCESS_CODE": 4, - } -) - -func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { - p := new(SecurityScheme_Flow) - *p = x - return p -} - -func (x SecurityScheme_Flow) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { - return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() -} - -func (SecurityScheme_Flow) Type() protoreflect.EnumType { - return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] -} - -func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SecurityScheme_Flow.Descriptor instead. -func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 2} -} - -// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// title: "Echo API"; -// version: "1.0"; -// description: "; -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// }; -// schemes: HTTPS; -// consumes: "application/json"; -// produces: "application/json"; -// }; -// -type Swagger struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the OpenAPI Specification version being used. It can be - // used by the OpenAPI UI and other clients to interpret the API listing. The - // value MUST be "2.0". - Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` - // Provides metadata about the API. The metadata can be used by the - // clients if needed. - Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` - // The host (name or ip) serving the API. This MUST be the host only and does - // not include the scheme nor sub-paths. It MAY include a port. If the host is - // not included, the host serving the documentation is to be used (including - // the port). The host does not support path templating. - Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` - // The base path on which the API is served, which is relative to the host. If - // it is not included, the API is served directly under the host. The value - // MUST start with a leading slash (/). The basePath does not support path - // templating. - // Note that using `base_path` does not change the endpoint paths that are - // generated in the resulting OpenAPI file. If you wish to use `base_path` - // with relatively generated OpenAPI paths, the `base_path` prefix must be - // manually removed from your `google.api.http` paths and your code changed to - // serve the API from the `base_path`. - BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` - // The transfer protocol of the API. Values MUST be from the list: "http", - // "https", "ws", "wss". If the schemes is not included, the default scheme to - // be used is the one used to access the OpenAPI definition itself. - Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` - // A list of MIME types the APIs can consume. This is global to all APIs but - // can be overridden on specific API calls. Value MUST be as described under - // Mime Types. - Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` - // A list of MIME types the APIs can produce. This is global to all APIs but - // can be overridden on specific API calls. Value MUST be as described under - // Mime Types. - Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` - // An object to hold responses that can be used across operations. This - // property does not define global responses for all operations. - Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Security scheme definitions that can be used across the specification. - SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` - // A declaration of which security schemes are applied for the API as a whole. - // The list of values describes alternative security schemes that can be used - // (that is, there is a logical OR between the security requirements). - // Individual operations can override this definition. - Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` - // Additional external documentation. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Swagger) Reset() { - *x = Swagger{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Swagger) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Swagger) ProtoMessage() {} - -func (x *Swagger) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Swagger.ProtoReflect.Descriptor instead. -func (*Swagger) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} -} - -func (x *Swagger) GetSwagger() string { - if x != nil { - return x.Swagger - } - return "" -} - -func (x *Swagger) GetInfo() *Info { - if x != nil { - return x.Info - } - return nil -} - -func (x *Swagger) GetHost() string { - if x != nil { - return x.Host - } - return "" -} - -func (x *Swagger) GetBasePath() string { - if x != nil { - return x.BasePath - } - return "" -} - -func (x *Swagger) GetSchemes() []Scheme { - if x != nil { - return x.Schemes - } - return nil -} - -func (x *Swagger) GetConsumes() []string { - if x != nil { - return x.Consumes - } - return nil -} - -func (x *Swagger) GetProduces() []string { - if x != nil { - return x.Produces - } - return nil -} - -func (x *Swagger) GetResponses() map[string]*Response { - if x != nil { - return x.Responses - } - return nil -} - -func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { - if x != nil { - return x.SecurityDefinitions - } - return nil -} - -func (x *Swagger) GetSecurity() []*SecurityRequirement { - if x != nil { - return x.Security - } - return nil -} - -func (x *Swagger) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -func (x *Swagger) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Operation` is a representation of OpenAPI v2 specification's Operation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject -// -// Example: -// -// service EchoService { -// rpc Echo(SimpleMessage) returns (SimpleMessage) { -// option (google.api.http) = { -// get: "/v1/example/echo/{id}" -// }; -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { -// summary: "Get a message."; -// operation_id: "getMessage"; -// tags: "echo"; -// responses: { -// key: "200" -// value: { -// description: "OK"; -// } -// } -// }; -// } -// } -type Operation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of tags for API documentation control. Tags can be used for logical - // grouping of operations by resources or any other qualifier. - Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` - // A short summary of what the operation does. For maximum readability in the - // swagger-ui, this field SHOULD be less than 120 characters. - Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` - // A verbose explanation of the operation behavior. GFM syntax can be used for - // rich text representation. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // Additional external documentation for this operation. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - // Unique string used to identify the operation. The id MUST be unique among - // all operations described in the API. Tools and libraries MAY use the - // operationId to uniquely identify an operation, therefore, it is recommended - // to follow common programming naming conventions. - OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` - // A list of MIME types the operation can consume. This overrides the consumes - // definition at the OpenAPI Object. An empty value MAY be used to clear the - // global definition. Value MUST be as described under Mime Types. - Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` - // A list of MIME types the operation can produce. This overrides the produces - // definition at the OpenAPI Object. An empty value MAY be used to clear the - // global definition. Value MUST be as described under Mime Types. - Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` - // The list of possible responses as they are returned from executing this - // operation. - Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The transfer protocol for the operation. Values MUST be from the list: - // "http", "https", "ws", "wss". The value overrides the OpenAPI Object - // schemes definition. - Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` - // Declares this operation to be deprecated. Usage of the declared operation - // should be refrained. Default value is false. - Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - // A declaration of which security schemes are applied for this operation. The - // list of values describes alternative security schemes that can be used - // (that is, there is a logical OR between the security requirements). This - // definition overrides any declared top-level security. To remove a top-level - // security declaration, an empty array can be used. - Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Operation) Reset() { - *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Operation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Operation) ProtoMessage() {} - -func (x *Operation) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Operation.ProtoReflect.Descriptor instead. -func (*Operation) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{1} -} - -func (x *Operation) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *Operation) GetSummary() string { - if x != nil { - return x.Summary - } - return "" -} - -func (x *Operation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Operation) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -func (x *Operation) GetOperationId() string { - if x != nil { - return x.OperationId - } - return "" -} - -func (x *Operation) GetConsumes() []string { - if x != nil { - return x.Consumes - } - return nil -} - -func (x *Operation) GetProduces() []string { - if x != nil { - return x.Produces - } - return nil -} - -func (x *Operation) GetResponses() map[string]*Response { - if x != nil { - return x.Responses - } - return nil -} - -func (x *Operation) GetSchemes() []Scheme { - if x != nil { - return x.Schemes - } - return nil -} - -func (x *Operation) GetDeprecated() bool { - if x != nil { - return x.Deprecated - } - return false -} - -func (x *Operation) GetSecurity() []*SecurityRequirement { - if x != nil { - return x.Security - } - return nil -} - -func (x *Operation) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Header` is a representation of OpenAPI v2 specification's Header object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject -// -type Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `Description` is a short description of the header. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. - Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` - // `Format` The extending format for the previously mentioned type. - Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` - // `Default` Declares the value of the header that the server will use if none is provided. - // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. - // Unlike JSON Schema this value MUST conform to the defined type for the header. - Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` - // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. - Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` -} - -func (x *Header) Reset() { - *x = Header{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] - 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_protoc_gen_openapiv2_options_openapiv2_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 Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2} -} - -func (x *Header) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Header) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Header) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -func (x *Header) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *Header) GetPattern() string { - if x != nil { - return x.Pattern - } - return "" -} - -// `Response` is a representation of OpenAPI v2 specification's Response object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject -// -type Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // `Description` is a short description of the response. - // GFM syntax can be used for rich text representation. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // `Schema` optionally defines the structure of the response. - // If `Schema` is not provided, it means there is no content to the response. - Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` - // `Headers` A list of headers that are sent with the response. - // `Header` name is expected to be a string in the canonical format of the MIME header key - // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey - Headers map[string]*Header `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"` - // `Examples` gives per-mimetype response examples. - // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object - Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Extensions map[string]*_struct.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Response) Reset() { - *x = Response{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] - 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_protoc_gen_openapiv2_options_openapiv2_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 Response.ProtoReflect.Descriptor instead. -func (*Response) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3} -} - -func (x *Response) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Response) GetSchema() *Schema { - if x != nil { - return x.Schema - } - return nil -} - -func (x *Response) GetHeaders() map[string]*Header { - if x != nil { - return x.Headers - } - return nil -} - -func (x *Response) GetExamples() map[string]string { - if x != nil { - return x.Examples - } - return nil -} - -func (x *Response) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Info` is a representation of OpenAPI v2 specification's Info object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// title: "Echo API"; -// version: "1.0"; -// description: "; -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// }; -// ... -// }; -// -type Info struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The title of the application. - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - // A short description of the application. GFM syntax can be used for rich - // text representation. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The Terms of Service for the API. - TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` - // The contact information for the exposed API. - Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` - // The license information for the exposed API. - License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` - // Provides the version of the application API (not to be confused - // with the specification version). - Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Info) Reset() { - *x = Info{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Info) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Info) ProtoMessage() {} - -func (x *Info) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Info.ProtoReflect.Descriptor instead. -func (*Info) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4} -} - -func (x *Info) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *Info) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Info) GetTermsOfService() string { - if x != nil { - return x.TermsOfService - } - return "" -} - -func (x *Info) GetContact() *Contact { - if x != nil { - return x.Contact - } - return nil -} - -func (x *Info) GetLicense() *License { - if x != nil { - return x.License - } - return nil -} - -func (x *Info) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Info) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `Contact` is a representation of OpenAPI v2 specification's Contact object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// ... -// contact: { -// name: "gRPC-Gateway project"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// email: "none@example.com"; -// }; -// ... -// }; -// ... -// }; -// -type Contact struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The identifying name of the contact person/organization. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The URL pointing to the contact information. MUST be in the format of a - // URL. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // The email address of the contact person/organization. MUST be in the format - // of an email address. - Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` -} - -func (x *Contact) Reset() { - *x = Contact{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Contact) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Contact) ProtoMessage() {} - -func (x *Contact) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Contact.ProtoReflect.Descriptor instead. -func (*Contact) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5} -} - -func (x *Contact) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Contact) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Contact) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -// `License` is a representation of OpenAPI v2 specification's License object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// info: { -// ... -// license: { -// name: "BSD 3-Clause License"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; -// }; -// ... -// }; -// ... -// }; -// -type License struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The license name used for the API. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A URL to the license used for the API. MUST be in the format of a URL. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *License) Reset() { - *x = License{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *License) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*License) ProtoMessage() {} - -func (x *License) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 License.ProtoReflect.Descriptor instead. -func (*License) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6} -} - -func (x *License) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *License) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// `ExternalDocumentation` is a representation of OpenAPI v2 specification's -// ExternalDocumentation object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject -// -// Example: -// -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { -// ... -// external_docs: { -// description: "More about gRPC-Gateway"; -// url: "https://github.com/grpc-ecosystem/grpc-gateway"; -// } -// ... -// }; -// -type ExternalDocumentation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A short description of the target documentation. GFM syntax can be used for - // rich text representation. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The URL for the target documentation. Value MUST be in the format - // of a URL. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *ExternalDocumentation) Reset() { - *x = ExternalDocumentation{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExternalDocumentation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExternalDocumentation) ProtoMessage() {} - -func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 ExternalDocumentation.ProtoReflect.Descriptor instead. -func (*ExternalDocumentation) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7} -} - -func (x *ExternalDocumentation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *ExternalDocumentation) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -// `Schema` is a representation of OpenAPI v2 specification's Schema object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -type Schema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` - // Adds support for polymorphism. The discriminator is the schema property - // name that is used to differentiate between other schema that inherit this - // schema. The property name used MUST be defined at this schema and it MUST - // be in the required property list. When used, the value MUST be the name of - // this schema or any schema that inherits it. - Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` - // Relevant only for Schema "properties" definitions. Declares the property as - // "read only". This means that it MAY be sent as part of a response but MUST - // NOT be sent as part of the request. Properties marked as readOnly being - // true SHOULD NOT be in the required list of the defined schema. Default - // value is false. - ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // Additional external documentation for this schema. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` - // A free-form property to include an example of an instance for this schema in JSON. - // This is copied verbatim to the output. - Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` -} - -func (x *Schema) Reset() { - *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Schema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Schema) ProtoMessage() {} - -func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Schema.ProtoReflect.Descriptor instead. -func (*Schema) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8} -} - -func (x *Schema) GetJsonSchema() *JSONSchema { - if x != nil { - return x.JsonSchema - } - return nil -} - -func (x *Schema) GetDiscriminator() string { - if x != nil { - return x.Discriminator - } - return "" -} - -func (x *Schema) GetReadOnly() bool { - if x != nil { - return x.ReadOnly - } - return false -} - -func (x *Schema) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -func (x *Schema) GetExample() string { - if x != nil { - return x.Example - } - return "" -} - -// `JSONSchema` represents properties from JSON Schema taken, and as used, in -// the OpenAPI v2 spec. -// -// This includes changes made by OpenAPI v2. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject -// -// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, -// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json -// -// Example: -// -// message SimpleMessage { -// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { -// json_schema: { -// title: "SimpleMessage" -// description: "A simple message." -// required: ["id"] -// } -// }; -// -// // Id represents the message identifier. -// string id = 1; [ -// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { -// {description: "The unique identifier of the simple message." -// }]; -// } -// -type JSONSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Ref is used to define an external reference to include in the message. - // This could be a fully qualified proto message reference, and that type must - // be imported into the protofile. If no message is identified, the Ref will - // be used verbatim in the output. - // For example: - // `ref: ".google.protobuf.Timestamp"`. - Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` - // The title of the schema. - Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` - // A short description of the schema. - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` - ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // A free-form property to include a JSON example of this field. This is copied - // verbatim to the output swagger.json. Quotes must be escaped. - // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject - Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` - MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` - // Maximum represents an inclusive upper limit for a numeric instance. The - // value of MUST be a number, - Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` - ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` - // minimum represents an inclusive lower limit for a numeric instance. The - // value of MUST be a number, - Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` - ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` - MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` - MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` - MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` - UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` - MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` - MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` - Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` - // Items in 'array' must be unique. - Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` - Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` - // `Format` - Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` - // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 - Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` -} - -func (x *JSONSchema) Reset() { - *x = JSONSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JSONSchema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JSONSchema) ProtoMessage() {} - -func (x *JSONSchema) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 JSONSchema.ProtoReflect.Descriptor instead. -func (*JSONSchema) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9} -} - -func (x *JSONSchema) GetRef() string { - if x != nil { - return x.Ref - } - return "" -} - -func (x *JSONSchema) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *JSONSchema) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *JSONSchema) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *JSONSchema) GetReadOnly() bool { - if x != nil { - return x.ReadOnly - } - return false -} - -func (x *JSONSchema) GetExample() string { - if x != nil { - return x.Example - } - return "" -} - -func (x *JSONSchema) GetMultipleOf() float64 { - if x != nil { - return x.MultipleOf - } - return 0 -} - -func (x *JSONSchema) GetMaximum() float64 { - if x != nil { - return x.Maximum - } - return 0 -} - -func (x *JSONSchema) GetExclusiveMaximum() bool { - if x != nil { - return x.ExclusiveMaximum - } - return false -} - -func (x *JSONSchema) GetMinimum() float64 { - if x != nil { - return x.Minimum - } - return 0 -} - -func (x *JSONSchema) GetExclusiveMinimum() bool { - if x != nil { - return x.ExclusiveMinimum - } - return false -} - -func (x *JSONSchema) GetMaxLength() uint64 { - if x != nil { - return x.MaxLength - } - return 0 -} - -func (x *JSONSchema) GetMinLength() uint64 { - if x != nil { - return x.MinLength - } - return 0 -} - -func (x *JSONSchema) GetPattern() string { - if x != nil { - return x.Pattern - } - return "" -} - -func (x *JSONSchema) GetMaxItems() uint64 { - if x != nil { - return x.MaxItems - } - return 0 -} - -func (x *JSONSchema) GetMinItems() uint64 { - if x != nil { - return x.MinItems - } - return 0 -} - -func (x *JSONSchema) GetUniqueItems() bool { - if x != nil { - return x.UniqueItems - } - return false -} - -func (x *JSONSchema) GetMaxProperties() uint64 { - if x != nil { - return x.MaxProperties - } - return 0 -} - -func (x *JSONSchema) GetMinProperties() uint64 { - if x != nil { - return x.MinProperties - } - return 0 -} - -func (x *JSONSchema) GetRequired() []string { - if x != nil { - return x.Required - } - return nil -} - -func (x *JSONSchema) GetArray() []string { - if x != nil { - return x.Array - } - return nil -} - -func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { - if x != nil { - return x.Type - } - return nil -} - -func (x *JSONSchema) GetFormat() string { - if x != nil { - return x.Format - } - return "" -} - -func (x *JSONSchema) GetEnum() []string { - if x != nil { - return x.Enum - } - return nil -} - -// `Tag` is a representation of OpenAPI v2 specification's Tag object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject -// -type Tag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A short description for the tag. GFM syntax can be used for rich text - // representation. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // Additional external documentation for this tag. - ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` -} - -func (x *Tag) Reset() { - *x = Tag{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tag) ProtoMessage() {} - -func (x *Tag) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Tag.ProtoReflect.Descriptor instead. -func (*Tag) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10} -} - -func (x *Tag) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Tag) GetExternalDocs() *ExternalDocumentation { - if x != nil { - return x.ExternalDocs - } - return nil -} - -// `SecurityDefinitions` is a representation of OpenAPI v2 specification's -// Security Definitions object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject -// -// A declaration of the security schemes available to be used in the -// specification. This does not enforce the security schemes on the operations -// and only serves to provide the relevant details for each scheme. -type SecurityDefinitions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A single security scheme definition, mapping a "name" to the scheme it - // defines. - Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SecurityDefinitions) Reset() { - *x = SecurityDefinitions{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityDefinitions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityDefinitions) ProtoMessage() {} - -func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityDefinitions.ProtoReflect.Descriptor instead. -func (*SecurityDefinitions) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11} -} - -func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { - if x != nil { - return x.Security - } - return nil -} - -// `SecurityScheme` is a representation of OpenAPI v2 specification's -// Security Scheme object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject -// -// Allows the definition of a security scheme that can be used by the -// operations. Supported schemes are basic authentication, an API key (either as -// a header or as a query parameter) and OAuth2's common flows (implicit, -// password, application and access code). -type SecurityScheme struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of the security scheme. Valid values are "basic", - // "apiKey" or "oauth2". - Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` - // A short description for security scheme. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The name of the header or query parameter to be used. - // Valid for apiKey. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // The location of the API key. Valid values are "query" or - // "header". - // Valid for apiKey. - In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` - // The flow used by the OAuth2 security scheme. Valid values are - // "implicit", "password", "application" or "accessCode". - // Valid for oauth2. - Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` - // The authorization URL to be used for this flow. This SHOULD be in - // the form of a URL. - // Valid for oauth2/implicit and oauth2/accessCode. - AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` - // The token URL to be used for this flow. This SHOULD be in the - // form of a URL. - // Valid for oauth2/password, oauth2/application and oauth2/accessCode. - TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` - // The available scopes for the OAuth2 security scheme. - // Valid for oauth2. - Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` - Extensions map[string]*_struct.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SecurityScheme) Reset() { - *x = SecurityScheme{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityScheme) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityScheme) ProtoMessage() {} - -func (x *SecurityScheme) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityScheme.ProtoReflect.Descriptor instead. -func (*SecurityScheme) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12} -} - -func (x *SecurityScheme) GetType() SecurityScheme_Type { - if x != nil { - return x.Type - } - return SecurityScheme_TYPE_INVALID -} - -func (x *SecurityScheme) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *SecurityScheme) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SecurityScheme) GetIn() SecurityScheme_In { - if x != nil { - return x.In - } - return SecurityScheme_IN_INVALID -} - -func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { - if x != nil { - return x.Flow - } - return SecurityScheme_FLOW_INVALID -} - -func (x *SecurityScheme) GetAuthorizationUrl() string { - if x != nil { - return x.AuthorizationUrl - } - return "" -} - -func (x *SecurityScheme) GetTokenUrl() string { - if x != nil { - return x.TokenUrl - } - return "" -} - -func (x *SecurityScheme) GetScopes() *Scopes { - if x != nil { - return x.Scopes - } - return nil -} - -func (x *SecurityScheme) GetExtensions() map[string]*_struct.Value { - if x != nil { - return x.Extensions - } - return nil -} - -// `SecurityRequirement` is a representation of OpenAPI v2 specification's -// Security Requirement object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject -// -// Lists the required security schemes to execute this operation. The object can -// have multiple security schemes declared in it which are all required (that -// is, there is a logical AND between the schemes). -// -// The name used for each property MUST correspond to a security scheme -// declared in the Security Definitions. -type SecurityRequirement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Each name must correspond to a security scheme which is declared in - // the Security Definitions. If the security scheme is of type "oauth2", - // then the value is a list of scope names required for the execution. - // For other security scheme types, the array MUST be empty. - SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *SecurityRequirement) Reset() { - *x = SecurityRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityRequirement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityRequirement) ProtoMessage() {} - -func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityRequirement.ProtoReflect.Descriptor instead. -func (*SecurityRequirement) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13} -} - -func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { - if x != nil { - return x.SecurityRequirement - } - return nil -} - -// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. -// -// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject -// -// Lists the available scopes for an OAuth2 security scheme. -type Scopes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maps between a name of a scope to a short description of it (as the value - // of the property). - Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Scopes) Reset() { - *x = Scopes{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Scopes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Scopes) ProtoMessage() {} - -func (x *Scopes) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Scopes.ProtoReflect.Descriptor instead. -func (*Scopes) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14} -} - -func (x *Scopes) GetScope() map[string]string { - if x != nil { - return x.Scope - } - return nil -} - -// If the security scheme is of type "oauth2", then the value is a list of -// scope names required for the execution. For other security scheme types, -// the array MUST be empty. -type SecurityRequirement_SecurityRequirementValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` -} - -func (x *SecurityRequirement_SecurityRequirementValue) Reset() { - *x = SecurityRequirement_SecurityRequirementValue{} - if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SecurityRequirement_SecurityRequirementValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} - -func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] - 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 SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead. -func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) { - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13, 0} -} - -func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { - if x != nil { - return x.Scope - } - return nil -} - -var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor - -var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x07, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, - 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, - 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, - 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, - 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0d, 0x10, 0x0e, 0x22, - 0xff, 0x06, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 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, 0x65, 0x0a, - 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x44, 0x6f, 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, - 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, - 0x61, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x5a, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x44, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, - 0x09, 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, - 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, - 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, - 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, - 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, - 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x73, 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 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, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 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, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, - 0x72, 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x63, 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, - 0x65, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, - 0x6a, 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, - 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, - 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, - 0x08, 0x04, 0x10, 0x05, 0x22, 0xdf, 0x07, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, - 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, - 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, - 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, - 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, - 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, - 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, - 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, - 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, - 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, - 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, - 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, - 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, - 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, - 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x01, - 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0b, 0x0a, - 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, - 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x05, - 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, - 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, - 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x1b, - 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x4a, 0x04, - 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, - 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0x94, 0x01, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xf7, 0x01, - 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, - 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, - 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, - 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, - 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, - 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, - 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 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, 0x2c, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, - 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, - 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, - 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, - 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, - 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, - 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, - 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, - 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, - 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, - 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 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, 0x2a, 0x3b, 0x0a, 0x06, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, - 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, - 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce sync.Once - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc -) - -func file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP() []byte { - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce.Do(func() { - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData) - }) - return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData -} - -var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []interface{}{ - (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme - (JSONSchema_JSONSchemaSimpleTypes)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes - (SecurityScheme_Type)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type - (SecurityScheme_In)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In - (SecurityScheme_Flow)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow - (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger - (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation - (*Header)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Header - (*Response)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Response - (*Info)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.Info - (*Contact)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Contact - (*License)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.License - (*ExternalDocumentation)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - (*Schema)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Schema - (*JSONSchema)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema - (*Tag)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.Tag - (*SecurityDefinitions)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions - (*SecurityScheme)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme - (*SecurityRequirement)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement - (*Scopes)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Scopes - nil, // 20: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry - nil, // 21: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry - nil, // 22: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry - nil, // 23: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry - nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry - nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry - nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry - nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry - nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry - nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry - (*SecurityRequirement_SecurityRequirementValue)(nil), // 30: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue - nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry - nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry - (*_struct.Value)(nil), // 33: google.protobuf.Value -} -var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ - 9, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info - 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme - 20, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry - 16, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions - 18, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement - 12, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 21, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry - 12, // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 22, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry - 0, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme - 18, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement - 23, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry - 13, // 12: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema - 24, // 13: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry - 25, // 14: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry - 26, // 15: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry - 10, // 16: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact - 11, // 17: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License - 27, // 18: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry - 14, // 19: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema - 12, // 20: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 1, // 21: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes - 12, // 22: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation - 28, // 23: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry - 2, // 24: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type - 3, // 25: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In - 4, // 26: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow - 19, // 27: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes - 29, // 28: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry - 31, // 29: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry - 32, // 30: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry - 8, // 31: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response - 33, // 32: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value - 8, // 33: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response - 33, // 34: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value - 7, // 35: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header - 33, // 36: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value - 33, // 37: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value - 17, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme - 33, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value - 30, // 40: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue - 41, // [41:41] is the sub-list for method output_type - 41, // [41:41] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name -} - -func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } -func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { - if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Swagger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2].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_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3].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_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Info); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Contact); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*License); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExternalDocumentation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JSONSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityDefinitions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityScheme); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Scopes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityRequirement_SecurityRequirementValue); 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_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, - NumEnums: 5, - NumMessages: 28, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, - DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, - EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, - MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, - }.Build() - File_protoc_gen_openapiv2_options_openapiv2_proto = out.File - file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil - file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil - file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil -} diff --git a/main.go b/main.go index 0a2665e2..9de2e183 100644 --- a/main.go +++ b/main.go @@ -171,18 +171,17 @@ func startHTTPProxy() { opts := []grpc.DialOption{grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(math.MaxInt64), grpc.MaxCallRecvMsgSize(math.MaxInt64))} - api.RegisterWorkflowTemplateServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterWorkflowTemplateServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterWorkflowServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterCronWorkflowServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterSecretServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterNamespaceServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterAuthServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterLabelServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterWorkspaceTemplateServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterWorkspaceServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterConfigServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) - api.RegisterServiceServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) + registerHandler(api.RegisterWorkflowTemplateServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterWorkflowServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterCronWorkflowServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterSecretServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterNamespaceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterAuthServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterLabelServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterWorkspaceTemplateServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterWorkspaceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterConfigServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) + registerHandler(api.RegisterServiceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts) log.Printf("Starting HTTP proxy on port %v", *httpPort) From 779cba97c96b576a2e070cf434d452255f8ca2b4 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 22:49:16 -0800 Subject: [PATCH 65/80] chore: updated contributing guide to include docker version --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32889306..6ca1a09c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,18 @@ ## Database migrations +### Docker + +Note: Up migrations are automatically executed when the application is run. + +```bash +docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose -dir db/sql create sql # Create migration in db/sql folder +docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available +docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1 +docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 goose help # See all available commands +``` + +### Local + Install `goose`: ```bash go get -u github.com/pressly/goose/cmd/goose @@ -8,13 +21,15 @@ go get -u github.com/pressly/goose/cmd/goose Note: Up migrations are automatically executed when the application is run. ```bash -goose -dir db create sql # Create migration in db folder +goose -dir db/sql create sql # Create migration in db/sql folder goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1 goose help # See all available commands ``` -## gRPC installation +## gRPC + +### local installation Install gRPC: ```bash @@ -47,6 +62,15 @@ Make sure that your `$GOBIN` is in your `$PATH`. ## API code generation +### Docker + +Generate Go and Swagger APIs: +```bash +docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 make api version=1.0.0 +``` + +### Local Installation + Generate Go and Swagger APIs: ```bash make api version=1.0.0 From 8dcc38c6cda4f4c385d187a2fbc9b8f46a3c50d3 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 17 Dec 2020 23:21:50 -0800 Subject: [PATCH 66/80] fix: wrong docker image for make api-docker --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f1b8e661..83416851 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ protoc: api: init protoc jq api-docker: init - docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel-helper:v1.0.0 make api version=$(version) + docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 make api version=$(version) docker-build: docker build -t onepanel-core . From 3ad571582a66982cf5d687d67b02b356697eb62c Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 18 Dec 2020 09:53:11 -0800 Subject: [PATCH 67/80] feat: added documentation for helper --- helper/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 helper/README.md diff --git a/helper/README.md b/helper/README.md new file mode 100644 index 00000000..38e0773a --- /dev/null +++ b/helper/README.md @@ -0,0 +1,29 @@ +# About + +Helper provides the files to build a Docker image to assist +with code generation for the onepanel-core project. + +In particular, you can use the docker image to generate all of the gRPC related files, as well as create migrations. + +# Build + +To build, it should be sufficient to run +```bash +docker build -t onepanel/helper:v1.0.0 . +``` + +## Updating + +Create a new directory somewhere outside of this project. + +Copy the `tools.go` file there and change into that directory in your terminal. + +Run +```bash +go mod init onepanel-tools +go mod tidy +``` + +Then, take the `go.mod` and `go.sum` files and copy them back here. + +Then run the # Build steps. \ No newline at end of file From 76ecdcfb70260bfe3b78179c00e2f5705871a79d Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 18 Dec 2020 19:36:23 -0800 Subject: [PATCH 68/80] chore: codacy --- helper/Dockerfile | 2 +- helper/README.md | 6 +++--- helper/tools.go | 2 +- server/cron_workflow_server.go | 2 ++ server/label_server.go | 2 ++ server/namespace_server.go | 2 ++ server/secret_server.go | 2 ++ server/workflow_server.go | 2 ++ server/workflow_template_server.go | 2 ++ server/workspace_server.go | 10 ++++++---- server/workspace_template_server.go | 10 ++++++---- 11 files changed, 29 insertions(+), 13 deletions(-) diff --git a/helper/Dockerfile b/helper/Dockerfile index 107ae77e..116e9999 100644 --- a/helper/Dockerfile +++ b/helper/Dockerfile @@ -3,7 +3,7 @@ FROM golang:1.15.5 AS builder WORKDIR / RUN apt-get update -RUN apt-get install unzip +RUN apt-get install -y --no-install-recommends unzip=6.0-23+deb10u1 RUN curl -sL -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip RUN unzip protoc.zip -d proto RUN curl -sL -o jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 diff --git a/helper/README.md b/helper/README.md index 38e0773a..3cd8ed5f 100644 --- a/helper/README.md +++ b/helper/README.md @@ -1,18 +1,18 @@ -# About +# Onepanel Core Helper Helper provides the files to build a Docker image to assist with code generation for the onepanel-core project. In particular, you can use the docker image to generate all of the gRPC related files, as well as create migrations. -# Build +## Build To build, it should be sufficient to run ```bash docker build -t onepanel/helper:v1.0.0 . ``` -## Updating +### Updating Create a new directory somewhere outside of this project. diff --git a/helper/tools.go b/helper/tools.go index ecf521e2..2340832b 100644 --- a/helper/tools.go +++ b/helper/tools.go @@ -1,6 +1,6 @@ // +build tools -package core_helper +package corehelper import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" diff --git a/server/cron_workflow_server.go b/server/cron_workflow_server.go index 384028b5..c5e68f39 100644 --- a/server/cron_workflow_server.go +++ b/server/cron_workflow_server.go @@ -11,10 +11,12 @@ import ( "github.com/onepanelio/core/server/converter" ) +// CronWorkflowServer is an implementation of the grpc CronWorkflowServer type CronWorkflowServer struct { api.UnimplementedCronWorkflowServiceServer } +// NewCronWorkflowServer creates a new CronWorkflowServer func NewCronWorkflowServer() *CronWorkflowServer { return &CronWorkflowServer{} } diff --git a/server/label_server.go b/server/label_server.go index 37e5a43d..ed750a1f 100644 --- a/server/label_server.go +++ b/server/label_server.go @@ -49,10 +49,12 @@ func mapKeyValuesToMap(keyValues []*api.KeyValue) map[string]string { return result } +// LabelServer is an implementation of the grpc LabelServer type LabelServer struct { api.UnimplementedLabelServiceServer } +// NewLabelServer creates a new LabelServer func NewLabelServer() *LabelServer { return &LabelServer{} } diff --git a/server/namespace_server.go b/server/namespace_server.go index 1f89b06c..9cd1d1d8 100644 --- a/server/namespace_server.go +++ b/server/namespace_server.go @@ -10,10 +10,12 @@ import ( "github.com/onepanelio/core/server/auth" ) +// NamespaceServer is an implementation of the grpc NamespaceServer type NamespaceServer struct { api.UnimplementedNamespaceServiceServer } +// NewNamespaceServer creates a new NamespaceServer func NewNamespaceServer() *NamespaceServer { return &NamespaceServer{} } diff --git a/server/secret_server.go b/server/secret_server.go index 556c0289..092025bf 100644 --- a/server/secret_server.go +++ b/server/secret_server.go @@ -9,10 +9,12 @@ import ( "github.com/onepanelio/core/server/auth" ) +// SecretServer is an implementation of the grpc SecretServer type SecretServer struct { api.UnimplementedSecretServiceServer } +// NewSecretServer creates a new SecretServer func NewSecretServer() *SecretServer { return &SecretServer{} } diff --git a/server/workflow_server.go b/server/workflow_server.go index bfef8857..c19bec04 100644 --- a/server/workflow_server.go +++ b/server/workflow_server.go @@ -25,10 +25,12 @@ import ( requestSort "github.com/onepanelio/core/pkg/util/request/sort" ) +// WorkflowServer is an implementation of the grpc WorkflowServer type WorkflowServer struct { api.UnimplementedWorkflowServiceServer } +// NewWorkflowServer creates a new WorkflowServer func NewWorkflowServer() *WorkflowServer { return &WorkflowServer{} } diff --git a/server/workflow_template_server.go b/server/workflow_template_server.go index c3a049b7..4f39e1c9 100644 --- a/server/workflow_template_server.go +++ b/server/workflow_template_server.go @@ -11,10 +11,12 @@ import ( "github.com/onepanelio/core/server/converter" ) +// WorkflowTemplateServer is an implementation of the grpc WorkflowTemplateServer type WorkflowTemplateServer struct { api.UnimplementedWorkflowTemplateServiceServer } +// NewWorkflowTemplateServer creates a new WorkflowTemplateServer func NewWorkflowTemplateServer() *WorkflowTemplateServer { return &WorkflowTemplateServer{} } diff --git a/server/workspace_server.go b/server/workspace_server.go index a8eeeb48..26d817c1 100644 --- a/server/workspace_server.go +++ b/server/workspace_server.go @@ -21,10 +21,16 @@ var reservedWorkspaceNames = map[string]bool{ "modeldb": true, } +// WorkspaceServer is an implementation of the grpc WorkspaceServer type WorkspaceServer struct { api.UnimplementedWorkspaceServiceServer } +// NewWorkspaceServer creates a new WorkspaceServer +func NewWorkspaceServer() *WorkspaceServer { + return &WorkspaceServer{} +} + func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace { protocol := config.APIProtocol() domain := config.Domain() @@ -82,10 +88,6 @@ func apiWorkspace(wt *v1.Workspace, config v1.SystemConfig) *api.Workspace { return res } -func NewWorkspaceServer() *WorkspaceServer { - return &WorkspaceServer{} -} - func (s *WorkspaceServer) CreateWorkspace(ctx context.Context, req *api.CreateWorkspaceRequest) (*api.Workspace, error) { client := getClient(ctx) allowed, err := auth.IsAuthorized(client, req.Namespace, "create", "onepanel.io", "workspaces", "") diff --git a/server/workspace_template_server.go b/server/workspace_template_server.go index 7d48fb46..d391042c 100644 --- a/server/workspace_template_server.go +++ b/server/workspace_template_server.go @@ -14,10 +14,16 @@ import ( "time" ) +// WorkspaceTemplateServer is an implementation of the grpc WorkspaceTemplateServer type WorkspaceTemplateServer struct { api.UnimplementedWorkspaceTemplateServiceServer } +// NewWorkspaceTemplateServer creates a new WorkspaceTemplateServer +func NewWorkspaceTemplateServer() *WorkspaceTemplateServer { + return &WorkspaceTemplateServer{} +} + func apiWorkspaceTemplate(wt *v1.WorkspaceTemplate) *api.WorkspaceTemplate { res := &api.WorkspaceTemplate{ Uid: wt.UID, @@ -37,10 +43,6 @@ func apiWorkspaceTemplate(wt *v1.WorkspaceTemplate) *api.WorkspaceTemplate { return res } -func NewWorkspaceTemplateServer() *WorkspaceTemplateServer { - return &WorkspaceTemplateServer{} -} - func (s WorkspaceTemplateServer) GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, req *api.GenerateWorkspaceTemplateWorkflowTemplateRequest) (*api.WorkflowTemplate, error) { client := getClient(ctx) allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", "workflowtemplates", "") From 3a5fc3894b6708f06d65f4b34c6861c846f8e232 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Fri, 18 Dec 2020 20:17:07 -0800 Subject: [PATCH 69/80] chore: codacy --- helper/tools.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/tools.go b/helper/tools.go index 2340832b..2fedca85 100644 --- a/helper/tools.go +++ b/helper/tools.go @@ -3,8 +3,12 @@ package corehelper import ( + // this is for finding the package versions _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" + // this is for finding the package versions _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" + // this is for finding the package versions _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" + // this is for finding the package versions _ "google.golang.org/protobuf/cmd/protoc-gen-go" ) From f196c01fdbf46541766a5e6c608aae183a47cbfd Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Wed, 23 Dec 2020 13:17:22 -0800 Subject: [PATCH 70/80] update README --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 5061ec56..cd77d99f 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,7 @@ Onepanel can be found on [LF AI Landscape](http://landscape.lfai.foundation/sele ## Online demo We have created an [online demo environment](https://onepanel.typeform.com/to/kQfDX5Vf?product=github) so that you can quickly try Onepanel. -Note that this is a shared demo environment with the following restrictions: - -- Data is reset every few hours -- One type of node pool (machine type) with a limit of 5 concurrent nodes -- Certain actions may be restricted +Note that this is a **shared**, **read only** demo environment. ## Quick start See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started with the platform of your choice. From af6e3c8e72d5b4536992758560c4ebff0cebbf63 Mon Sep 17 00:00:00 2001 From: rushtehrani Date: Wed, 23 Dec 2020 13:21:13 -0800 Subject: [PATCH 71/80] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd77d99f..691a73d7 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Onepanel can be found on [LF AI Landscape](http://landscape.lfai.foundation/sele ## Online demo We have created an [online demo environment](https://onepanel.typeform.com/to/kQfDX5Vf?product=github) so that you can quickly try Onepanel. -Note that this is a **shared**, **read only** demo environment. +**Note:** This is a shared, read only demo environment that is reset every few hours. ## Quick start See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started with the platform of your choice. From d203b04af096c0021cad0434405fc30ac6913772 Mon Sep 17 00:00:00 2001 From: Rush Tehrani Date: Wed, 23 Dec 2020 16:20:34 -0800 Subject: [PATCH 72/80] chore: Fix manifests repo link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 691a73d7..c579b6f2 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Onepanel is modular and consists of the following repositories: [Backend](https://github.com/onepanelio/core/) (this repository) - Code base for backend (Go)\ [Frontend](https://github.com/onepanelio/core-ui/) - Code base for frontend (Angular + TypeScript)\ [CLI](https://github.com/onepanelio/cli/) - Code base for installation and management CLI (Go)\ -[Manifests](https://github.com/onepanelio/core-ui/) - Kustomize manifests used by installation and management CLI (YAML)\ +[Manifests](https://github.com/onepanelio/manifests/) - Kustomize manifests used by installation and management CLI (YAML)\ [Python SDK](https://github.com/onepanelio/python-sdk/) - Python SDK code and documentation (Python)\ [Templates](https://github.com/onepanelio/templates) - Various Workspace, Workflow, Task and Sidecar Templates\ [Documentation](https://github.com/onepanelio/core-docs/) - The repository for documentation site\ From 7d062dee791da0a4d7e9394b2890c98ecc446940 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Wed, 25 Nov 2020 12:34:43 -0800 Subject: [PATCH 73/80] fix: added checks to workspace/workflow templates on creation to make sure they don't allow sys- prefixed names. Also updated workspace creation so that the workflow templates created by workspace templates have a sys- prefix. --- pkg/system.go | 16 ++++++++++++++++ pkg/workspace_template.go | 4 +++- server/server.go | 6 ++++++ server/workflow_template_server.go | 6 ++++++ server/workspace_template_server.go | 4 ++++ 5 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 pkg/system.go diff --git a/pkg/system.go b/pkg/system.go new file mode 100644 index 00000000..a75b00bb --- /dev/null +++ b/pkg/system.go @@ -0,0 +1,16 @@ +package v1 + +import ( + "github.com/onepanelio/core/pkg/util" + "google.golang.org/grpc/codes" +) + +// ConvertToSystemName converts a name to a system name by prefixing it with "sys-" +func ConvertToSystemName(name string) string { + return "sys-" + name +} + +// NameReservedForSystemError is an error returned whenever the user tries to use a name reserved for the system +func NameReservedForSystemError() error { + return &util.UserError{Code: codes.InvalidArgument, Message: "Names prefixed with 'sys-' are reserved by the system"} +} diff --git a/pkg/workspace_template.go b/pkg/workspace_template.go index bcea6d78..c0ff2aad 100644 --- a/pkg/workspace_template.go +++ b/pkg/workspace_template.go @@ -977,8 +977,10 @@ func (c *Client) generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate *Wo workflowTemplateManifest = strings.NewReplacer( "{{workspace.parameters.", "{{workflow.parameters.").Replace(workflowTemplateManifest) + // a workspace template's associated workflow template name should have a sys- prefix + // as it is system generated workflowTemplate = &WorkflowTemplate{ - Name: workspaceTemplate.Name, + Name: ConvertToSystemName(workspaceTemplate.Name), Manifest: workflowTemplateManifest, } diff --git a/server/server.go b/server/server.go index 6f52a2e4..eaaa8027 100644 --- a/server/server.go +++ b/server/server.go @@ -4,6 +4,7 @@ import ( "context" v1 "github.com/onepanelio/core/pkg" "github.com/onepanelio/core/server/auth" + "strings" ) const ( @@ -13,3 +14,8 @@ const ( func getClient(ctx context.Context) *v1.Client { return ctx.Value(auth.ContextClientKey).(*v1.Client) } + +// IsNameReservedForSystem returns true if the name is reserved for the system +func IsNameReservedForSystem(name string) bool { + return strings.HasPrefix(name, "sys-") +} diff --git a/server/workflow_template_server.go b/server/workflow_template_server.go index 4f39e1c9..abe19425 100644 --- a/server/workflow_template_server.go +++ b/server/workflow_template_server.go @@ -54,6 +54,11 @@ func (s *WorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, req if err != nil || !allowed { return nil, err } + + if IsNameReservedForSystem(req.WorkflowTemplate.Name) { + return nil, v1.NameReservedForSystemError() + } + workflowTemplate := &v1.WorkflowTemplate{ Name: req.WorkflowTemplate.Name, Manifest: req.WorkflowTemplate.Manifest, @@ -63,6 +68,7 @@ func (s *WorkflowTemplateServer) CreateWorkflowTemplate(ctx context.Context, req if err != nil { return nil, err } + req.WorkflowTemplate.Uid = workflowTemplate.UID req.WorkflowTemplate.Version = workflowTemplate.Version diff --git a/server/workspace_template_server.go b/server/workspace_template_server.go index d391042c..85696ce3 100644 --- a/server/workspace_template_server.go +++ b/server/workspace_template_server.go @@ -78,6 +78,10 @@ func (s *WorkspaceTemplateServer) CreateWorkspaceTemplate(ctx context.Context, r return nil, err } + if IsNameReservedForSystem(req.WorkspaceTemplate.Name) { + return nil, v1.NameReservedForSystemError() + } + workspaceTemplate := &v1.WorkspaceTemplate{ Namespace: req.Namespace, Name: req.WorkspaceTemplate.Name, From daa2c39db642c47e7cc03c6712080fb03be80940 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 10:20:05 -0800 Subject: [PATCH 74/80] fix: fix existing workspace templates to add sys- prefix, including argo workflow templates. --- ...3459_update_workspace_template_prefixes.go | 177 ++++++++++++++++++ db/go/db.go | 1 + pkg/workspace_template.go | 9 +- 3 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 db/go/20201214133459_update_workspace_template_prefixes.go diff --git a/db/go/20201214133459_update_workspace_template_prefixes.go b/db/go/20201214133459_update_workspace_template_prefixes.go new file mode 100644 index 00000000..15b1362c --- /dev/null +++ b/db/go/20201214133459_update_workspace_template_prefixes.go @@ -0,0 +1,177 @@ +package migration + +import ( + "database/sql" + "errors" + "fmt" + v1 "github.com/onepanelio/core/pkg" + "github.com/onepanelio/core/pkg/util/label" + "github.com/pressly/goose" +) + +func initialize20201214133459() { + if _, ok := initializedMigrations[20201214133459]; !ok { + goose.AddMigration(Up20201214133459, Down20201214133459) + initializedMigrations[20201214133459] = true + } +} + +func Up20201214133459(tx *sql.Tx) error { + // This code is executed when the migration is applied. + client, err := getClient() + if err != nil { + return err + } + defer client.DB.Close() + + rows, err := tx.Query(` + SELECT namespace, name, uid + FROM workflow_templates + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + ) AND uid NOT LIKE 'sys-%' + `) + if err != nil { + return err + } + defer rows.Close() + + workflowTemplates := make([]v1.WorkflowTemplate, 0) + for rows.Next() { + namespace := "" + name := "" + uid := "" + if err := rows.Scan(&namespace, &name, &uid); err != nil { + return err + } + + workflowTemplates = append(workflowTemplates, v1.WorkflowTemplate{ + Namespace: namespace, + Name: name, + UID: uid, + }) + } + + for _, workflowTemplate := range workflowTemplates { + labelSelect := fmt.Sprintf("%v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) + workflowTemplates, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).List(v1.ListOptions{ + LabelSelector: labelSelect, + }) + if err != nil { + return err + } + + templates := workflowTemplates.Items + if templates.Len() == 0 { + return fmt.Errorf("argo workflowtemplate not found for label: %v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) + } + + for _, argoTemplate := range templates { + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID + + if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { + return err + } + } + } + + _, err = tx.Exec(` + UPDATE workflow_templates + SET name = CONCAT('sys-', name), + uid = CONCAT('sys-', uid) + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + )`) + if err != nil { + return err + } + + return err +} + +func Down20201214133459(tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + client, err := getClient() + if err != nil { + return err + } + defer client.DB.Close() + + _, err = tx.Exec(` + UPDATE workflow_templates + SET name = substring(name from 5), + uid = substring(uid from 5) + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + ) AND name LIKE 'sys-%'`) + if err != nil { + return err + } + + rows, err := tx.Query(` + SELECT namespace, name, uid + FROM workflow_templates + WHERE id IN ( + SELECT workflow_template_id + FROM workspace_templates + ) AND uid LIKE 'sys-%' + `) + if err != nil { + return err + } + defer rows.Close() + + workflowTemplates := make([]v1.WorkflowTemplate, 0) + for rows.Next() { + namespace := "" + name := "" + uid := "" + if err := rows.Scan(&namespace, &name, &uid); err != nil { + return err + } + + workflowTemplates = append(workflowTemplates, v1.WorkflowTemplate{ + Namespace: namespace, + Name: name, + UID: uid, + }) + } + + for _, workflowTemplate := range workflowTemplates { + labelSelect := fmt.Sprintf("%v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) + workflowTemplates, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).List(v1.ListOptions{ + LabelSelector: labelSelect, + }) + if err != nil { + return err + } + + templates := workflowTemplates.Items + if templates.Len() == 0 { + return errors.New("not found") + } + + for _, argoTemplate := range templates { + // Remove sys- prefix + workflowTemplate.Name = workflowTemplate.Name[4:] + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID + + if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { + return err + } + } + } + + return err +} diff --git a/db/go/db.go b/db/go/db.go index 570bdd97..7bfdfb05 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -78,6 +78,7 @@ func Initialize() { initialize20201209124226() initialize20201211161117() initialize20201214133458() + initialize20201214133459() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err) diff --git a/pkg/workspace_template.go b/pkg/workspace_template.go index c0ff2aad..e5994b64 100644 --- a/pkg/workspace_template.go +++ b/pkg/workspace_template.go @@ -1088,13 +1088,20 @@ func (c *Client) UpdateWorkspaceTemplate(namespace string, workspaceTemplate *Wo workspaceTemplate.ID = existingWorkspaceTemplate.ID workspaceTemplate.Name = existingWorkspaceTemplate.UID workspaceTemplate.Namespace = existingWorkspaceTemplate.Namespace + workspaceTemplate.WorkflowTemplateID = existingWorkspaceTemplate.WorkflowTemplateID + + existingWorkflowTemplate, err := c.getWorkflowTemplateById(workspaceTemplate.WorkflowTemplateID) + if err != nil { + return nil, err + } updatedWorkflowTemplate, err := c.generateWorkspaceTemplateWorkflowTemplate(workspaceTemplate) if err != nil { return nil, err } updatedWorkflowTemplate.ID = existingWorkspaceTemplate.WorkflowTemplate.ID - updatedWorkflowTemplate.UID = existingWorkspaceTemplate.WorkflowTemplate.UID + updatedWorkflowTemplate.UID = existingWorkflowTemplate.UID + updatedWorkflowTemplate.Name = existingWorkflowTemplate.Name updatedWorkflowTemplate.Labels = workspaceTemplate.Labels workflowTemplateVersion, err := c.CreateWorkflowTemplateVersion(namespace, updatedWorkflowTemplate) From 59f214d5718d62d6c4c72b68e21ca6bfddc13a94 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:24:31 -0800 Subject: [PATCH 75/80] fix: long names for existing system workflow templates --- db/go/20201214133459_update_workspace_template_prefixes.go | 3 +++ pkg/util/uid/uid.go | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/db/go/20201214133459_update_workspace_template_prefixes.go b/db/go/20201214133459_update_workspace_template_prefixes.go index 15b1362c..39e1dd0b 100644 --- a/db/go/20201214133459_update_workspace_template_prefixes.go +++ b/db/go/20201214133459_update_workspace_template_prefixes.go @@ -69,6 +69,9 @@ func Up20201214133459(tx *sql.Tx) error { for _, argoTemplate := range templates { workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if len(workflowTemplate.Name) > 30 { + workflowTemplate.Name = workflowTemplate.Name[:30] + } if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { return err } diff --git a/pkg/util/uid/uid.go b/pkg/util/uid/uid.go index 0ec602e4..f2e9e07d 100644 --- a/pkg/util/uid/uid.go +++ b/pkg/util/uid/uid.go @@ -7,11 +7,13 @@ import ( "strings" ) +// GenerateUID converts an input string to a uid friendly version where we have all lowercase letters and dashes instead of spaces +// If the max is exceeded, an error is returned func GenerateUID(input string, max int) (string, error) { re, _ := regexp.Compile(`[^a-zA-Z0-9-]{1,}`) cleanUp := strings.ToLower(re.ReplaceAllString(input, `-`)) if len(cleanUp) > max { - return "", errors.New(fmt.Sprintf("Length of string exceeds %d", max)) + return "", errors.New(fmt.Sprintf("Length of string '%s' exceeds %d", input, max)) } return strings.ToLower(re.ReplaceAllString(input, `-`)), nil } From 9c3d55fad58bbeaea4d041fb31800273c2924e04 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:37:40 -0800 Subject: [PATCH 76/80] fix: issue where workflow template name kept adding `sys-` prefix. --- ...14133459_update_workspace_template_prefixes.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/db/go/20201214133459_update_workspace_template_prefixes.go b/db/go/20201214133459_update_workspace_template_prefixes.go index 39e1dd0b..efabce56 100644 --- a/db/go/20201214133459_update_workspace_template_prefixes.go +++ b/db/go/20201214133459_update_workspace_template_prefixes.go @@ -67,14 +67,15 @@ func Up20201214133459(tx *sql.Tx) error { return fmt.Errorf("argo workflowtemplate not found for label: %v=%v", label.WorkflowTemplateUid, workflowTemplate.UID) } + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if len(workflowTemplate.Name) > 30 { + workflowTemplate.Name = workflowTemplate.Name[:30] + } + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + for _, argoTemplate := range templates { - workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) - if len(workflowTemplate.Name) > 30 { - workflowTemplate.Name = workflowTemplate.Name[:30] - } - if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { - return err - } argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { From 85809155c21645c617d49a608ed7686df3bf1fdf Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:47:00 -0800 Subject: [PATCH 77/80] fix: changed uid to use fmt.errorf instead of errors.new - this simplifies the code a little. --- pkg/util/uid/uid.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/util/uid/uid.go b/pkg/util/uid/uid.go index f2e9e07d..c3af4049 100644 --- a/pkg/util/uid/uid.go +++ b/pkg/util/uid/uid.go @@ -1,7 +1,6 @@ package uid import ( - "errors" "fmt" "regexp" "strings" @@ -13,7 +12,7 @@ func GenerateUID(input string, max int) (string, error) { re, _ := regexp.Compile(`[^a-zA-Z0-9-]{1,}`) cleanUp := strings.ToLower(re.ReplaceAllString(input, `-`)) if len(cleanUp) > max { - return "", errors.New(fmt.Sprintf("Length of string '%s' exceeds %d", input, max)) + return "", fmt.Errorf("length of string '%s' (%d) exceeds %d", input, len(input), max) } return strings.ToLower(re.ReplaceAllString(input, `-`)), nil } From b5f8d873f137c0a7d374af479d71d29d56ad1790 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 12:47:18 -0800 Subject: [PATCH 78/80] fix: removing sys- prefix multiple times in down migration --- ...14133459_update_workspace_template_prefixes.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/db/go/20201214133459_update_workspace_template_prefixes.go b/db/go/20201214133459_update_workspace_template_prefixes.go index efabce56..2a4a1e46 100644 --- a/db/go/20201214133459_update_workspace_template_prefixes.go +++ b/db/go/20201214133459_update_workspace_template_prefixes.go @@ -16,6 +16,7 @@ func initialize20201214133459() { } } +// Up20201214133459 updates the argo template labels func Up20201214133459(tx *sql.Tx) error { // This code is executed when the migration is applied. client, err := getClient() @@ -99,6 +100,7 @@ func Up20201214133459(tx *sql.Tx) error { return err } +// Down20201214133459 reverts the argo template label updates func Down20201214133459(tx *sql.Tx) error { // This code is executed when the migration is rolled back. client, err := getClient() @@ -162,13 +164,14 @@ func Down20201214133459(tx *sql.Tx) error { return errors.New("not found") } + // Remove sys- prefix + workflowTemplate.Name = workflowTemplate.Name[4:] + workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) + if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { + return err + } + for _, argoTemplate := range templates { - // Remove sys- prefix - workflowTemplate.Name = workflowTemplate.Name[4:] - workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) - if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { - return err - } argoTemplate.Labels[label.WorkflowTemplateUid] = workflowTemplate.UID if _, err := client.ArgoprojV1alpha1().WorkflowTemplates(workflowTemplate.Namespace).Update(&argoTemplate); err != nil { From c4e792abfc87c15f9229d9348d05e36b9dad166e Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 3 Dec 2020 13:15:00 -0800 Subject: [PATCH 79/80] fix: bug adding sys name back in in down migration --- db/go/20201214133459_update_workspace_template_prefixes.go | 1 - 1 file changed, 1 deletion(-) diff --git a/db/go/20201214133459_update_workspace_template_prefixes.go b/db/go/20201214133459_update_workspace_template_prefixes.go index 2a4a1e46..c6308fb5 100644 --- a/db/go/20201214133459_update_workspace_template_prefixes.go +++ b/db/go/20201214133459_update_workspace_template_prefixes.go @@ -166,7 +166,6 @@ func Down20201214133459(tx *sql.Tx) error { // Remove sys- prefix workflowTemplate.Name = workflowTemplate.Name[4:] - workflowTemplate.Name = v1.ConvertToSystemName(workflowTemplate.Name) if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil { return err } From 643f8a511b906b21a6c7d14899d1d7d8ccaeea32 Mon Sep 17 00:00:00 2001 From: Andrey Melnikov Date: Thu, 24 Dec 2020 11:33:55 -0800 Subject: [PATCH 80/80] fix: updated migration timestamp as other migrations have been created recently. --- ...191654_update_workspace_template_prefixes.go} | 16 ++++++++-------- db/go/db.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) rename db/go/{20201214133459_update_workspace_template_prefixes.go => 20201224191654_update_workspace_template_prefixes.go} (91%) diff --git a/db/go/20201214133459_update_workspace_template_prefixes.go b/db/go/20201224191654_update_workspace_template_prefixes.go similarity index 91% rename from db/go/20201214133459_update_workspace_template_prefixes.go rename to db/go/20201224191654_update_workspace_template_prefixes.go index c6308fb5..2214fb68 100644 --- a/db/go/20201214133459_update_workspace_template_prefixes.go +++ b/db/go/20201224191654_update_workspace_template_prefixes.go @@ -9,15 +9,15 @@ import ( "github.com/pressly/goose" ) -func initialize20201214133459() { - if _, ok := initializedMigrations[20201214133459]; !ok { - goose.AddMigration(Up20201214133459, Down20201214133459) - initializedMigrations[20201214133459] = true +func initialize20201224191654() { + if _, ok := initializedMigrations[20201224191654]; !ok { + goose.AddMigration(Up20201224191654, Down20201224191654) + initializedMigrations[20201224191654] = true } } -// Up20201214133459 updates the argo template labels -func Up20201214133459(tx *sql.Tx) error { +// Up20201224191654 updates the argo template labels +func Up20201224191654(tx *sql.Tx) error { // This code is executed when the migration is applied. client, err := getClient() if err != nil { @@ -100,8 +100,8 @@ func Up20201214133459(tx *sql.Tx) error { return err } -// Down20201214133459 reverts the argo template label updates -func Down20201214133459(tx *sql.Tx) error { +// Down20201224191654 reverts the argo template label updates +func Down20201224191654(tx *sql.Tx) error { // This code is executed when the migration is rolled back. client, err := getClient() if err != nil { diff --git a/db/go/db.go b/db/go/db.go index 7bfdfb05..7d2a0551 100644 --- a/db/go/db.go +++ b/db/go/db.go @@ -78,7 +78,7 @@ func Initialize() { initialize20201209124226() initialize20201211161117() initialize20201214133458() - initialize20201214133459() + initialize20201224191654() if err := client.DB.Close(); err != nil { log.Printf("[error] closing db %v", err)