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

View File

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

View File

@@ -1,242 +1,142 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: auth.proto
package api
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
math "math"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// 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 {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *TokenWrapper) Reset() {
*x = TokenWrapper{}
if protoimpl.UnsafeEnabled {
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 (m *TokenWrapper) Reset() { *m = TokenWrapper{} }
func (m *TokenWrapper) String() string { return proto.CompactTextString(m) }
func (*TokenWrapper) ProtoMessage() {}
func (*TokenWrapper) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{0}
return fileDescriptor_8bbd6f3875b0e874, []int{0}
}
func (x *TokenWrapper) GetToken() string {
if x != nil {
return x.Token
func (m *TokenWrapper) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TokenWrapper.Unmarshal(m, b)
}
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 ""
}
type IsValidTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token *TokenWrapper `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
Token *TokenWrapper `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *IsValidTokenRequest) Reset() {
*x = IsValidTokenRequest{}
if protoimpl.UnsafeEnabled {
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 (m *IsValidTokenRequest) Reset() { *m = IsValidTokenRequest{} }
func (m *IsValidTokenRequest) String() string { return proto.CompactTextString(m) }
func (*IsValidTokenRequest) ProtoMessage() {}
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{1}
return fileDescriptor_8bbd6f3875b0e874, []int{1}
}
func (x *IsValidTokenRequest) GetToken() *TokenWrapper {
if x != nil {
return x.Token
func (m *IsValidTokenRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsValidTokenRequest.Unmarshal(m, b)
}
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
}
var File_auth_proto protoreflect.FileDescriptor
var file_auth_proto_rawDesc = []byte{
0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70,
0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
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,
func init() {
proto.RegisterType((*TokenWrapper)(nil), "api.TokenWrapper")
proto.RegisterType((*IsValidTokenRequest)(nil), "api.IsValidTokenRequest")
}
var (
file_auth_proto_rawDescOnce sync.Once
file_auth_proto_rawDescData = file_auth_proto_rawDesc
)
func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }
func file_auth_proto_rawDescGZIP() []byte {
file_auth_proto_rawDescOnce.Do(func() {
file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData)
})
return file_auth_proto_rawDescData
}
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_auth_proto_goTypes = []interface{}{
(*TokenWrapper)(nil), // 0: api.TokenWrapper
(*IsValidTokenRequest)(nil), // 1: api.IsValidTokenRequest
(*empty.Empty)(nil), // 2: google.protobuf.Empty
}
var file_auth_proto_depIdxs = []int32{
0, // 0: api.IsValidTokenRequest.token:type_name -> api.TokenWrapper
1, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
2, // 2: api.AuthService.IsValidToken:output_type -> google.protobuf.Empty
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
var fileDescriptor_8bbd6f3875b0e874 = []byte{
// 228 bytes of a gzipped FileDescriptorProto
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,
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,
0xa2, 0xc4, 0x82, 0x82, 0xd4, 0x22, 0x21, 0x11, 0x2e, 0xd6, 0x12, 0x10, 0x5f, 0x82, 0x51, 0x81,
0x51, 0x83, 0x33, 0x08, 0xc2, 0x51, 0xb2, 0xe3, 0x12, 0xf6, 0x2c, 0x0e, 0x4b, 0xcc, 0xc9, 0x4c,
0x01, 0x2b, 0x0e, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x52, 0x47, 0x56, 0xcc, 0x6d, 0x24,
0xa8, 0x97, 0x58, 0x90, 0xa9, 0x87, 0x6c, 0x1c, 0x54, 0xbf, 0x51, 0x05, 0x17, 0xb7, 0x63, 0x69,
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,
0x90, 0xe3, 0x95, 0xd4, 0x9b, 0x2e, 0x3f, 0x99, 0xcc, 0xa4, 0xa8, 0x24, 0x01, 0xf2, 0x73, 0xb1,
0x7e, 0x99, 0x61, 0x52, 0x6a, 0x49, 0xa2, 0xa1, 0x3e, 0x28, 0x60, 0xf4, 0xc1, 0x56, 0x5a, 0x41,
0x6c, 0x4e, 0x62, 0x03, 0x6b, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xdc, 0xc7, 0x76,
0x34, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
const _ = grpc.SupportPackageIsVersion4
// AuthServiceClient is the client API for AuthService service.
//
@@ -246,10 +146,10 @@ type AuthServiceClient interface {
}
type authServiceClient struct {
cc grpc.ClientConnInterface
cc *grpc.ClientConn
}
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
func NewAuthServiceClient(cc *grpc.ClientConn) AuthServiceClient {
return &authServiceClient{cc}
}
@@ -271,7 +171,7 @@ type AuthServiceServer interface {
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")
}

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.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: label.proto
package api
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
math "math"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// 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 {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *KeyValue) Reset() {
*x = KeyValue{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyValue) ProtoMessage() {}
func (x *KeyValue) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead.
func (m *KeyValue) Reset() { *m = KeyValue{} }
func (m *KeyValue) String() string { return proto.CompactTextString(m) }
func (*KeyValue) ProtoMessage() {}
func (*KeyValue) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{0}
return fileDescriptor_6100d2b5ae808f16, []int{0}
}
func (x *KeyValue) GetKey() string {
if x != nil {
return x.Key
func (m *KeyValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyValue.Unmarshal(m, b)
}
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 ""
}
func (x *KeyValue) GetValue() string {
if x != nil {
return x.Value
func (m *KeyValue) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
type Labels struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Items []*KeyValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
Items []*KeyValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *Labels) Reset() {
*x = Labels{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Labels) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Labels) ProtoMessage() {}
func (x *Labels) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Labels.ProtoReflect.Descriptor instead.
func (m *Labels) Reset() { *m = Labels{} }
func (m *Labels) String() string { return proto.CompactTextString(m) }
func (*Labels) ProtoMessage() {}
func (*Labels) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{1}
return fileDescriptor_6100d2b5ae808f16, []int{1}
}
func (x *Labels) GetItems() []*KeyValue {
if x != nil {
return x.Items
func (m *Labels) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Labels.Unmarshal(m, b)
}
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
}
type AddLabelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *AddLabelsRequest) Reset() {
*x = AddLabelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AddLabelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AddLabelsRequest) ProtoMessage() {}
func (x *AddLabelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AddLabelsRequest.ProtoReflect.Descriptor instead.
func (m *AddLabelsRequest) Reset() { *m = AddLabelsRequest{} }
func (m *AddLabelsRequest) String() string { return proto.CompactTextString(m) }
func (*AddLabelsRequest) ProtoMessage() {}
func (*AddLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{2}
return fileDescriptor_6100d2b5ae808f16, []int{2}
}
func (x *AddLabelsRequest) GetNamespace() string {
if x != nil {
return x.Namespace
func (m *AddLabelsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddLabelsRequest.Unmarshal(m, b)
}
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 ""
}
func (x *AddLabelsRequest) GetName() string {
if x != nil {
return x.Name
func (m *AddLabelsRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (x *AddLabelsRequest) GetLabels() *Labels {
if x != nil {
return x.Labels
func (m *AddLabelsRequest) GetLabels() *Labels {
if m != nil {
return m.Labels
}
return nil
}
type ReplaceLabelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Labels *Labels `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *ReplaceLabelsRequest) Reset() {
*x = ReplaceLabelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReplaceLabelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReplaceLabelsRequest) ProtoMessage() {}
func (x *ReplaceLabelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReplaceLabelsRequest.ProtoReflect.Descriptor instead.
func (m *ReplaceLabelsRequest) Reset() { *m = ReplaceLabelsRequest{} }
func (m *ReplaceLabelsRequest) String() string { return proto.CompactTextString(m) }
func (*ReplaceLabelsRequest) ProtoMessage() {}
func (*ReplaceLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{3}
return fileDescriptor_6100d2b5ae808f16, []int{3}
}
func (x *ReplaceLabelsRequest) GetNamespace() string {
if x != nil {
return x.Namespace
func (m *ReplaceLabelsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplaceLabelsRequest.Unmarshal(m, b)
}
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 ""
}
func (x *ReplaceLabelsRequest) GetName() string {
if x != nil {
return x.Name
func (m *ReplaceLabelsRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (x *ReplaceLabelsRequest) GetLabels() *Labels {
if x != nil {
return x.Labels
func (m *ReplaceLabelsRequest) GetLabels() *Labels {
if m != nil {
return m.Labels
}
return nil
}
type GetLabelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *GetLabelsRequest) Reset() {
*x = GetLabelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetLabelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetLabelsRequest) ProtoMessage() {}
func (x *GetLabelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetLabelsRequest.ProtoReflect.Descriptor instead.
func (m *GetLabelsRequest) Reset() { *m = GetLabelsRequest{} }
func (m *GetLabelsRequest) String() string { return proto.CompactTextString(m) }
func (*GetLabelsRequest) ProtoMessage() {}
func (*GetLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{4}
return fileDescriptor_6100d2b5ae808f16, []int{4}
}
func (x *GetLabelsRequest) GetNamespace() string {
if x != nil {
return x.Namespace
func (m *GetLabelsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLabelsRequest.Unmarshal(m, b)
}
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 ""
}
func (x *GetLabelsRequest) GetName() string {
if x != nil {
return x.Name
func (m *GetLabelsRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type GetLabelsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Labels []*KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
Labels []*KeyValue `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *GetLabelsResponse) Reset() {
*x = GetLabelsResponse{}
if protoimpl.UnsafeEnabled {
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 (m *GetLabelsResponse) Reset() { *m = GetLabelsResponse{} }
func (m *GetLabelsResponse) String() string { return proto.CompactTextString(m) }
func (*GetLabelsResponse) ProtoMessage() {}
func (*GetLabelsResponse) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{5}
return fileDescriptor_6100d2b5ae808f16, []int{5}
}
func (x *GetLabelsResponse) GetLabels() []*KeyValue {
if x != nil {
return x.Labels
func (m *GetLabelsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLabelsResponse.Unmarshal(m, b)
}
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
}
type DeleteLabelRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *DeleteLabelRequest) Reset() {
*x = DeleteLabelRequest{}
if protoimpl.UnsafeEnabled {
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 (m *DeleteLabelRequest) Reset() { *m = DeleteLabelRequest{} }
func (m *DeleteLabelRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteLabelRequest) ProtoMessage() {}
func (*DeleteLabelRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{6}
return fileDescriptor_6100d2b5ae808f16, []int{6}
}
func (x *DeleteLabelRequest) GetNamespace() string {
if x != nil {
return x.Namespace
func (m *DeleteLabelRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteLabelRequest.Unmarshal(m, b)
}
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 ""
}
func (x *DeleteLabelRequest) GetName() string {
if x != nil {
return x.Name
func (m *DeleteLabelRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (x *DeleteLabelRequest) GetKey() string {
if x != nil {
return x.Key
func (m *DeleteLabelRequest) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
var File_label_proto protoreflect.FileDescriptor
var file_label_proto_rawDesc = []byte{
0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61,
0x70, 0x69, 0x22, 0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2d, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x12, 0x23, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 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,
func init() {
proto.RegisterType((*KeyValue)(nil), "api.KeyValue")
proto.RegisterType((*Labels)(nil), "api.Labels")
proto.RegisterType((*AddLabelsRequest)(nil), "api.AddLabelsRequest")
proto.RegisterType((*ReplaceLabelsRequest)(nil), "api.ReplaceLabelsRequest")
proto.RegisterType((*GetLabelsRequest)(nil), "api.GetLabelsRequest")
proto.RegisterType((*GetLabelsResponse)(nil), "api.GetLabelsResponse")
proto.RegisterType((*DeleteLabelRequest)(nil), "api.DeleteLabelRequest")
}
var (
file_label_proto_rawDescOnce sync.Once
file_label_proto_rawDescData = file_label_proto_rawDesc
)
func init() { proto.RegisterFile("label.proto", fileDescriptor_6100d2b5ae808f16) }
func file_label_proto_rawDescGZIP() []byte {
file_label_proto_rawDescOnce.Do(func() {
file_label_proto_rawDescData = protoimpl.X.CompressGZIP(file_label_proto_rawDescData)
})
return file_label_proto_rawDescData
}
var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_label_proto_goTypes = []interface{}{
(*KeyValue)(nil), // 0: api.KeyValue
(*Labels)(nil), // 1: api.Labels
(*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest
(*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest
(*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest
(*GetLabelsResponse)(nil), // 5: api.GetLabelsResponse
(*DeleteLabelRequest)(nil), // 6: api.DeleteLabelRequest
}
var file_label_proto_depIdxs = []int32{
0, // 0: api.Labels.items:type_name -> api.KeyValue
1, // 1: api.AddLabelsRequest.labels:type_name -> api.Labels
1, // 2: api.ReplaceLabelsRequest.labels:type_name -> api.Labels
0, // 3: api.GetLabelsResponse.labels:type_name -> api.KeyValue
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
var fileDescriptor_6100d2b5ae808f16 = []byte{
// 247 bytes of a gzipped FileDescriptorProto
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,
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,
0xd1, 0xc3, 0xc5, 0x13, 0x1d, 0x5e, 0x94, 0xd9, 0x13, 0xd6, 0xc0, 0xde, 0xe8, 0xc0, 0x8b, 0xa6,
0x68, 0xe7, 0x32, 0x84, 0xb8, 0x80, 0xd9, 0x67, 0x90, 0xf8, 0x59, 0xac, 0xa5, 0x44, 0xdc, 0x42,
0xf9, 0x1c, 0x7c, 0x1c, 0x2e, 0x61, 0xa6, 0x3d, 0x0d, 0x8e, 0x17, 0x0d, 0x6b, 0xab, 0xfe, 0xb2,
0x53, 0x56, 0x77, 0x47, 0x3f, 0x99, 0x34, 0xa1, 0xa1, 0x7e, 0xd8, 0x6e, 0xd3, 0x0b, 0x49, 0xef,
0x7b, 0x72, 0x1e, 0xaf, 0x61, 0xbe, 0x53, 0x03, 0x39, 0xab, 0x36, 0x94, 0x81, 0xdf, 0x05, 0x44,
0x38, 0x0f, 0x49, 0xa6, 0xc6, 0x18, 0x97, 0x50, 0xc6, 0xe6, 0x1d, 0x67, 0x4d, 0xd1, 0x56, 0x7d,
0x15, 0x59, 0xd9, 0x35, 0x4b, 0x62, 0x80, 0x85, 0x24, 0x6b, 0xd4, 0x86, 0x4e, 0x82, 0x5b, 0x41,
0xfd, 0x48, 0xfe, 0x9f, 0x28, 0x71, 0x0f, 0x57, 0x3f, 0x5c, 0x9c, 0x1d, 0x77, 0x8e, 0xf0, 0x66,
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,
0xc9, 0xad, 0xce, 0x33, 0x02, 0x00, 0x00,
}

View File

@@ -1,164 +1,93 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.21.0
// protoc v3.11.3
// source: metric.proto
package api
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
math "math"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// 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 {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (x *Metric) Reset() {
*x = Metric{}
if protoimpl.UnsafeEnabled {
mi := &file_metric_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Metric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Metric) ProtoMessage() {}
func (x *Metric) ProtoReflect() protoreflect.Message {
mi := &file_metric_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Metric.ProtoReflect.Descriptor instead.
func (m *Metric) Reset() { *m = Metric{} }
func (m *Metric) String() string { return proto.CompactTextString(m) }
func (*Metric) ProtoMessage() {}
func (*Metric) Descriptor() ([]byte, []int) {
return file_metric_proto_rawDescGZIP(), []int{0}
return fileDescriptor_da41641f55bff5df, []int{0}
}
func (x *Metric) GetName() string {
if x != nil {
return x.Name
func (m *Metric) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Metric.Unmarshal(m, b)
}
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 ""
}
func (x *Metric) GetValue() float64 {
if x != nil {
return x.Value
func (m *Metric) GetValue() float64 {
if m != nil {
return m.Value
}
return 0
}
func (x *Metric) GetFormat() string {
if x != nil {
return x.Format
func (m *Metric) GetFormat() string {
if m != nil {
return m.Format
}
return ""
}
var File_metric_proto protoreflect.FileDescriptor
var file_metric_proto_rawDesc = []byte{
0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03,
0x61, 0x70, 0x69, 0x22, 0x4a, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
func init() {
proto.RegisterType((*Metric)(nil), "api.Metric")
}
var (
file_metric_proto_rawDescOnce sync.Once
file_metric_proto_rawDescData = file_metric_proto_rawDesc
)
func init() { proto.RegisterFile("metric.proto", fileDescriptor_da41641f55bff5df) }
func file_metric_proto_rawDescGZIP() []byte {
file_metric_proto_rawDescOnce.Do(func() {
file_metric_proto_rawDescData = protoimpl.X.CompressGZIP(file_metric_proto_rawDescData)
})
return file_metric_proto_rawDescData
}
var file_metric_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_metric_proto_goTypes = []interface{}{
(*Metric)(nil), // 0: api.Metric
}
var file_metric_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_metric_proto_init() }
func file_metric_proto_init() {
if File_metric_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_metric_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Metric); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_metric_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_metric_proto_goTypes,
DependencyIndexes: file_metric_proto_depIdxs,
MessageInfos: file_metric_proto_msgTypes,
}.Build()
File_metric_proto = out.File
file_metric_proto_rawDesc = nil
file_metric_proto_goTypes = nil
file_metric_proto_depIdxs = nil
var fileDescriptor_da41641f55bff5df = []byte{
// 105 bytes of a gzipped FileDescriptorProto
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,
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,
0x89, 0x04, 0x33, 0x58, 0x2d, 0x94, 0x97, 0xc4, 0x06, 0x36, 0xd7, 0x18, 0x10, 0x00, 0x00, 0xff,
0xff, 0x88, 0xf0, 0xba, 0x92, 0x67, 0x00, 0x00, 0x00,
}

View File

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

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")
}
protoReq.Version, err = runtime.Int32(val)
protoReq.Version, err = runtime.Int64(val)
if err != nil {
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")
}
protoReq.Version, err = runtime.Int32(val)
protoReq.Version, err = runtime.Int64(val)
if err != nil {
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")
}
protoReq.Version, err = runtime.Int32(val)
protoReq.Version, err = runtime.Int64(val)
if err != nil {
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")
}
protoReq.Version, err = runtime.Int32(val)
protoReq.Version, err = runtime.Int64(val)
if err != nil {
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 {
string namespace = 1;
string uid = 2;
int32 version = 3;
int64 version = 3;
}
message CloneWorkflowTemplateRequest {
string namespace = 1;
string uid = 2;
string name = 3;
int32 version = 4;
int64 version = 4;
}
message ListWorkflowTemplateVersionsRequest {
@@ -153,8 +153,8 @@ message WorkflowTemplate {
string createdAt = 1;
string uid = 2;
string name = 3;
int32 version = 4;
int32 versions = 5;
int64 version = 4;
int64 versions = 5;
string manifest = 6;
bool isLatest = 7;
bool isArchived = 8;
@@ -166,6 +166,6 @@ message WorkflowTemplate {
message GetWorkflowTemplateLabelsRequest {
string namespace = 1;
string name = 2;
int32 version = 3;
int64 version = 3;
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/grpc-ecosystem/go-grpc-middleware v1.2.0
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/jmoiron/sqlx v1.2.0
github.com/lib/pq v1.3.0
@@ -32,8 +32,8 @@ require (
github.com/ziutek/mymysql v1.5.4 // indirect
google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36
google.golang.org/grpc v1.28.0
gopkg.in/yaml.v2 v2.2.8
google.golang.org/protobuf v1.21.0
gopkg.in/yaml.v2 v2.2.8
k8s.io/api v0.16.4
k8s.io/apimachinery v0.16.7-beta.0
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",
config["databaseHost"], config["databaseUsername"], config["databasePassword"], config["databaseName"])
"localhost", "admin", "admin", "onepanel-core")
db := sqlx.MustConnect(config["databaseDriverName"], databaseDataSourceName)
if err := goose.Run("up", db.DB, "db"); err != nil {
log.Fatalf("Failed to run database migrations: %v", err)
@@ -59,7 +59,7 @@ func main() {
func startRPCServer(db *v1.DB, kubeConfig *v1.Config) {
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 {
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 {
return nil, err
}
err = InjectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
if err != nil {
return nil, err
@@ -448,6 +449,7 @@ func (c *Client) createCronWorkflow(namespace string, workflowTemplateId *uint64
if err != nil {
return nil, err
}
cwf.Spec.WorkflowSpec = wf.Spec
cwf.Spec.WorkflowMetadata = &wf.ObjectMeta

View File

@@ -61,8 +61,8 @@ type WorkflowTemplate struct {
UID string
Name string
Manifest string
Version int32
Versions int32 `db:"versions"`
Version int64
Versions int64 `db:"versions"`
IsLatest bool
IsArchived bool `db:"is_archived"`
ArgoWorkflowTemplate *wfv1.WorkflowTemplate
@@ -79,6 +79,14 @@ type WorkflowExecutionStatisticReport struct {
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 {
ID uint64
WorkflowTemplateId uint64

View File

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

View File

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

View File

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