update: workflow versions are db records again to more easily store custom user manifest and parameters

This commit is contained in:
Andrey Melnikov
2020-04-22 12:18:39 -07:00
parent b380fa68e9
commit fd686a0672
20 changed files with 3329 additions and 6253 deletions

View File

@@ -1,86 +1,45 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: api.proto // source: api.proto
package api package api
import ( import (
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" math "math"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
) )
const ( // Reference imports to suppress errors if they are not otherwise used.
// Verify that this generated code is sufficiently up-to-date. var _ = proto.Marshal
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) var _ = fmt.Errorf
// Verify that runtime/protoimpl is sufficiently up-to-date. var _ = math.Inf
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version // This is a compile-time assertion to ensure that this generated file
// of the legacy proto package is being used. // is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion4 // A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
var File_api_proto protoreflect.FileDescriptor func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var file_api_proto_rawDesc = []byte{ var fileDescriptor_00212fb1f9d3bf1c = []byte{
0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, // 265 bytes of a gzipped FileDescriptorProto
0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x4b, 0xf4, 0x40,
0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x10, 0x87, 0xdf, 0x77, 0x85, 0x43, 0x57, 0x4f, 0x64, 0xc1, 0xc2, 0xab, 0x96, 0xab, 0x44, 0x2e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8b, 0xd9, 0xbb, 0xb3, 0x09, 0x11, 0x8b, 0x9c, 0x85, 0x5c, 0xa5, 0xb5, 0xdd, 0x64, 0x1d, 0x93, 0x3d,
0x02, 0x92, 0x41, 0x87, 0x02, 0x12, 0x74, 0x0a, 0x0d, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0xe3, 0xce, 0xb2, 0x99, 0xe0, 0x9f, 0x2f, 0x60, 0x61, 0xe7, 0x27, 0x16, 0x92, 0x43, 0x10, 0xed,
0x6c, 0x20, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x19, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x9e, 0x99, 0x79, 0x66, 0x18, 0x7e, 0x72, 0x0f, 0x82, 0x4b, 0x43, 0x24, 0x26, 0xb5, 0x03, 0xc1,
0x20, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x41, 0x50, 0x4d, 0x66, 0x3d, 0xdb, 0xa4, 0x42, 0x9f, 0xb4, 0xcf, 0x50, 0x55, 0x18, 0x0d, 0x05, 0x76, 0xe4,
0x49, 0x22, 0x3b, 0x0a, 0x15, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x20, 0x43, 0x6f, 0x5b, 0x03, 0xde, 0x13, 0x43, 0xcf, 0xc3, 0xca, 0xea, 0x43, 0x7c, 0x16, 0xef, 0x42, 0xb1, 0x1c,
0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, 0x74, 0x74, 0x70, 0xdf, 0x78, 0x0c, 0xe0, 0xb1, 0xd1, 0x57, 0x14, 0x51, 0x9d, 0xfc, 0x28, 0x75, 0x88, 0xb4, 0x41,
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0xcb, 0xba, 0xb8, 0x5d, 0x4f, 0x2f, 0xe4, 0xf1, 0x9f, 0x43, 0x35, 0xad, 0x99, 0x43, 0x9b, 0x1b,
0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x32, 0x0b, 0x53, 0x39, 0xae, 0xbb, 0x32, 0xb5, 0xf4, 0x64, 0x68, 0x6b, 0x3a, 0x32, 0x96, 0x22, 0x2e, 0xf7,
0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x17, 0xe9, 0x3c, 0x9d, 0x27, 0x25, 0x32, 0x2c, 0x26, 0x87, 0x0d, 0x59, 0x68, 0x6a, 0x6a, 0x39,
0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x38, 0x38, 0x38, 0x2a, 0x02, 0x01, 0x02, 0x32, 0xcf, 0xb2, 0x2c, 0x3b, 0x13, 0xff, 0xc5, 0xf2, 0x08, 0x42, 0x68, 0x9c, 0xed, 0x9f, 0x34, 0x9b,
0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x96, 0x7c, 0xfe, 0xab, 0x73, 0xb7, 0x96, 0xd7, 0x72, 0xb4, 0x42, 0x88, 0x18, 0xd5, 0xe5, 0xae,
0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x50, 0xa7, 0x45, 0xc7, 0x35, 0x7a, 0xde, 0x4a, 0x9a, 0xe9, 0x11, 0xfd, 0x4c, 0x87, 0x88, 0x0f,
0x73, 0x6f, 0x6e, 0x5a, 0x49, 0x0a, 0x47, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0xee, 0x05, 0xef, 0x75, 0xf9, 0xaa, 0x07, 0x7b, 0x32, 0x86, 0x8e, 0x6b, 0x8a, 0xee, 0x6d, 0x10,
0x3d, 0x08, 0x02, 0x12, 0x28, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x45, 0x79, 0x20, 0xe5, 0xf7, 0xa9, 0x7f, 0xe5, 0xa8, 0x0f, 0xe5, 0xfc, 0x2b, 0x00, 0x00, 0xff,
0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0xff, 0x51, 0x1b, 0x37, 0x84, 0x54, 0x01, 0x00, 0x00,
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
} }

View File

@@ -30,12 +30,6 @@
"schema": { "schema": {
"properties": {} "properties": {}
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -62,12 +56,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListNamespacesResponse" "$ref": "#/definitions/ListNamespacesResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -104,12 +92,6 @@
"schema": { "schema": {
"$ref": "#/definitions/Namespace" "$ref": "#/definitions/Namespace"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -136,12 +118,6 @@
"schema": { "schema": {
"$ref": "#/definitions/CronWorkflow" "$ref": "#/definitions/CronWorkflow"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -174,12 +150,6 @@
"schema": { "schema": {
"$ref": "#/definitions/CronWorkflow" "$ref": "#/definitions/CronWorkflow"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -208,12 +178,6 @@
"schema": { "schema": {
"$ref": "#/definitions/CronWorkflow" "$ref": "#/definitions/CronWorkflow"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -252,12 +216,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListCronWorkflowsResponse" "$ref": "#/definitions/ListCronWorkflowsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -302,12 +260,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -336,12 +288,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -378,12 +324,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -422,12 +362,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -464,12 +398,6 @@
"schema": { "schema": {
"properties": {} "properties": {}
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -500,12 +428,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListCronWorkflowsResponse" "$ref": "#/definitions/ListCronWorkflowsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -550,12 +472,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListSecretsResponse" "$ref": "#/definitions/ListSecretsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -578,12 +494,6 @@
"schema": { "schema": {
"properties": {} "properties": {}
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -616,12 +526,6 @@
"schema": { "schema": {
"$ref": "#/definitions/Secret" "$ref": "#/definitions/Secret"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -650,12 +554,6 @@
"schema": { "schema": {
"$ref": "#/definitions/DeleteSecretResponse" "$ref": "#/definitions/DeleteSecretResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -686,12 +584,6 @@
"schema": { "schema": {
"$ref": "#/definitions/SecretExistsResponse" "$ref": "#/definitions/SecretExistsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -722,12 +614,6 @@
"schema": { "schema": {
"$ref": "#/definitions/AddSecretKeyValueResponse" "$ref": "#/definitions/AddSecretKeyValueResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -764,12 +650,6 @@
"schema": { "schema": {
"$ref": "#/definitions/UpdateSecretKeyValueResponse" "$ref": "#/definitions/UpdateSecretKeyValueResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -808,12 +688,6 @@
"schema": { "schema": {
"$ref": "#/definitions/DeleteSecretKeyResponse" "$ref": "#/definitions/DeleteSecretKeyResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -850,12 +724,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListWorkflowExecutionsResponse" "$ref": "#/definitions/ListWorkflowExecutionsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -897,6 +765,7 @@
] ]
}, },
"post": { "post": {
"summary": "Creates a Workflow",
"operationId": "CreateWorkflowExecution", "operationId": "CreateWorkflowExecution",
"responses": { "responses": {
"200": { "200": {
@@ -904,12 +773,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowExecution" "$ref": "#/definitions/WorkflowExecution"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -942,12 +805,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowExecution" "$ref": "#/definitions/WorkflowExecution"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -978,12 +835,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ArtifactResponse" "$ref": "#/definitions/ArtifactResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1020,12 +871,6 @@
"schema": { "schema": {
"properties": {} "properties": {}
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1063,12 +908,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListFilesResponse" "$ref": "#/definitions/ListFilesResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1105,12 +944,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1139,12 +972,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1181,12 +1008,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1225,12 +1046,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1265,22 +1080,7 @@
"200": { "200": {
"description": "A successful response.(streaming responses)", "description": "A successful response.(streaming responses)",
"schema": { "schema": {
"type": "object", "$ref": "#/x-stream-definitions/LogEntry"
"properties": {
"result": {
"$ref": "#/definitions/LogEntry"
},
"error": {
"$ref": "#/definitions/grpc.gateway.runtime.StreamError"
}
},
"title": "Stream result of LogEntry"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
} }
} }
}, },
@@ -1324,12 +1124,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetWorkflowExecutionMetricsResponse" "$ref": "#/definitions/GetWorkflowExecutionMetricsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1366,12 +1160,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowExecution" "$ref": "#/definitions/WorkflowExecution"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1402,12 +1190,6 @@
"schema": { "schema": {
"properties": {} "properties": {}
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1446,12 +1228,6 @@
"schema": { "schema": {
"properties": {} "properties": {}
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1480,22 +1256,7 @@
"200": { "200": {
"description": "A successful response.(streaming responses)", "description": "A successful response.(streaming responses)",
"schema": { "schema": {
"type": "object", "$ref": "#/x-stream-definitions/WorkflowExecution"
"properties": {
"result": {
"$ref": "#/definitions/WorkflowExecution"
},
"error": {
"$ref": "#/definitions/grpc.gateway.runtime.StreamError"
}
},
"title": "Stream result of WorkflowExecution"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
} }
} }
}, },
@@ -1527,12 +1288,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListWorkflowTemplatesResponse" "$ref": "#/definitions/ListWorkflowTemplatesResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1555,12 +1310,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1593,12 +1342,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1618,8 +1361,8 @@
"name": "version", "name": "version",
"in": "query", "in": "query",
"required": false, "required": false,
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
}, },
{ {
"name": "stats.total", "name": "stats.total",
@@ -1668,12 +1411,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1710,12 +1447,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1754,12 +1485,6 @@
"schema": { "schema": {
"$ref": "#/definitions/GetLabelsResponse" "$ref": "#/definitions/GetLabelsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1796,12 +1521,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1821,8 +1540,8 @@
"name": "version", "name": "version",
"in": "query", "in": "query",
"required": false, "required": false,
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
} }
], ],
"tags": [ "tags": [
@@ -1839,12 +1558,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ArchiveWorkflowTemplateResponse" "$ref": "#/definitions/ArchiveWorkflowTemplateResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1875,12 +1588,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1906,8 +1613,8 @@
"name": "version", "name": "version",
"in": "query", "in": "query",
"required": false, "required": false,
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
} }
], ],
"tags": [ "tags": [
@@ -1924,12 +1631,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -1955,8 +1656,8 @@
"name": "version", "name": "version",
"in": "path", "in": "path",
"required": true, "required": true,
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
} }
], ],
"tags": [ "tags": [
@@ -1973,12 +1674,6 @@
"schema": { "schema": {
"$ref": "#/definitions/ListWorkflowTemplateVersionsResponse" "$ref": "#/definitions/ListWorkflowTemplateVersionsResponse"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -2009,12 +1704,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -2034,8 +1723,8 @@
"name": "version", "name": "version",
"in": "path", "in": "path",
"required": true, "required": true,
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
} }
], ],
"tags": [ "tags": [
@@ -2052,12 +1741,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -2096,12 +1779,6 @@
"schema": { "schema": {
"$ref": "#/definitions/WorkflowTemplate" "$ref": "#/definitions/WorkflowTemplate"
} }
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/grpc.gateway.runtime.Error"
}
} }
}, },
"parameters": [ "parameters": [
@@ -2121,8 +1798,8 @@
"name": "workflowTemplate.version", "name": "workflowTemplate.version",
"in": "path", "in": "path",
"required": true, "required": true,
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
}, },
{ {
"name": "body", "name": "body",
@@ -2607,12 +2284,12 @@
"type": "string" "type": "string"
}, },
"version": { "version": {
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
}, },
"versions": { "versions": {
"type": "integer", "type": "string",
"format": "int32" "format": "int64"
}, },
"manifest": { "manifest": {
"type": "string" "type": "string"
@@ -2651,27 +2328,6 @@
}, },
"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\": <string>,\n \"lastName\": <string>\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 }" "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\": <string>,\n \"lastName\": <string>\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"
}
}
}
},
"grpc.gateway.runtime.StreamError": { "grpc.gateway.runtime.StreamError": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -2698,6 +2354,32 @@
} }
} }
}, },
"x-stream-definitions": {
"LogEntry": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/LogEntry"
},
"error": {
"$ref": "#/definitions/grpc.gateway.runtime.StreamError"
}
},
"title": "Stream result of LogEntry"
},
"WorkflowExecution": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/WorkflowExecution"
},
"error": {
"$ref": "#/definitions/grpc.gateway.runtime.StreamError"
}
},
"title": "Stream result of WorkflowExecution"
}
},
"securityDefinitions": { "securityDefinitions": {
"Bearer": { "Bearer": {
"type": "apiKey", "type": "apiKey",

View File

@@ -1,242 +1,142 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: auth.proto // source: auth.proto
package api package api
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty" empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations" _ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" math "math"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( // Reference imports to suppress errors if they are not otherwise used.
// Verify that this generated code is sufficiently up-to-date. var _ = proto.Marshal
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) var _ = fmt.Errorf
// Verify that runtime/protoimpl is sufficiently up-to-date. var _ = math.Inf
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version // This is a compile-time assertion to ensure that this generated file
// of the legacy proto package is being used. // is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion4 // A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type TokenWrapper struct { type TokenWrapper struct {
state protoimpl.MessageState Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
sizeCache protoimpl.SizeCache XXX_NoUnkeyedLiteral struct{} `json:"-"`
unknownFields protoimpl.UnknownFields XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
} }
func (x *TokenWrapper) Reset() { func (m *TokenWrapper) Reset() { *m = TokenWrapper{} }
*x = TokenWrapper{} func (m *TokenWrapper) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*TokenWrapper) ProtoMessage() {}
mi := &file_auth_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TokenWrapper) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TokenWrapper) ProtoMessage() {}
func (x *TokenWrapper) 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 TokenWrapper.ProtoReflect.Descriptor instead.
func (*TokenWrapper) Descriptor() ([]byte, []int) { func (*TokenWrapper) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{0} return fileDescriptor_8bbd6f3875b0e874, []int{0}
} }
func (x *TokenWrapper) GetToken() string { func (m *TokenWrapper) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_TokenWrapper.Unmarshal(m, b)
return x.Token }
func (m *TokenWrapper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TokenWrapper.Marshal(b, m, deterministic)
}
func (m *TokenWrapper) XXX_Merge(src proto.Message) {
xxx_messageInfo_TokenWrapper.Merge(m, src)
}
func (m *TokenWrapper) XXX_Size() int {
return xxx_messageInfo_TokenWrapper.Size(m)
}
func (m *TokenWrapper) XXX_DiscardUnknown() {
xxx_messageInfo_TokenWrapper.DiscardUnknown(m)
}
var xxx_messageInfo_TokenWrapper proto.InternalMessageInfo
func (m *TokenWrapper) GetToken() string {
if m != nil {
return m.Token
} }
return "" return ""
} }
type IsValidTokenRequest struct { type IsValidTokenRequest struct {
state protoimpl.MessageState Token *TokenWrapper `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
sizeCache protoimpl.SizeCache XXX_NoUnkeyedLiteral struct{} `json:"-"`
unknownFields protoimpl.UnknownFields XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Token *TokenWrapper `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
} }
func (x *IsValidTokenRequest) Reset() { func (m *IsValidTokenRequest) Reset() { *m = IsValidTokenRequest{} }
*x = IsValidTokenRequest{} func (m *IsValidTokenRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*IsValidTokenRequest) ProtoMessage() {}
mi := &file_auth_proto_msgTypes[1]
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[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 IsValidTokenRequest.ProtoReflect.Descriptor instead.
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) { func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{1} return fileDescriptor_8bbd6f3875b0e874, []int{1}
} }
func (x *IsValidTokenRequest) GetToken() *TokenWrapper { func (m *IsValidTokenRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_IsValidTokenRequest.Unmarshal(m, b)
return x.Token }
func (m *IsValidTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IsValidTokenRequest.Marshal(b, m, deterministic)
}
func (m *IsValidTokenRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_IsValidTokenRequest.Merge(m, src)
}
func (m *IsValidTokenRequest) XXX_Size() int {
return xxx_messageInfo_IsValidTokenRequest.Size(m)
}
func (m *IsValidTokenRequest) XXX_DiscardUnknown() {
xxx_messageInfo_IsValidTokenRequest.DiscardUnknown(m)
}
var xxx_messageInfo_IsValidTokenRequest proto.InternalMessageInfo
func (m *IsValidTokenRequest) GetToken() *TokenWrapper {
if m != nil {
return m.Token
} }
return nil return nil
} }
var File_auth_proto protoreflect.FileDescriptor func init() {
proto.RegisterType((*TokenWrapper)(nil), "api.TokenWrapper")
var file_auth_proto_rawDesc = []byte{ proto.RegisterType((*IsValidTokenRequest)(nil), "api.IsValidTokenRequest")
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,
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, 0x24, 0x0a, 0x0c,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x22, 0x3e, 0x0a, 0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x32, 0x78, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x69, 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, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 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, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
} }
var ( func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }
file_auth_proto_rawDescOnce sync.Once
file_auth_proto_rawDescData = file_auth_proto_rawDesc
)
func file_auth_proto_rawDescGZIP() []byte { var fileDescriptor_8bbd6f3875b0e874 = []byte{
file_auth_proto_rawDescOnce.Do(func() { // 228 bytes of a gzipped FileDescriptorProto
file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData) 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2c, 0x2d, 0xc9,
}) 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4e, 0x2c, 0xc8, 0x94, 0x92, 0x49, 0xcf, 0xcf,
return file_auth_proto_rawDescData 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9,
} 0xcc, 0xcf, 0x2b, 0x86, 0x28, 0x91, 0x92, 0x86, 0xca, 0x82, 0x79, 0x49, 0xa5, 0x69, 0xfa, 0xa9,
0xb9, 0x05, 0x25, 0x95, 0x10, 0x49, 0x25, 0x15, 0x2e, 0x9e, 0x90, 0xfc, 0xec, 0xd4, 0xbc, 0xf0,
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 0xa2, 0xc4, 0x82, 0x82, 0xd4, 0x22, 0x21, 0x11, 0x2e, 0xd6, 0x12, 0x10, 0x5f, 0x82, 0x51, 0x81,
var file_auth_proto_goTypes = []interface{}{ 0x51, 0x83, 0x33, 0x08, 0xc2, 0x51, 0xb2, 0xe3, 0x12, 0xf6, 0x2c, 0x0e, 0x4b, 0xcc, 0xc9, 0x4c,
(*TokenWrapper)(nil), // 0: api.TokenWrapper 0x01, 0x2b, 0x0e, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x52, 0x47, 0x56, 0xcc, 0x6d, 0x24,
(*IsValidTokenRequest)(nil), // 1: api.IsValidTokenRequest 0xa8, 0x97, 0x58, 0x90, 0xa9, 0x87, 0x6c, 0x1c, 0x54, 0xbf, 0x51, 0x05, 0x17, 0xb7, 0x63, 0x69,
(*empty.Empty)(nil), // 2: google.protobuf.Empty 0x49, 0x46, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x50, 0x26, 0x17, 0x0f, 0xb2, 0x71, 0x42,
} 0x12, 0x60, 0x8d, 0x58, 0x6c, 0x90, 0x12, 0xd3, 0x83, 0x38, 0x5e, 0x0f, 0xe6, 0x78, 0x3d, 0x57,
var file_auth_proto_depIdxs = []int32{ 0x90, 0xe3, 0x95, 0xd4, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0xa4, 0xa8, 0x24, 0x01, 0xf2, 0x73, 0xb1,
0, // 0: api.IsValidTokenRequest.token:type_name -> api.TokenWrapper 0x7e, 0x99, 0x61, 0x52, 0x6a, 0x49, 0xa2, 0xa1, 0x3e, 0x28, 0x60, 0xf4, 0xc1, 0x56, 0x5a, 0x41,
1, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest 0x6c, 0x4e, 0x62, 0x03, 0x6b, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xdc, 0xc7, 0x76,
2, // 2: api.AuthService.IsValidToken:output_type -> google.protobuf.Empty 0x34, 0x01, 0x00, 0x00,
2, // [2:3] is the sub-list for method output_type
1, // [1:2] 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.(*TokenWrapper); 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.(*IsValidTokenRequest); 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: 2,
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. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConnInterface var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6 const _ = grpc.SupportPackageIsVersion4
// AuthServiceClient is the client API for AuthService service. // AuthServiceClient is the client API for AuthService service.
// //
@@ -246,10 +146,10 @@ type AuthServiceClient interface {
} }
type authServiceClient struct { type authServiceClient struct {
cc grpc.ClientConnInterface cc *grpc.ClientConn
} }
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient {
return &authServiceClient{cc} return &authServiceClient{cc}
} }
@@ -271,7 +171,7 @@ type AuthServiceServer interface {
type UnimplementedAuthServiceServer struct { type UnimplementedAuthServiceServer struct {
} }
func (*UnimplementedAuthServiceServer) IsValidToken(context.Context, *IsValidTokenRequest) (*empty.Empty, error) { func (*UnimplementedAuthServiceServer) IsValidToken(ctx context.Context, req *IsValidTokenRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented") return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented")
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,605 +1,390 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: label.proto // source: label.proto
package api package api
import ( import (
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" math "math"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( // Reference imports to suppress errors if they are not otherwise used.
// Verify that this generated code is sufficiently up-to-date. var _ = proto.Marshal
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) var _ = fmt.Errorf
// Verify that runtime/protoimpl is sufficiently up-to-date. var _ = math.Inf
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version // This is a compile-time assertion to ensure that this generated file
// of the legacy proto package is being used. // is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion4 // A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type KeyValue struct { type KeyValue struct {
state protoimpl.MessageState Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
sizeCache protoimpl.SizeCache Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_sizecache int32 `json:"-"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
} }
func (x *KeyValue) Reset() { func (m *KeyValue) Reset() { *m = KeyValue{} }
*x = KeyValue{} func (m *KeyValue) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*KeyValue) ProtoMessage() {}
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) { func (*KeyValue) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{0} return fileDescriptor_6100d2b5ae808f16, []int{0}
} }
func (x *KeyValue) GetKey() string { func (m *KeyValue) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_KeyValue.Unmarshal(m, b)
return x.Key }
func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic)
}
func (m *KeyValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyValue.Merge(m, src)
}
func (m *KeyValue) XXX_Size() int {
return xxx_messageInfo_KeyValue.Size(m)
}
func (m *KeyValue) XXX_DiscardUnknown() {
xxx_messageInfo_KeyValue.DiscardUnknown(m)
}
var xxx_messageInfo_KeyValue proto.InternalMessageInfo
func (m *KeyValue) GetKey() string {
if m != nil {
return m.Key
} }
return "" return ""
} }
func (x *KeyValue) GetValue() string { func (m *KeyValue) GetValue() string {
if x != nil { if m != nil {
return x.Value return m.Value
} }
return "" return ""
} }
type Labels struct { type Labels struct {
state protoimpl.MessageState Items []*KeyValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
sizeCache protoimpl.SizeCache XXX_NoUnkeyedLiteral struct{} `json:"-"`
unknownFields protoimpl.UnknownFields XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Items []*KeyValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
} }
func (x *Labels) Reset() { func (m *Labels) Reset() { *m = Labels{} }
*x = Labels{} func (m *Labels) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*Labels) ProtoMessage() {}
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) { func (*Labels) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{1} return fileDescriptor_6100d2b5ae808f16, []int{1}
} }
func (x *Labels) GetItems() []*KeyValue { func (m *Labels) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_Labels.Unmarshal(m, b)
return x.Items }
func (m *Labels) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Labels.Marshal(b, m, deterministic)
}
func (m *Labels) XXX_Merge(src proto.Message) {
xxx_messageInfo_Labels.Merge(m, src)
}
func (m *Labels) XXX_Size() int {
return xxx_messageInfo_Labels.Size(m)
}
func (m *Labels) XXX_DiscardUnknown() {
xxx_messageInfo_Labels.DiscardUnknown(m)
}
var xxx_messageInfo_Labels proto.InternalMessageInfo
func (m *Labels) GetItems() []*KeyValue {
if m != nil {
return m.Items
} }
return nil return nil
} }
type AddLabelsRequest struct { type AddLabelsRequest struct {
state protoimpl.MessageState Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
sizeCache protoimpl.SizeCache Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` XXX_unrecognized []byte `json:"-"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` XXX_sizecache int32 `json:"-"`
Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
} }
func (x *AddLabelsRequest) Reset() { func (m *AddLabelsRequest) Reset() { *m = AddLabelsRequest{} }
*x = AddLabelsRequest{} func (m *AddLabelsRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*AddLabelsRequest) ProtoMessage() {}
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) { func (*AddLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{2} return fileDescriptor_6100d2b5ae808f16, []int{2}
} }
func (x *AddLabelsRequest) GetNamespace() string { func (m *AddLabelsRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_AddLabelsRequest.Unmarshal(m, b)
return x.Namespace }
func (m *AddLabelsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AddLabelsRequest.Marshal(b, m, deterministic)
}
func (m *AddLabelsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AddLabelsRequest.Merge(m, src)
}
func (m *AddLabelsRequest) XXX_Size() int {
return xxx_messageInfo_AddLabelsRequest.Size(m)
}
func (m *AddLabelsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AddLabelsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AddLabelsRequest proto.InternalMessageInfo
func (m *AddLabelsRequest) GetNamespace() string {
if m != nil {
return m.Namespace
} }
return "" return ""
} }
func (x *AddLabelsRequest) GetName() string { func (m *AddLabelsRequest) GetName() string {
if x != nil { if m != nil {
return x.Name return m.Name
} }
return "" return ""
} }
func (x *AddLabelsRequest) GetLabels() *Labels { func (m *AddLabelsRequest) GetLabels() *Labels {
if x != nil { if m != nil {
return x.Labels return m.Labels
} }
return nil return nil
} }
type ReplaceLabelsRequest struct { type ReplaceLabelsRequest struct {
state protoimpl.MessageState Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
sizeCache protoimpl.SizeCache Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` XXX_unrecognized []byte `json:"-"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` XXX_sizecache int32 `json:"-"`
Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
} }
func (x *ReplaceLabelsRequest) Reset() { func (m *ReplaceLabelsRequest) Reset() { *m = ReplaceLabelsRequest{} }
*x = ReplaceLabelsRequest{} func (m *ReplaceLabelsRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*ReplaceLabelsRequest) ProtoMessage() {}
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) { func (*ReplaceLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{3} return fileDescriptor_6100d2b5ae808f16, []int{3}
} }
func (x *ReplaceLabelsRequest) GetNamespace() string { func (m *ReplaceLabelsRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_ReplaceLabelsRequest.Unmarshal(m, b)
return x.Namespace }
func (m *ReplaceLabelsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplaceLabelsRequest.Marshal(b, m, deterministic)
}
func (m *ReplaceLabelsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplaceLabelsRequest.Merge(m, src)
}
func (m *ReplaceLabelsRequest) XXX_Size() int {
return xxx_messageInfo_ReplaceLabelsRequest.Size(m)
}
func (m *ReplaceLabelsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReplaceLabelsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReplaceLabelsRequest proto.InternalMessageInfo
func (m *ReplaceLabelsRequest) GetNamespace() string {
if m != nil {
return m.Namespace
} }
return "" return ""
} }
func (x *ReplaceLabelsRequest) GetName() string { func (m *ReplaceLabelsRequest) GetName() string {
if x != nil { if m != nil {
return x.Name return m.Name
} }
return "" return ""
} }
func (x *ReplaceLabelsRequest) GetLabels() *Labels { func (m *ReplaceLabelsRequest) GetLabels() *Labels {
if x != nil { if m != nil {
return x.Labels return m.Labels
} }
return nil return nil
} }
type GetLabelsRequest struct { type GetLabelsRequest struct {
state protoimpl.MessageState Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
sizeCache protoimpl.SizeCache Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` XXX_sizecache int32 `json:"-"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
} }
func (x *GetLabelsRequest) Reset() { func (m *GetLabelsRequest) Reset() { *m = GetLabelsRequest{} }
*x = GetLabelsRequest{} func (m *GetLabelsRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*GetLabelsRequest) ProtoMessage() {}
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) { func (*GetLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{4} return fileDescriptor_6100d2b5ae808f16, []int{4}
} }
func (x *GetLabelsRequest) GetNamespace() string { func (m *GetLabelsRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_GetLabelsRequest.Unmarshal(m, b)
return x.Namespace }
func (m *GetLabelsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLabelsRequest.Marshal(b, m, deterministic)
}
func (m *GetLabelsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLabelsRequest.Merge(m, src)
}
func (m *GetLabelsRequest) XXX_Size() int {
return xxx_messageInfo_GetLabelsRequest.Size(m)
}
func (m *GetLabelsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetLabelsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetLabelsRequest proto.InternalMessageInfo
func (m *GetLabelsRequest) GetNamespace() string {
if m != nil {
return m.Namespace
} }
return "" return ""
} }
func (x *GetLabelsRequest) GetName() string { func (m *GetLabelsRequest) GetName() string {
if x != nil { if m != nil {
return x.Name return m.Name
} }
return "" return ""
} }
type GetLabelsResponse struct { type GetLabelsResponse struct {
state protoimpl.MessageState Labels []*KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
sizeCache protoimpl.SizeCache XXX_NoUnkeyedLiteral struct{} `json:"-"`
unknownFields protoimpl.UnknownFields XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Labels []*KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
} }
func (x *GetLabelsResponse) Reset() { func (m *GetLabelsResponse) Reset() { *m = GetLabelsResponse{} }
*x = GetLabelsResponse{} func (m *GetLabelsResponse) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*GetLabelsResponse) ProtoMessage() {}
mi := &file_label_proto_msgTypes[5]
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[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 GetLabelsResponse.ProtoReflect.Descriptor instead.
func (*GetLabelsResponse) Descriptor() ([]byte, []int) { func (*GetLabelsResponse) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{5} return fileDescriptor_6100d2b5ae808f16, []int{5}
} }
func (x *GetLabelsResponse) GetLabels() []*KeyValue { func (m *GetLabelsResponse) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_GetLabelsResponse.Unmarshal(m, b)
return x.Labels }
func (m *GetLabelsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLabelsResponse.Marshal(b, m, deterministic)
}
func (m *GetLabelsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLabelsResponse.Merge(m, src)
}
func (m *GetLabelsResponse) XXX_Size() int {
return xxx_messageInfo_GetLabelsResponse.Size(m)
}
func (m *GetLabelsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetLabelsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetLabelsResponse proto.InternalMessageInfo
func (m *GetLabelsResponse) GetLabels() []*KeyValue {
if m != nil {
return m.Labels
} }
return nil return nil
} }
type DeleteLabelRequest struct { type DeleteLabelRequest struct {
state protoimpl.MessageState Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
sizeCache protoimpl.SizeCache Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
unknownFields protoimpl.UnknownFields Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` XXX_unrecognized []byte `json:"-"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` XXX_sizecache int32 `json:"-"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
} }
func (x *DeleteLabelRequest) Reset() { func (m *DeleteLabelRequest) Reset() { *m = DeleteLabelRequest{} }
*x = DeleteLabelRequest{} func (m *DeleteLabelRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*DeleteLabelRequest) ProtoMessage() {}
mi := &file_label_proto_msgTypes[6]
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[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 DeleteLabelRequest.ProtoReflect.Descriptor instead.
func (*DeleteLabelRequest) Descriptor() ([]byte, []int) { func (*DeleteLabelRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{6} return fileDescriptor_6100d2b5ae808f16, []int{6}
} }
func (x *DeleteLabelRequest) GetNamespace() string { func (m *DeleteLabelRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_DeleteLabelRequest.Unmarshal(m, b)
return x.Namespace }
func (m *DeleteLabelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteLabelRequest.Marshal(b, m, deterministic)
}
func (m *DeleteLabelRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteLabelRequest.Merge(m, src)
}
func (m *DeleteLabelRequest) XXX_Size() int {
return xxx_messageInfo_DeleteLabelRequest.Size(m)
}
func (m *DeleteLabelRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteLabelRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteLabelRequest proto.InternalMessageInfo
func (m *DeleteLabelRequest) GetNamespace() string {
if m != nil {
return m.Namespace
} }
return "" return ""
} }
func (x *DeleteLabelRequest) GetName() string { func (m *DeleteLabelRequest) GetName() string {
if x != nil { if m != nil {
return x.Name return m.Name
} }
return "" return ""
} }
func (x *DeleteLabelRequest) GetKey() string { func (m *DeleteLabelRequest) GetKey() string {
if x != nil { if m != nil {
return x.Key return m.Key
} }
return "" return ""
} }
var File_label_proto protoreflect.FileDescriptor func init() {
proto.RegisterType((*KeyValue)(nil), "api.KeyValue")
var file_label_proto_rawDesc = []byte{ proto.RegisterType((*Labels)(nil), "api.Labels")
0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, proto.RegisterType((*AddLabelsRequest)(nil), "api.AddLabelsRequest")
0x70, 0x69, 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, proto.RegisterType((*ReplaceLabelsRequest)(nil), "api.ReplaceLabelsRequest")
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, proto.RegisterType((*GetLabelsRequest)(nil), "api.GetLabelsRequest")
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, proto.RegisterType((*GetLabelsResponse)(nil), "api.GetLabelsResponse")
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2d, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, proto.RegisterType((*DeleteLabelRequest)(nil), "api.DeleteLabelRequest")
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, 0x69, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x6c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 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, 0x6d, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 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,
0x44, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 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, 0x58, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
} }
var ( func init() { proto.RegisterFile("label.proto", fileDescriptor_6100d2b5ae808f16) }
file_label_proto_rawDescOnce sync.Once
file_label_proto_rawDescData = file_label_proto_rawDesc
)
func file_label_proto_rawDescGZIP() []byte { var fileDescriptor_6100d2b5ae808f16 = []byte{
file_label_proto_rawDescOnce.Do(func() { // 247 bytes of a gzipped FileDescriptorProto
file_label_proto_rawDescData = protoimpl.X.CompressGZIP(file_label_proto_rawDescData) 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x92, 0x3f, 0x4f, 0xc3, 0x30,
}) 0x10, 0xc5, 0x15, 0x4c, 0x23, 0x7a, 0x11, 0x52, 0x38, 0x75, 0xf0, 0xc0, 0x10, 0xb9, 0x42, 0xca,
return file_label_proto_rawDescData 0x42, 0x86, 0xb0, 0xb1, 0x21, 0x55, 0x62, 0x80, 0xc9, 0x03, 0x62, 0x75, 0xdb, 0x1b, 0x2c, 0x9c,
} 0xc6, 0x60, 0x17, 0xa9, 0xdf, 0x1e, 0xf9, 0x4f, 0x03, 0x03, 0x13, 0x48, 0xdd, 0xee, 0xee, 0xc9,
0xef, 0x77, 0xe7, 0x3b, 0xa8, 0x8c, 0x5a, 0x93, 0xe9, 0xec, 0xc7, 0xe8, 0x47, 0x64, 0xca, 0x6a,
var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 7) 0xd1, 0xc3, 0xc5, 0x13, 0x1d, 0x5e, 0x94, 0xd9, 0x13, 0xd6, 0xc0, 0xde, 0xe8, 0xc0, 0x8b, 0xa6,
var file_label_proto_goTypes = []interface{}{ 0x68, 0xe7, 0x32, 0x84, 0xb8, 0x80, 0xd9, 0x67, 0x90, 0xf8, 0x59, 0xac, 0xa5, 0x44, 0xdc, 0x42,
(*KeyValue)(nil), // 0: api.KeyValue 0xf9, 0x1c, 0x7c, 0x1c, 0x2e, 0x61, 0xa6, 0x3d, 0x0d, 0x8e, 0x17, 0x0d, 0x6b, 0xab, 0xfe, 0xb2,
(*Labels)(nil), // 1: api.Labels 0x53, 0x56, 0x77, 0x47, 0x3f, 0x99, 0x34, 0xa1, 0xa1, 0x7e, 0xd8, 0x6e, 0xd3, 0x0b, 0x49, 0xef,
(*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest 0x7b, 0x72, 0x1e, 0xaf, 0x61, 0xbe, 0x53, 0x03, 0x39, 0xab, 0x36, 0x94, 0x81, 0xdf, 0x05, 0x44,
(*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest 0x38, 0x0f, 0x49, 0xa6, 0xc6, 0x18, 0x97, 0x50, 0xc6, 0xe6, 0x1d, 0x67, 0x4d, 0xd1, 0x56, 0x7d,
(*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest 0x15, 0x59, 0xd9, 0x35, 0x4b, 0x62, 0x80, 0x85, 0x24, 0x6b, 0xd4, 0x86, 0x4e, 0x82, 0x5b, 0x41,
(*GetLabelsResponse)(nil), // 5: api.GetLabelsResponse 0xfd, 0x48, 0xfe, 0x9f, 0x28, 0x71, 0x0f, 0x57, 0x3f, 0x5c, 0x9c, 0x1d, 0x77, 0x8e, 0xf0, 0x66,
(*DeleteLabelRequest)(nil), // 6: api.DeleteLabelRequest 0xe2, 0xff, 0xfa, 0xb5, 0xc7, 0x0e, 0x5e, 0x01, 0x57, 0x64, 0xc8, 0xa7, 0x79, 0xff, 0x3e, 0x6e,
} 0x5e, 0x3d, 0x9b, 0x56, 0xbf, 0x2e, 0xe3, 0x91, 0xdc, 0x7d, 0x05, 0x00, 0x00, 0xff, 0xff, 0xef,
var file_label_proto_depIdxs = []int32{ 0xc9, 0xad, 0xce, 0x33, 0x02, 0x00, 0x00,
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
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_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.(*GetLabelsResponse); 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.(*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: 7,
NumExtensions: 0,
NumServices: 0,
},
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
} }

View File

@@ -1,164 +1,93 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: metric.proto // source: metric.proto
package api package api
import ( import (
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" math "math"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( // Reference imports to suppress errors if they are not otherwise used.
// Verify that this generated code is sufficiently up-to-date. var _ = proto.Marshal
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) var _ = fmt.Errorf
// Verify that runtime/protoimpl is sufficiently up-to-date. var _ = math.Inf
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version // This is a compile-time assertion to ensure that this generated file
// of the legacy proto package is being used. // is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion4 // A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Metric struct { type Metric struct {
state protoimpl.MessageState Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
sizeCache protoimpl.SizeCache Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
unknownFields protoimpl.UnknownFields Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_unrecognized []byte `json:"-"`
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` XXX_sizecache int32 `json:"-"`
Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
} }
func (x *Metric) Reset() { func (m *Metric) Reset() { *m = Metric{} }
*x = Metric{} func (m *Metric) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*Metric) ProtoMessage() {}
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) { func (*Metric) Descriptor() ([]byte, []int) {
return file_metric_proto_rawDescGZIP(), []int{0} return fileDescriptor_da41641f55bff5df, []int{0}
} }
func (x *Metric) GetName() string { func (m *Metric) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_Metric.Unmarshal(m, b)
return x.Name }
func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
}
func (m *Metric) XXX_Merge(src proto.Message) {
xxx_messageInfo_Metric.Merge(m, src)
}
func (m *Metric) XXX_Size() int {
return xxx_messageInfo_Metric.Size(m)
}
func (m *Metric) XXX_DiscardUnknown() {
xxx_messageInfo_Metric.DiscardUnknown(m)
}
var xxx_messageInfo_Metric proto.InternalMessageInfo
func (m *Metric) GetName() string {
if m != nil {
return m.Name
} }
return "" return ""
} }
func (x *Metric) GetValue() float64 { func (m *Metric) GetValue() float64 {
if x != nil { if m != nil {
return x.Value return m.Value
} }
return 0 return 0
} }
func (x *Metric) GetFormat() string { func (m *Metric) GetFormat() string {
if x != nil { if m != nil {
return x.Format return m.Format
} }
return "" return ""
} }
var File_metric_proto protoreflect.FileDescriptor func init() {
proto.RegisterType((*Metric)(nil), "api.Metric")
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 ( func init() { proto.RegisterFile("metric.proto", fileDescriptor_da41641f55bff5df) }
file_metric_proto_rawDescOnce sync.Once
file_metric_proto_rawDescData = file_metric_proto_rawDesc
)
func file_metric_proto_rawDescGZIP() []byte { var fileDescriptor_da41641f55bff5df = []byte{
file_metric_proto_rawDescOnce.Do(func() { // 105 bytes of a gzipped FileDescriptorProto
file_metric_proto_rawDescData = protoimpl.X.CompressGZIP(file_metric_proto_rawDescData) 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x4d, 0x2d, 0x29,
}) 0xca, 0x4c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4e, 0x2c, 0xc8, 0x54, 0xf2, 0xe2,
return file_metric_proto_rawDescData 0x62, 0xf3, 0x05, 0x0b, 0x0a, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30,
} 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c,
0x0a, 0x8c, 0x1a, 0x8c, 0x41, 0x10, 0x8e, 0x90, 0x18, 0x17, 0x5b, 0x5a, 0x7e, 0x51, 0x6e, 0x62,
var file_metric_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 0x89, 0x04, 0x33, 0x58, 0x2d, 0x94, 0x97, 0xc4, 0x06, 0x36, 0xd7, 0x18, 0x10, 0x00, 0x00, 0xff,
var file_metric_proto_goTypes = []interface{}{ 0xff, 0x88, 0xf0, 0xba, 0x92, 0x67, 0x00, 0x00, 0x00,
(*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
} }

View File

@@ -1,433 +1,276 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: namespace.proto // source: namespace.proto
package api package api
import ( import (
context "context" context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations" _ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" math "math"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( // Reference imports to suppress errors if they are not otherwise used.
// Verify that this generated code is sufficiently up-to-date. var _ = proto.Marshal
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) var _ = fmt.Errorf
// Verify that runtime/protoimpl is sufficiently up-to-date. var _ = math.Inf
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version // This is a compile-time assertion to ensure that this generated file
// of the legacy proto package is being used. // is compatible with the proto package it is being compiled against.
const _ = proto.ProtoPackageIsVersion4 // A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ListNamespacesRequest struct { type ListNamespacesRequest struct {
state protoimpl.MessageState PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
sizeCache protoimpl.SizeCache Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
unknownFields protoimpl.UnknownFields Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"` XXX_unrecognized []byte `json:"-"`
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` XXX_sizecache int32 `json:"-"`
Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
} }
func (x *ListNamespacesRequest) Reset() { func (m *ListNamespacesRequest) Reset() { *m = ListNamespacesRequest{} }
*x = ListNamespacesRequest{} func (m *ListNamespacesRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*ListNamespacesRequest) ProtoMessage() {}
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) { func (*ListNamespacesRequest) Descriptor() ([]byte, []int) {
return file_namespace_proto_rawDescGZIP(), []int{0} return fileDescriptor_ecb1e126f615f5dd, []int{0}
} }
func (x *ListNamespacesRequest) GetPageSize() int32 { func (m *ListNamespacesRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_ListNamespacesRequest.Unmarshal(m, b)
return x.PageSize }
func (m *ListNamespacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListNamespacesRequest.Marshal(b, m, deterministic)
}
func (m *ListNamespacesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListNamespacesRequest.Merge(m, src)
}
func (m *ListNamespacesRequest) XXX_Size() int {
return xxx_messageInfo_ListNamespacesRequest.Size(m)
}
func (m *ListNamespacesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListNamespacesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListNamespacesRequest proto.InternalMessageInfo
func (m *ListNamespacesRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
} }
return 0 return 0
} }
func (x *ListNamespacesRequest) GetPage() int32 { func (m *ListNamespacesRequest) GetPage() int32 {
if x != nil { if m != nil {
return x.Page return m.Page
} }
return 0 return 0
} }
func (x *ListNamespacesRequest) GetQuery() string { func (m *ListNamespacesRequest) GetQuery() string {
if x != nil { if m != nil {
return x.Query return m.Query
} }
return "" return ""
} }
type ListNamespacesResponse struct { type ListNamespacesResponse struct {
state protoimpl.MessageState Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
sizeCache protoimpl.SizeCache Namespaces []*Namespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
unknownFields protoimpl.UnknownFields Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
Namespaces []*Namespace `protobuf:"bytes,2,rep,name=namespaces,proto3" json:"namespaces,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` XXX_unrecognized []byte `json:"-"`
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"` XXX_sizecache int32 `json:"-"`
TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
} }
func (x *ListNamespacesResponse) Reset() { func (m *ListNamespacesResponse) Reset() { *m = ListNamespacesResponse{} }
*x = ListNamespacesResponse{} func (m *ListNamespacesResponse) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*ListNamespacesResponse) ProtoMessage() {}
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) { func (*ListNamespacesResponse) Descriptor() ([]byte, []int) {
return file_namespace_proto_rawDescGZIP(), []int{1} return fileDescriptor_ecb1e126f615f5dd, []int{1}
} }
func (x *ListNamespacesResponse) GetCount() int32 { func (m *ListNamespacesResponse) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_ListNamespacesResponse.Unmarshal(m, b)
return x.Count }
func (m *ListNamespacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListNamespacesResponse.Marshal(b, m, deterministic)
}
func (m *ListNamespacesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListNamespacesResponse.Merge(m, src)
}
func (m *ListNamespacesResponse) XXX_Size() int {
return xxx_messageInfo_ListNamespacesResponse.Size(m)
}
func (m *ListNamespacesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListNamespacesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListNamespacesResponse proto.InternalMessageInfo
func (m *ListNamespacesResponse) GetCount() int32 {
if m != nil {
return m.Count
} }
return 0 return 0
} }
func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { func (m *ListNamespacesResponse) GetNamespaces() []*Namespace {
if x != nil { if m != nil {
return x.Namespaces return m.Namespaces
} }
return nil return nil
} }
func (x *ListNamespacesResponse) GetPage() int32 { func (m *ListNamespacesResponse) GetPage() int32 {
if x != nil { if m != nil {
return x.Page return m.Page
} }
return 0 return 0
} }
func (x *ListNamespacesResponse) GetPages() int32 { func (m *ListNamespacesResponse) GetPages() int32 {
if x != nil { if m != nil {
return x.Pages return m.Pages
} }
return 0 return 0
} }
func (x *ListNamespacesResponse) GetTotalCount() int32 { func (m *ListNamespacesResponse) GetTotalCount() int32 {
if x != nil { if m != nil {
return x.TotalCount return m.TotalCount
} }
return 0 return 0
} }
type CreateNamespaceRequest struct { type CreateNamespaceRequest struct {
state protoimpl.MessageState Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
sizeCache protoimpl.SizeCache XXX_NoUnkeyedLiteral struct{} `json:"-"`
unknownFields protoimpl.UnknownFields XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
} }
func (x *CreateNamespaceRequest) Reset() { func (m *CreateNamespaceRequest) Reset() { *m = CreateNamespaceRequest{} }
*x = CreateNamespaceRequest{} func (m *CreateNamespaceRequest) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*CreateNamespaceRequest) ProtoMessage() {}
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) { func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) {
return file_namespace_proto_rawDescGZIP(), []int{2} return fileDescriptor_ecb1e126f615f5dd, []int{2}
} }
func (x *CreateNamespaceRequest) GetNamespace() *Namespace { func (m *CreateNamespaceRequest) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_CreateNamespaceRequest.Unmarshal(m, b)
return x.Namespace }
func (m *CreateNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateNamespaceRequest.Marshal(b, m, deterministic)
}
func (m *CreateNamespaceRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateNamespaceRequest.Merge(m, src)
}
func (m *CreateNamespaceRequest) XXX_Size() int {
return xxx_messageInfo_CreateNamespaceRequest.Size(m)
}
func (m *CreateNamespaceRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateNamespaceRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateNamespaceRequest proto.InternalMessageInfo
func (m *CreateNamespaceRequest) GetNamespace() *Namespace {
if m != nil {
return m.Namespace
} }
return nil return nil
} }
type Namespace struct { type Namespace struct {
state protoimpl.MessageState Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
sizeCache protoimpl.SizeCache XXX_NoUnkeyedLiteral struct{} `json:"-"`
unknownFields protoimpl.UnknownFields XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
} }
func (x *Namespace) Reset() { func (m *Namespace) Reset() { *m = Namespace{} }
*x = Namespace{} func (m *Namespace) String() string { return proto.CompactTextString(m) }
if protoimpl.UnsafeEnabled { func (*Namespace) ProtoMessage() {}
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) { func (*Namespace) Descriptor() ([]byte, []int) {
return file_namespace_proto_rawDescGZIP(), []int{3} return fileDescriptor_ecb1e126f615f5dd, []int{3}
} }
func (x *Namespace) GetName() string { func (m *Namespace) XXX_Unmarshal(b []byte) error {
if x != nil { return xxx_messageInfo_Namespace.Unmarshal(m, b)
return x.Name }
func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Namespace.Marshal(b, m, deterministic)
}
func (m *Namespace) XXX_Merge(src proto.Message) {
xxx_messageInfo_Namespace.Merge(m, src)
}
func (m *Namespace) XXX_Size() int {
return xxx_messageInfo_Namespace.Size(m)
}
func (m *Namespace) XXX_DiscardUnknown() {
xxx_messageInfo_Namespace.DiscardUnknown(m)
}
var xxx_messageInfo_Namespace proto.InternalMessageInfo
func (m *Namespace) GetName() string {
if m != nil {
return m.Name
} }
return "" return ""
} }
var File_namespace_proto protoreflect.FileDescriptor func init() {
proto.RegisterType((*ListNamespacesRequest)(nil), "api.ListNamespacesRequest")
var file_namespace_proto_rawDesc = []byte{ proto.RegisterType((*ListNamespacesResponse)(nil), "api.ListNamespacesResponse")
0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, proto.RegisterType((*CreateNamespaceRequest)(nil), "api.CreateNamespaceRequest")
0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, proto.RegisterType((*Namespace)(nil), "api.Namespace")
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 ( func init() { proto.RegisterFile("namespace.proto", fileDescriptor_ecb1e126f615f5dd) }
file_namespace_proto_rawDescOnce sync.Once
file_namespace_proto_rawDescData = file_namespace_proto_rawDesc
)
func file_namespace_proto_rawDescGZIP() []byte { var fileDescriptor_ecb1e126f615f5dd = []byte{
file_namespace_proto_rawDescOnce.Do(func() { // 341 bytes of a gzipped FileDescriptorProto
file_namespace_proto_rawDescData = protoimpl.X.CompressGZIP(file_namespace_proto_rawDescData) 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcb, 0x4a, 0xc3, 0x40,
}) 0x14, 0x25, 0x4d, 0x2b, 0xe6, 0x0a, 0xad, 0x0c, 0x5a, 0x42, 0x14, 0x0d, 0x03, 0x42, 0x41, 0x49,
return file_namespace_proto_rawDescData 0x68, 0xdd, 0xb9, 0x2d, 0xb8, 0x12, 0x17, 0xe9, 0xda, 0xc5, 0xb4, 0x5c, 0xca, 0xd0, 0x9a, 0x99,
} 0x66, 0xa6, 0x05, 0x5d, 0xfa, 0x0b, 0xfe, 0x84, 0xff, 0xe3, 0x2f, 0xb8, 0xf4, 0x23, 0x24, 0x37,
0x75, 0xfa, 0x30, 0xae, 0x72, 0x9f, 0xe7, 0x9c, 0x7b, 0x26, 0xd0, 0xc9, 0xc5, 0x33, 0x1a, 0x2d,
var file_namespace_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 0x26, 0x98, 0xe8, 0x42, 0x59, 0xc5, 0x7c, 0xa1, 0x65, 0x74, 0x3e, 0x55, 0x6a, 0x3a, 0xc7, 0x54,
var file_namespace_proto_goTypes = []interface{}{ 0x68, 0x99, 0x8a, 0x3c, 0x57, 0x56, 0x58, 0xa9, 0x72, 0x53, 0x8d, 0xf0, 0x27, 0x38, 0x7d, 0x90,
(*ListNamespacesRequest)(nil), // 0: api.ListNamespacesRequest 0xc6, 0x3e, 0xfe, 0x6e, 0x9a, 0x0c, 0x17, 0x4b, 0x34, 0x96, 0x45, 0x70, 0xa8, 0xc5, 0x14, 0x47,
(*ListNamespacesResponse)(nil), // 1: api.ListNamespacesResponse 0xf2, 0x15, 0x43, 0x2f, 0xf6, 0x7a, 0xad, 0xcc, 0xe5, 0x8c, 0x41, 0xb3, 0x8c, 0xc3, 0x06, 0xd5,
(*CreateNamespaceRequest)(nil), // 2: api.CreateNamespaceRequest 0x29, 0x66, 0x27, 0xd0, 0x5a, 0x2c, 0xb1, 0x78, 0x09, 0xfd, 0xd8, 0xeb, 0x05, 0x59, 0x95, 0xf0,
(*Namespace)(nil), // 3: api.Namespace 0x0f, 0x0f, 0xba, 0xfb, 0xf8, 0x46, 0xab, 0xdc, 0xd0, 0xc2, 0x44, 0x2d, 0x73, 0xbb, 0x46, 0xaf,
} 0x12, 0x96, 0x00, 0xb8, 0x2b, 0x4c, 0xd8, 0x88, 0xfd, 0xde, 0xd1, 0xa0, 0x9d, 0x08, 0x2d, 0x13,
var file_namespace_proto_depIdxs = []int32{ 0x07, 0x91, 0x6d, 0x4d, 0x38, 0x29, 0xfe, 0xae, 0x94, 0xf2, 0x6b, 0xc2, 0x66, 0x85, 0x4c, 0x09,
3, // 0: api.ListNamespacesResponse.namespaces:type_name -> api.Namespace 0xbb, 0x00, 0xb0, 0xca, 0x8a, 0xf9, 0x90, 0x48, 0x5b, 0xd4, 0xda, 0xaa, 0xf0, 0x7b, 0xe8, 0x0e,
3, // 1: api.CreateNamespaceRequest.namespace:type_name -> api.Namespace 0x0b, 0x14, 0x16, 0x37, 0x44, 0x6b, 0x2b, 0x6e, 0x20, 0x70, 0x8c, 0xa4, 0xf6, 0xaf, 0xa4, 0xcd,
0, // 2: api.NamespaceService.ListNamespaces:input_type -> api.ListNamespacesRequest 0x00, 0xbf, 0x84, 0xc0, 0xd5, 0x4b, 0x79, 0x65, 0x87, 0xb6, 0x82, 0x8c, 0xe2, 0xc1, 0xb7, 0x07,
2, // 3: api.NamespaceService.CreateNamespace:input_type -> api.CreateNamespaceRequest 0xc7, 0x6e, 0x62, 0x84, 0xc5, 0x4a, 0x4e, 0x90, 0xcd, 0xa0, 0xbd, 0xeb, 0x13, 0x8b, 0x88, 0xa2,
1, // 4: api.NamespaceService.ListNamespaces:output_type -> api.ListNamespacesResponse 0xf6, 0x71, 0xa2, 0xb3, 0xda, 0x5e, 0x65, 0x2c, 0x8f, 0xdf, 0x3e, 0xbf, 0xde, 0x1b, 0x11, 0x0b,
3, // 5: api.NamespaceService.CreateNamespace:output_type -> api.Namespace 0xcb, 0x27, 0x37, 0xe9, 0xaa, 0x3f, 0x46, 0x2b, 0xfa, 0xe9, 0x96, 0x69, 0x33, 0xe8, 0xec, 0x9d,
4, // [4:6] is the sub-list for method output_type 0xca, 0x2a, 0xc4, 0x7a, 0x03, 0xa2, 0xbd, 0x6b, 0xf9, 0x35, 0x31, 0x5c, 0xf1, 0x7f, 0x19, 0xee,
2, // [2:4] is the sub-list for method input_type 0x36, 0x7e, 0x8c, 0x0f, 0xe8, 0x47, 0xbb, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x92, 0x90, 0x1e,
2, // [2:2] is the sub-list for extension type_name 0xf0, 0x9e, 0x02, 0x00, 0x00,
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. // Reference imports to suppress errors if they are not otherwise used.
var _ context.Context var _ context.Context
var _ grpc.ClientConnInterface var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6 const _ = grpc.SupportPackageIsVersion4
// NamespaceServiceClient is the client API for NamespaceService service. // NamespaceServiceClient is the client API for NamespaceService service.
// //
@@ -438,10 +281,10 @@ type NamespaceServiceClient interface {
} }
type namespaceServiceClient struct { type namespaceServiceClient struct {
cc grpc.ClientConnInterface cc *grpc.ClientConn
} }
func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient { func NewNamespaceServiceClient(cc *grpc.ClientConn) NamespaceServiceClient {
return &namespaceServiceClient{cc} return &namespaceServiceClient{cc}
} }
@@ -473,10 +316,10 @@ type NamespaceServiceServer interface {
type UnimplementedNamespaceServiceServer struct { type UnimplementedNamespaceServiceServer struct {
} }
func (*UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { func (*UnimplementedNamespaceServiceServer) ListNamespaces(ctx context.Context, req *ListNamespacesRequest) (*ListNamespacesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented")
} }
func (*UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) { func (*UnimplementedNamespaceServiceServer) CreateNamespace(ctx context.Context, req *CreateNamespaceRequest) (*Namespace, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented")
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -436,7 +436,7 @@ func request_WorkflowTemplateService_GetWorkflowTemplate_1(ctx context.Context,
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version")
} }
protoReq.Version, err = runtime.Int32(val) protoReq.Version, err = runtime.Int64(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err)
@@ -485,7 +485,7 @@ func local_request_WorkflowTemplateService_GetWorkflowTemplate_1(ctx context.Con
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version")
} }
protoReq.Version, err = runtime.Int32(val) protoReq.Version, err = runtime.Int64(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err)
@@ -788,7 +788,7 @@ func request_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx context.Context
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version")
} }
protoReq.Version, err = runtime.Int32(val) protoReq.Version, err = runtime.Int64(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err)
@@ -848,7 +848,7 @@ func local_request_WorkflowTemplateService_CloneWorkflowTemplate_1(ctx context.C
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version")
} }
protoReq.Version, err = runtime.Int32(val) protoReq.Version, err = runtime.Int64(val)
if err != nil { if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err)

View File

@@ -103,14 +103,14 @@ message UpdateWorkflowTemplateVersionRequest {
message GetWorkflowTemplateRequest { message GetWorkflowTemplateRequest {
string namespace = 1; string namespace = 1;
string uid = 2; string uid = 2;
int32 version = 3; int64 version = 3;
} }
message CloneWorkflowTemplateRequest { message CloneWorkflowTemplateRequest {
string namespace = 1; string namespace = 1;
string uid = 2; string uid = 2;
string name = 3; string name = 3;
int32 version = 4; int64 version = 4;
} }
message ListWorkflowTemplateVersionsRequest { message ListWorkflowTemplateVersionsRequest {
@@ -153,8 +153,8 @@ message WorkflowTemplate {
string createdAt = 1; string createdAt = 1;
string uid = 2; string uid = 2;
string name = 3; string name = 3;
int32 version = 4; int64 version = 4;
int32 versions = 5; int64 versions = 5;
string manifest = 6; string manifest = 6;
bool isLatest = 7; bool isLatest = 7;
bool isArchived = 8; bool isArchived = 8;
@@ -166,6 +166,6 @@ message WorkflowTemplate {
message GetWorkflowTemplateLabelsRequest { message GetWorkflowTemplateLabelsRequest {
string namespace = 1; string namespace = 1;
string name = 2; string name = 2;
int32 version = 3; int64 version = 3;
WorkflowExecutionStatisticReport stats = 8; WorkflowExecutionStatisticReport stats = 8;
} }

View File

@@ -0,0 +1,22 @@
-- +goose Up
CREATE TABLE workflow_template_versions
(
id serial PRIMARY KEY,
workflow_template_id integer NOT NULL REFERENCES workflow_templates ON DELETE CASCADE,
version integer NOT NULL,
is_latest boolean NOT NULL,
manifest text NOT NULL,
-- auditing info
created_at timestamp NOT NULL DEFAULT (NOW() at time zone 'utc')
);
ALTER TABLE workflow_templates DROP COLUMN versions;
-- +goose Down
ALTER TABLE workflow_templates ADD COLUMN versions INTEGER;
UPDATE workflow_templates SET versions = 1;
ALTER TABLE workflow_templates ALTER COLUMN versions SET NOT NULL;
DROP TABLE workflow_template_versions;

4
go.mod
View File

@@ -17,7 +17,7 @@ require (
github.com/gorilla/handlers v1.4.2 github.com/gorilla/handlers v1.4.2
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 github.com/grpc-ecosystem/go-grpc-middleware v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.14.3 github.com/grpc-ecosystem/grpc-gateway v1.14.3
github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/hashicorp/go-uuid v1.0.2
github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/jmoiron/sqlx v1.2.0 github.com/jmoiron/sqlx v1.2.0
github.com/lib/pq v1.3.0 github.com/lib/pq v1.3.0
@@ -32,8 +32,8 @@ require (
github.com/ziutek/mymysql v1.5.4 // indirect github.com/ziutek/mymysql v1.5.4 // indirect
google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36
google.golang.org/grpc v1.28.0 google.golang.org/grpc v1.28.0
gopkg.in/yaml.v2 v2.2.8
google.golang.org/protobuf v1.21.0 google.golang.org/protobuf v1.21.0
gopkg.in/yaml.v2 v2.2.8
k8s.io/api v0.16.4 k8s.io/api v0.16.4
k8s.io/apimachinery v0.16.7-beta.0 k8s.io/apimachinery v0.16.7-beta.0
k8s.io/client-go v0.16.4 k8s.io/client-go v0.16.4

View File

@@ -47,7 +47,7 @@ func main() {
} }
databaseDataSourceName := fmt.Sprintf("host=%v user=%v password=%v dbname=%v sslmode=disable", databaseDataSourceName := fmt.Sprintf("host=%v user=%v password=%v dbname=%v sslmode=disable",
config["databaseHost"], config["databaseUsername"], config["databasePassword"], config["databaseName"]) "localhost", "admin", "admin", "onepanel-core")
db := sqlx.MustConnect(config["databaseDriverName"], databaseDataSourceName) db := sqlx.MustConnect(config["databaseDriverName"], databaseDataSourceName)
if err := goose.Run("up", db.DB, "db"); err != nil { if err := goose.Run("up", db.DB, "db"); err != nil {
log.Fatalf("Failed to run database migrations: %v", err) log.Fatalf("Failed to run database migrations: %v", err)
@@ -59,7 +59,7 @@ func main() {
func startRPCServer(db *v1.DB, kubeConfig *v1.Config) { func startRPCServer(db *v1.DB, kubeConfig *v1.Config) {
log.Printf("Starting RPC server on port %v", *rpcPort) log.Printf("Starting RPC server on port %v", *rpcPort)
lis, err := net.Listen("tcp", *rpcPort) lis, err := net.Listen("tcp", "0.0.0.0"+*rpcPort)
if err != nil { if err != nil {
log.Fatalf("Failed to start RPC listener: %v", err) log.Fatalf("Failed to start RPC listener: %v", err)
} }

View File

@@ -365,6 +365,7 @@ func (c *Client) updateCronWorkflow(namespace string, name string, workflowTempl
if err = c.injectAutomatedFields(namespace, wf, opts); err != nil { if err = c.injectAutomatedFields(namespace, wf, opts); err != nil {
return nil, err return nil, err
} }
err = InjectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId) err = InjectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
if err != nil { if err != nil {
return nil, err return nil, err
@@ -448,6 +449,7 @@ func (c *Client) createCronWorkflow(namespace string, workflowTemplateId *uint64
if err != nil { if err != nil {
return nil, err return nil, err
} }
cwf.Spec.WorkflowSpec = wf.Spec cwf.Spec.WorkflowSpec = wf.Spec
cwf.Spec.WorkflowMetadata = &wf.ObjectMeta cwf.Spec.WorkflowMetadata = &wf.ObjectMeta

View File

@@ -61,8 +61,8 @@ type WorkflowTemplate struct {
UID string UID string
Name string Name string
Manifest string Manifest string
Version int32 Version int64
Versions int32 `db:"versions"` Versions int64 `db:"versions"`
IsLatest bool IsLatest bool
IsArchived bool `db:"is_archived"` IsArchived bool `db:"is_archived"`
ArgoWorkflowTemplate *wfv1.WorkflowTemplate ArgoWorkflowTemplate *wfv1.WorkflowTemplate
@@ -79,6 +79,14 @@ type WorkflowExecutionStatisticReport struct {
Failed int32 Failed int32
} }
type WorkflowTemplateVersion struct {
ID uint64
Version int64
IsLatest bool `db:"is_latest"`
Manifest string
CreatedAt time.Time `db:"created_at"`
}
type WorkflowExecutionStatistic struct { type WorkflowExecutionStatistic struct {
ID uint64 ID uint64
WorkflowTemplateId uint64 WorkflowTemplateId uint64

View File

@@ -473,7 +473,7 @@ func (c *Client) GetWorkflowExecution(namespace, name string) (workflow *Workflo
}).Error("Invalid version number.") }).Error("Invalid version number.")
return nil, util.NewUserError(codes.InvalidArgument, "Invalid version number.") return nil, util.NewUserError(codes.InvalidArgument, "Invalid version number.")
} }
workflowTemplate, err := c.GetWorkflowTemplate(namespace, uid, int32(version)) workflowTemplate, err := c.GetWorkflowTemplate(namespace, uid, version)
if err != nil { if err != nil {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
"Namespace": namespace, "Namespace": namespace,
@@ -551,10 +551,10 @@ func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflow
versionString, ok := wf.Labels[workflowTemplateVersionLabelKey] versionString, ok := wf.Labels[workflowTemplateVersionLabelKey]
if ok { if ok {
versionNumber, err := strconv.Atoi(versionString) versionNumber, err := strconv.ParseInt(versionString, 10, 64)
if err == nil { if err == nil {
execution.WorkflowTemplate = &WorkflowTemplate{ execution.WorkflowTemplate = &WorkflowTemplate{
Version: int32(versionNumber), Version: versionNumber,
} }
} else { } else {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
@@ -1207,7 +1207,10 @@ func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ..
} }
for _, workflowTemplate := range workflowTemplates { for _, workflowTemplate := range workflowTemplates {
workflowTemplate.WorkflowExecutionStatisticReport = resultMapping[workflowTemplate.ID] resultMap, ok := resultMapping[workflowTemplate.ID]
if ok {
workflowTemplate.WorkflowExecutionStatisticReport = resultMap
}
} }
return return

View File

@@ -7,6 +7,7 @@ import (
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
"time"
sq "github.com/Masterminds/squirrel" sq "github.com/Masterminds/squirrel"
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
@@ -14,7 +15,6 @@ import (
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
"github.com/onepanelio/core/pkg/util" "github.com/onepanelio/core/pkg/util"
"github.com/onepanelio/core/pkg/util/label" "github.com/onepanelio/core/pkg/util/label"
"github.com/onepanelio/core/pkg/util/number"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -34,12 +34,13 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
} }
defer tx.Rollback() defer tx.Rollback()
versionUnix := time.Now().Unix()
err = sb.Insert("workflow_templates"). err = sb.Insert("workflow_templates").
SetMap(sq.Eq{ SetMap(sq.Eq{
"uid": uid, "uid": uid,
"name": workflowTemplate.Name, "name": workflowTemplate.Name,
"namespace": namespace, "namespace": namespace,
"versions": 1,
}). }).
Suffix("RETURNING id"). Suffix("RETURNING id").
RunWith(tx). RunWith(tx).
@@ -48,20 +49,20 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
return nil, err return nil, err
} }
argoWft, err := createArgoWorkflowTemplate(workflowTemplate, "1") _, err = sb.Insert("workflow_template_versions").
SetMap(sq.Eq{
parametersMap, err := workflowTemplate.GetParametersKeyString() "workflow_template_id": workflowTemplate.ID,
"version": versionUnix,
"is_latest": true,
"manifest": workflowTemplate.Manifest,
}).
RunWith(tx).
Exec()
if err != nil { if err != nil {
return nil, err return nil, err
} }
if argoWft.Annotations == nil { argoWft, err := createArgoWorkflowTemplate(workflowTemplate, versionUnix)
argoWft.Annotations = make(map[string]string)
}
for key, value := range parametersMap {
argoWft.Annotations[key] = value
}
argoWft, err = c.ArgoprojV1alpha1().WorkflowTemplates(namespace).Create(argoWft) argoWft, err = c.ArgoprojV1alpha1().WorkflowTemplates(namespace).Create(argoWft)
if err != nil { if err != nil {
return nil, err return nil, err
@@ -78,7 +79,7 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
} }
func (c *Client) workflowTemplatesSelectBuilder(namespace string) sq.SelectBuilder { func (c *Client) workflowTemplatesSelectBuilder(namespace string) sq.SelectBuilder {
sb := sb.Select("wt.id", "wt.created_at", "wt.uid", "wt.name", "wt.is_archived", "wt.versions"). sb := sb.Select("wt.id", "wt.created_at", "wt.uid", "wt.name", "wt.is_archived").
From("workflow_templates wt"). From("workflow_templates wt").
Where(sq.Eq{ Where(sq.Eq{
"wt.namespace": namespace, "wt.namespace": namespace,
@@ -87,12 +88,33 @@ func (c *Client) workflowTemplatesSelectBuilder(namespace string) sq.SelectBuild
return sb return sb
} }
func (c *Client) getWorkflowTemplate(namespace, uid string, version int32) (workflowTemplate *WorkflowTemplate, err error) { func (c *Client) workflowTemplatesVersionSelectBuilder(namespace string) sq.SelectBuilder {
sb := sb.Select("wtv.id", "wtv.version", "wtv.is_latest", "wtv.manifest", "wtv.created_at").
From("workflow_template_versions wtv").
Join("workflow_templates wt ON wt.id = wtv.workflow_template_id").
Where(sq.Eq{
"wt.namespace": namespace,
})
return sb
}
func (c *Client) getWorkflowTemplate(namespace, uid string, version int64) (workflowTemplate *WorkflowTemplate, err error) {
workflowTemplate = &WorkflowTemplate{ workflowTemplate = &WorkflowTemplate{
WorkflowExecutionStatisticReport: &WorkflowExecutionStatisticReport{}, WorkflowExecutionStatisticReport: &WorkflowExecutionStatisticReport{},
} }
sb := c.workflowTemplatesSelectBuilder(namespace).Where(sq.Eq{"wt.uid": uid}) sb := c.workflowTemplatesSelectBuilder(namespace).
Column("wtv.manifest").
Join("workflow_template_versions wtv ON wt.id = wtv.workflow_template_id").
Where(sq.Eq{"wt.uid": uid})
if version == 0 {
sb = sb.Where(sq.Eq{"wtv.is_latest": true})
} else {
sb = sb.Where(sq.Eq{"wtv.version": version})
}
query, args, err := sb.ToSql() query, args, err := sb.ToSql()
if err != nil { if err != nil {
return return
@@ -116,25 +138,19 @@ func (c *Client) getWorkflowTemplate(namespace, uid string, version int32) (work
if err != nil { if err != nil {
return nil, err return nil, err
} }
manifest, err := yaml.Marshal(argoWft)
if err != nil {
return nil, err
}
workflowTemplate.Manifest = string(manifest)
workflowTemplate.ArgoWorkflowTemplate = argoWft workflowTemplate.ArgoWorkflowTemplate = argoWft
templateVersion, err := strconv.Atoi(argoWft.Labels[label.Version]) templateVersion, err := strconv.ParseInt(argoWft.Labels[label.Version], 10, 64)
if err != nil { if err != nil {
return nil, err return nil, err
} }
workflowTemplate.Version = int32(templateVersion) workflowTemplate.Version = templateVersion
return workflowTemplate, nil return workflowTemplate, nil
} }
func (c *Client) getWorkflowTemplateByName(namespace, name string, version int32) (workflowTemplate *WorkflowTemplate, err error) { func (c *Client) getWorkflowTemplateByName(namespace, name string, version int64) (workflowTemplate *WorkflowTemplate, err error) {
workflowTemplate = &WorkflowTemplate{} workflowTemplate = &WorkflowTemplate{}
sb := c.workflowTemplatesSelectBuilder(namespace).Where(sq.Eq{"wt.name": name}). sb := c.workflowTemplatesSelectBuilder(namespace).Where(sq.Eq{"wt.name": name}).
@@ -168,8 +184,18 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
return nil, err return nil, err
} }
dbVersions, err := c.listDbWorkflowTemplateVersions(namespace, uid)
if err != nil {
return nil, err
}
mapByVersion := make(map[int64]*WorkflowTemplateVersion)
for _, dbVersion := range dbVersions {
mapByVersion[dbVersion.Version] = dbVersion
}
for _, argoTemplate := range *argoTemplates { for _, argoTemplate := range *argoTemplates {
version, versionErr := strconv.Atoi(argoTemplate.Labels[label.Version]) version, versionErr := strconv.ParseInt(argoTemplate.Labels[label.Version], 10, 64)
if versionErr != nil { if versionErr != nil {
return nil, versionErr return nil, versionErr
} }
@@ -179,10 +205,7 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
isLatest = true isLatest = true
} }
manifest, err := yaml.Marshal(argoTemplate) dbVersion := mapByVersion[version]
if err != nil {
return nil, err
}
labels := label.FilterByPrefix(label.TagPrefix, argoTemplate.Labels) labels := label.FilterByPrefix(label.TagPrefix, argoTemplate.Labels)
@@ -191,8 +214,8 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
CreatedAt: argoTemplate.CreationTimestamp.Time, CreatedAt: argoTemplate.CreationTimestamp.Time,
UID: template.UID, UID: template.UID,
Name: template.Name, Name: template.Name,
Manifest: string(manifest), Manifest: dbVersion.Manifest,
Version: int32(version), Version: version,
IsLatest: isLatest, IsLatest: isLatest,
IsArchived: template.IsArchived, IsArchived: template.IsArchived,
Labels: labels, Labels: labels,
@@ -208,7 +231,10 @@ func (c *Client) listWorkflowTemplates(namespace string) (workflowTemplateVersio
workflowTemplateVersions = []*WorkflowTemplate{} workflowTemplateVersions = []*WorkflowTemplate{}
query, args, err := c.workflowTemplatesSelectBuilder(namespace). query, args, err := c.workflowTemplatesSelectBuilder(namespace).
Options("DISTINCT ON (wt.id) wt.id,"). Column("COUNT(wtv.*) versions").
Options("DISTINCT ON (wt.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").
Where(sq.Eq{ Where(sq.Eq{
"wt.is_archived": false, "wt.is_archived": false,
}). }).
@@ -242,26 +268,6 @@ func (c *Client) archiveWorkflowTemplate(namespace, uid string) (bool, error) {
return true, nil return true, nil
} }
func (c *Client) updateWorkflowTemplateVersions(namespace, uid string) (bool, error) {
query, args, err := sb.Update("workflow_templates").
Set("versions", sq.Expr("versions + 1")).
Where(sq.Eq{
"uid": uid,
"namespace": namespace,
}).
ToSql()
if err != nil {
return false, err
}
if _, err := c.DB.Exec(query, args...); err != nil {
return false, err
}
return true, nil
}
func (c *Client) CreateWorkflowTemplate(namespace string, workflowTemplate *WorkflowTemplate) (*WorkflowTemplate, error) { func (c *Client) CreateWorkflowTemplate(namespace string, workflowTemplate *WorkflowTemplate) (*WorkflowTemplate, error) {
// validate workflow template // validate workflow template
finalBytes, err := workflowTemplate.WrapSpec() finalBytes, err := workflowTemplate.WrapSpec()
@@ -307,6 +313,51 @@ func (c *Client) CreateWorkflowTemplateVersion(namespace string, workflowTemplat
return nil, util.NewUserError(codes.InvalidArgument, err.Error()) return nil, util.NewUserError(codes.InvalidArgument, err.Error())
} }
versionUnix := time.Now().Unix()
tx, err := c.DB.Begin()
if err != nil {
return nil, err
}
defer tx.Rollback()
wftSb := c.workflowTemplatesSelectBuilder(namespace).Where(sq.Eq{"wt.uid": workflowTemplate.UID})
query, args, err := wftSb.ToSql()
if err != nil {
return nil, err
}
workflowTemplateDb := &WorkflowTemplate{}
if err = c.DB.Get(workflowTemplateDb, query, args...); err != nil {
return nil, err
}
_, err = sb.Update("workflow_template_versions").
Set("is_latest", false).
Where(sq.Eq{
"workflow_template_id": workflowTemplateDb.ID,
}).
RunWith(tx).
Exec()
if err != nil {
return nil, err
}
_, err = sb.Insert("workflow_template_versions").
SetMap(sq.Eq{
"workflow_template_id": workflowTemplateDb.ID,
"version": versionUnix,
"is_latest": true,
"manifest": workflowTemplate.Manifest,
}).
RunWith(tx).
Exec()
if err != nil {
return nil, err
}
if err := tx.Commit(); err != nil {
return nil, err
}
latest, err := c.getArgoWorkflowTemplate(namespace, workflowTemplate.UID, "latest") latest, err := c.getArgoWorkflowTemplate(namespace, workflowTemplate.UID, "latest")
if err != nil { if err != nil {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
@@ -318,15 +369,13 @@ func (c *Client) CreateWorkflowTemplateVersion(namespace string, workflowTemplat
return nil, err return nil, err
} }
incrementedVersion, err := number.IncrementStringInt(latest.Labels[label.Version])
delete(latest.Labels, label.VersionLatest) delete(latest.Labels, label.VersionLatest)
if _, err := c.ArgoprojV1alpha1().WorkflowTemplates(namespace).Update(latest); err != nil { if _, err := c.ArgoprojV1alpha1().WorkflowTemplates(namespace).Update(latest); err != nil {
return nil, err return nil, err
} }
updatedTemplate, err := createArgoWorkflowTemplate(workflowTemplate, incrementedVersion) updatedTemplate, err := createArgoWorkflowTemplate(workflowTemplate, versionUnix)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -351,16 +400,11 @@ func (c *Client) CreateWorkflowTemplateVersion(namespace string, workflowTemplat
return nil, err return nil, err
} }
_, err = c.updateWorkflowTemplateVersions(namespace, workflowTemplate.UID)
if err != nil {
return nil, err
}
return workflowTemplate, nil return workflowTemplate, nil
} }
// If version is 0, it returns the latest. // If version is 0, it returns the latest.
func (c *Client) GetWorkflowTemplate(namespace, uid string, version int32) (workflowTemplate *WorkflowTemplate, err error) { func (c *Client) GetWorkflowTemplate(namespace, uid string, version int64) (workflowTemplate *WorkflowTemplate, err error) {
workflowTemplate, err = c.getWorkflowTemplate(namespace, uid, version) workflowTemplate, err = c.getWorkflowTemplate(namespace, uid, version)
if err != nil { if err != nil {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
@@ -377,7 +421,7 @@ func (c *Client) GetWorkflowTemplate(namespace, uid string, version int32) (work
return return
} }
func (c *Client) GetWorkflowTemplateByName(namespace, name string, version int32) (workflowTemplate *WorkflowTemplate, err error) { func (c *Client) GetWorkflowTemplateByName(namespace, name string, version int64) (workflowTemplate *WorkflowTemplate, err error) {
workflowTemplate, err = c.getWorkflowTemplateByName(namespace, name, version) workflowTemplate, err = c.getWorkflowTemplateByName(namespace, name, version)
if err != nil { if err != nil {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
@@ -471,7 +515,7 @@ func (c *Client) ArchiveWorkflowTemplate(namespace, uid string) (archived bool,
return return
} }
func createArgoWorkflowTemplate(workflowTemplate *WorkflowTemplate, version string) (*v1alpha1.WorkflowTemplate, error) { func createArgoWorkflowTemplate(workflowTemplate *WorkflowTemplate, version int64) (*v1alpha1.WorkflowTemplate, error) {
var argoWft *v1alpha1.WorkflowTemplate var argoWft *v1alpha1.WorkflowTemplate
var jsonOpts []argojson.JSONOpt var jsonOpts []argojson.JSONOpt
jsonOpts = append(jsonOpts, argojson.DisallowUnknownFields) jsonOpts = append(jsonOpts, argojson.DisallowUnknownFields)
@@ -494,7 +538,7 @@ func createArgoWorkflowTemplate(workflowTemplate *WorkflowTemplate, version stri
labels := map[string]string{ labels := map[string]string{
label.WorkflowTemplate: worfklowTemplateName, label.WorkflowTemplate: worfklowTemplateName,
label.WorkflowTemplateUid: workflowTemplate.UID, label.WorkflowTemplateUid: workflowTemplate.UID,
label.Version: version, label.Version: fmt.Sprintf("%v", version),
label.VersionLatest: "true", label.VersionLatest: "true",
} }
@@ -546,10 +590,28 @@ func (c *Client) listArgoWorkflowTemplates(namespace, workflowTemplateUid string
return &templates, nil return &templates, nil
} }
func (c *Client) listDbWorkflowTemplateVersions(namespace, workflowTemplateUid string) ([]*WorkflowTemplateVersion, error) {
versions := make([]*WorkflowTemplateVersion, 0)
sb := c.workflowTemplatesVersionSelectBuilder(namespace)
sb.Where(sq.Eq{"wt.uid": workflowTemplateUid})
sql, args, err := sb.ToSql()
if err != nil {
return versions, err
}
if err := c.DB.Select(&versions, sql, args...); err != nil {
return versions, err
}
return versions, nil
}
// prefix is the label prefix. // prefix is the label prefix.
// e.g. prefix/my-label-key: my-label-value // e.g. prefix/my-label-key: my-label-value
// if version is 0, latest is used. // if version is 0, latest is used.
func (c *Client) GetWorkflowTemplateLabels(namespace, name, prefix string, version int32) (labels map[string]string, err error) { func (c *Client) GetWorkflowTemplateLabels(namespace, name, prefix string, version int64) (labels map[string]string, err error) {
versionAsString := "latest" versionAsString := "latest"
if version != 0 { if version != 0 {
versionAsString = fmt.Sprintf("%v", version) versionAsString = fmt.Sprintf("%v", version)

View File

@@ -19,18 +19,13 @@ func NewWorkflowTemplateServer() *WorkflowTemplateServer {
} }
func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate { func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate {
manifest, err := wft.FormatManifest()
if err != nil {
manifest = ""
}
res := &api.WorkflowTemplate{ res := &api.WorkflowTemplate{
Uid: wft.UID, Uid: wft.UID,
CreatedAt: wft.CreatedAt.UTC().Format(time.RFC3339), CreatedAt: wft.CreatedAt.UTC().Format(time.RFC3339),
Name: wft.Name, Name: wft.Name,
Version: wft.Version, Version: wft.Version,
Versions: wft.Versions, Versions: wft.Versions,
Manifest: manifest, Manifest: wft.Manifest,
IsLatest: wft.IsLatest, IsLatest: wft.IsLatest,
IsArchived: wft.IsArchived, IsArchived: wft.IsArchived,
Labels: converter.MappingToKeyValue(wft.Labels), Labels: converter.MappingToKeyValue(wft.Labels),
@@ -39,7 +34,7 @@ func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate {
if wft.WorkflowExecutionStatisticReport != nil { if wft.WorkflowExecutionStatisticReport != nil {
res.Stats = &api.WorkflowExecutionStatisticReport{ res.Stats = &api.WorkflowExecutionStatisticReport{
Total: wft.WorkflowExecutionStatisticReport.Total, Total: wft.WorkflowExecutionStatisticReport.Total,
LastExecuted: wft.WorkflowExecutionStatisticReport.LastExecuted.String(), LastExecuted: wft.WorkflowExecutionStatisticReport.LastExecuted.Format(time.RFC3339),
Running: wft.WorkflowExecutionStatisticReport.Running, Running: wft.WorkflowExecutionStatisticReport.Running,
Completed: wft.WorkflowExecutionStatisticReport.Completed, Completed: wft.WorkflowExecutionStatisticReport.Completed,
Failed: wft.WorkflowExecutionStatisticReport.Failed, Failed: wft.WorkflowExecutionStatisticReport.Failed,