diff --git a/examples/go.mod b/examples/go.mod index 9c26ba18..2aa96527 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -22,16 +22,16 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/briandowns/spinner v1.18.1 // indirect github.com/catppuccin/go v0.3.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/charmbracelet/bubbles v0.21.0 // indirect - github.com/charmbracelet/bubbletea v1.3.4 // indirect - github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/charmbracelet/bubbles v1.0.0 // indirect + github.com/charmbracelet/bubbletea v1.3.10 // indirect + github.com/charmbracelet/colorprofile v0.4.1 // indirect github.com/charmbracelet/huh v0.7.0 // indirect github.com/charmbracelet/lipgloss v1.1.0 // indirect - github.com/charmbracelet/x/ansi v0.8.0 // indirect - github.com/charmbracelet/x/cellbuf v0.0.13 // indirect + github.com/charmbracelet/x/ansi v0.11.6 // indirect + github.com/charmbracelet/x/cellbuf v0.0.15 // indirect github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect - github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/charmbracelet/x/term v0.2.2 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/containerd v1.6.20 // indirect github.com/containerd/continuity v0.4.1 // indirect @@ -54,13 +54,13 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fvbommel/sortorder v1.0.1 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/mux v1.8.0 // indirect @@ -72,12 +72,12 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.16.3 // indirect github.com/klauspost/cpuid/v2 v2.0.4 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/lucasb-eyer/go-colorful v1.3.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mattn/go-runewidth v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/pkcs11 v1.1.1 // indirect github.com/minio/sha256-simd v1.0.0 // indirect @@ -115,7 +115,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.14.0 // indirect - github.com/stretchr/testify v1.10.0 // indirect + github.com/stretchr/testify v1.11.1 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/theupdateframework/notary v0.6.1 // indirect github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // indirect @@ -126,28 +126,28 @@ require ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel v1.39.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/sdk v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect go.opentelemetry.io/proto/otlp v0.12.0 // indirect - golang.org/x/crypto v0.33.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.29.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/mod v0.30.0 // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/term v0.38.0 // indirect + golang.org/x/text v0.32.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.39.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect + google.golang.org/grpc v1.79.2 // indirect + google.golang.org/protobuf v1.36.10 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index 37bf11b7..1d8362c9 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -101,20 +101,26 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.21.0 h1:9TdC97SdRVg/1aaXNVWfFH3nnLAwOXr8Fn6u6mfQdFs= github.com/charmbracelet/bubbles v0.21.0/go.mod h1:HF+v6QUR4HkEpz62dx7ym2xc71/KBHg+zKwJtMw+qtg= +github.com/charmbracelet/bubbles v1.0.0/go.mod h1:9d/Zd5GdnauMI5ivUIVisuEm3ave1XwXtD1ckyV6r3E= github.com/charmbracelet/bubbletea v1.3.4 h1:kCg7B+jSCFPLYRA52SDZjr51kG/fMUEoPoZrkaDHyoI= github.com/charmbracelet/bubbletea v1.3.4/go.mod h1:dtcUCyCGEX3g9tosuYiut3MXgY/Jsv9nKVdibKKRRXo= +github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= +github.com/charmbracelet/colorprofile v0.4.1/go.mod h1:U1d9Dljmdf9DLegaJ0nGZNJvoXAhayhmidOdcBwAvKk= github.com/charmbracelet/huh v0.7.0 h1:W8S1uyGETgj9Tuda3/JdVkc3x7DBLZYPZc4c+/rnRdc= github.com/charmbracelet/huh v0.7.0/go.mod h1:UGC3DZHlgOKHvHC07a5vHag41zzhpPFj34U92sOmyuk= github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= +github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ= github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k= github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q= github.com/charmbracelet/x/conpty v0.1.0 h1:4zc8KaIcbiL4mghEON8D72agYtSeIgq8FSThSPQIb+U= github.com/charmbracelet/x/conpty v0.1.0/go.mod h1:rMFsDJoDwVmiYM10aD4bH2XiRgwI7NYJtQgl5yskjEQ= github.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 h1:JSt3B+U9iqk37QUU2Rvb6DSBYRLtWqFqfxf8l5hOZUA= @@ -125,6 +131,7 @@ github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 h1:qko github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0/go.mod h1:pBhA0ybfXv6hDjQUZ7hk1lVxBiUbupdw5R31yPUViVQ= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY= github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= github.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI= @@ -240,6 +247,7 @@ github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= @@ -291,6 +299,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= @@ -398,6 +407,7 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= @@ -416,6 +426,7 @@ github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+Ei github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -562,6 +573,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/theupdateframework/notary v0.6.1 h1:7wshjstgS9x9F5LuB1L5mBI2xNMObWqjz+cjWoom6l0= @@ -597,17 +609,21 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1: go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= @@ -625,6 +641,7 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -662,6 +679,7 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -701,6 +719,7 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -714,6 +733,7 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -726,6 +746,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -787,11 +808,13 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -802,6 +825,7 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -858,6 +882,7 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -931,8 +956,10 @@ google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ19 google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -955,6 +982,7 @@ google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ5 google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.79.2/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -970,6 +998,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/pkg/api/ci.go b/pkg/api/ci.go index 340d34bb..7259da2f 100644 --- a/pkg/api/ci.go +++ b/pkg/api/ci.go @@ -15,12 +15,21 @@ import ( "github.com/depot/cli/pkg/proto/depot/ci/v1/civ1connect" civ2 "github.com/depot/cli/pkg/proto/depot/ci/v2" "github.com/depot/cli/pkg/proto/depot/ci/v2/civ2connect" + civ3beta2 "github.com/depot/cli/pkg/proto/depot/ci/v3beta2" + "github.com/depot/cli/pkg/proto/depot/ci/v3beta2/civ3beta2connect" + "google.golang.org/protobuf/types/known/timestamppb" ) var baseURLFunc = getBaseURL const ciStreamLogDedupeSize = 4096 +const ( + ciDefaultVariantName = "default" + ciDefaultPage = 1 + ciMaxPageSize = 100 +) + var ( ciStreamInitialBackoff = 250 * time.Millisecond ciStreamMaxBackoff = 30 * time.Second @@ -623,6 +632,153 @@ func CIDeleteSecret(ctx context.Context, token, orgID, name, repo string) error return err } +func newCISecretServiceV3Beta2Client() civ3beta2connect.SecretServiceClient { + baseURL := baseURLFunc() + return civ3beta2connect.NewSecretServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent()) +} + +// CIVariantAttribute describes a condition that controls where a secret or variable variant applies. +type CIVariantAttribute struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// CISecretGroup contains a logical CI secret and its variants. +type CISecretGroup struct { + ID string `json:"id"` + Name string `json:"name"` + Variants []CISecretVariant `json:"variants"` + VariantCount uint32 `json:"variantCount"` + LastModified string `json:"lastModified,omitempty"` +} + +// CISecretVariant contains metadata for one named CI secret variant. Secret values are never returned. +type CISecretVariant struct { + ID string `json:"id"` + SecretID string `json:"secretId"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Attributes []CIVariantAttribute `json:"attributes,omitempty"` + LastModified string `json:"lastModified,omitempty"` + ValueGroupIndex *uint32 `json:"valueGroupIndex,omitempty"` +} + +type CIListSecretVariantsOptions struct { + Query string + Repo []string + Environment []string + Branch []string + Workflow []string +} + +type CIListSecretVariantsResult struct { + Secrets []CISecretGroup `json:"secrets"` +} + +type CISetSecretVariantOptions struct { + Name string + Variant string + Value string + Description string + Repo []string + Environment []string + Branch []string + Workflow []string +} + +type CISetSecretVariantResult struct { + Secret CISecretGroup `json:"secret"` + Variant CISecretVariant `json:"variant"` + CreatedSecret bool `json:"createdSecret"` + CreatedVariant bool `json:"createdVariant"` +} + +func CIListSecretVariants(ctx context.Context, token, orgID string, opts CIListSecretVariantsOptions) (CIListSecretVariantsResult, error) { + client := newCISecretServiceV3Beta2Client() + + attrs := ciAttributes(opts.Repo, opts.Environment, opts.Branch, opts.Workflow) + result := CIListSecretVariantsResult{Secrets: []CISecretGroup{}} + for page := uint32(ciDefaultPage); ; page++ { + resp, err := client.ListSecrets(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.ListSecretsRequest{ + Page: ciPageRequest(page), + Query: opts.Query, + Attributes: attrs, + }), token, orgID)) + if err != nil { + return CIListSecretVariantsResult{}, err + } + + result.Secrets = append(result.Secrets, secretGroupsFromProto(resp.Msg.GetSecrets())...) + if !resp.Msg.GetPage().GetHasMore() { + return result, nil + } + } +} + +func CIGetSecretVariantGroup(ctx context.Context, token, orgID, name string) (CISecretGroup, error) { + client := newCISecretServiceV3Beta2Client() + resp, err := client.GetSecret(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.GetSecretRequest{ + Lookup: &civ3beta2.GetSecretRequest_Name{Name: name}, + }), token, orgID)) + if err != nil { + return CISecretGroup{}, err + } + return secretGroupFromProto(resp.Msg.GetSecret()), nil +} + +func CIGetSecretVariant(ctx context.Context, token, orgID, variantID string) (CISecretVariant, error) { + client := newCISecretServiceV3Beta2Client() + resp, err := client.GetSecretVariant(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.GetSecretVariantRequest{ + Id: variantID, + }), token, orgID)) + if err != nil { + return CISecretVariant{}, err + } + return secretVariantFromProto(resp.Msg.GetVariant()), nil +} + +func CISetSecretVariant(ctx context.Context, token, orgID string, opts CISetSecretVariantOptions) (CISetSecretVariantResult, error) { + client := newCISecretServiceV3Beta2Client() + req := &civ3beta2.SetSecretVariantRequest{ + SecretName: opts.Name, + VariantName: ciVariantName(opts.Variant), + Value: opts.Value, + Attributes: ciAttributes(opts.Repo, opts.Environment, opts.Branch, opts.Workflow), + } + if opts.Description != "" { + req.Description = &opts.Description + } + + resp, err := client.SetSecretVariant(ctx, WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + return CISetSecretVariantResult{}, err + } + + return CISetSecretVariantResult{ + Secret: secretGroupFromProto(resp.Msg.GetSecret()), + Variant: secretVariantFromProto(resp.Msg.GetVariant()), + CreatedSecret: resp.Msg.GetCreatedSecret(), + CreatedVariant: resp.Msg.GetCreatedVariant(), + }, nil +} + +func CIDeleteSecretVariant(ctx context.Context, token, orgID, variantID string) (bool, error) { + client := newCISecretServiceV3Beta2Client() + resp, err := client.DeleteSecretVariant(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.DeleteSecretVariantRequest{VariantId: variantID}), token, orgID)) + if err != nil { + return false, err + } + return resp.Msg.GetDeletedSecret(), nil +} + +func CIDeleteSecretGroup(ctx context.Context, token, orgID, name string) error { + client := newCISecretServiceV3Beta2Client() + _, err := client.DeleteSecret(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.DeleteSecretRequest{ + Lookup: &civ3beta2.DeleteSecretRequest_Name{Name: name}, + }), token, orgID)) + return err +} + func newCIVariableServiceV2Client() civ2connect.VariableServiceClient { baseURL := baseURLFunc() return civ2connect.NewVariableServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent()) @@ -707,3 +863,275 @@ func CIDeleteVariable(ctx context.Context, token, orgID, name, repo string) erro _, err := client.RemoveOrgVariable(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ2.RemoveOrgVariableRequest{Name: name}), token, orgID)) return err } + +func newCIVariableServiceV3Beta2Client() civ3beta2connect.VariableServiceClient { + baseURL := baseURLFunc() + return civ3beta2connect.NewVariableServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent()) +} + +// CIVariableGroup contains a logical CI variable and its variants. +type CIVariableGroup struct { + ID string `json:"id"` + Name string `json:"name"` + Variants []CIVariableVariant `json:"variants"` + VariantCount uint32 `json:"variantCount"` + LastModified string `json:"lastModified,omitempty"` +} + +// CIVariableVariant contains metadata and value for one named CI variable variant. +type CIVariableVariant struct { + ID string `json:"id"` + VariableID string `json:"variableId"` + Name string `json:"name"` + Value string `json:"value"` + Description string `json:"description,omitempty"` + Attributes []CIVariantAttribute `json:"attributes,omitempty"` + LastModified string `json:"lastModified,omitempty"` +} + +type CIListVariableVariantsOptions struct { + Query string + Repo []string + Environment []string + Branch []string + Workflow []string +} + +type CIListVariableVariantsResult struct { + Variables []CIVariableGroup `json:"variables"` +} + +type CISetVariableVariantOptions struct { + Name string + Variant string + Value string + Description string + Repo []string + Environment []string + Branch []string + Workflow []string +} + +type CISetVariableVariantResult struct { + Variable CIVariableGroup `json:"variable"` + Variant CIVariableVariant `json:"variant"` + CreatedVariable bool `json:"createdVariable"` + CreatedVariant bool `json:"createdVariant"` +} + +func CIListVariableVariants(ctx context.Context, token, orgID string, opts CIListVariableVariantsOptions) (CIListVariableVariantsResult, error) { + client := newCIVariableServiceV3Beta2Client() + + attrs := ciAttributes(opts.Repo, opts.Environment, opts.Branch, opts.Workflow) + result := CIListVariableVariantsResult{Variables: []CIVariableGroup{}} + for page := uint32(ciDefaultPage); ; page++ { + resp, err := client.ListVariables(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.ListVariablesRequest{ + Page: ciPageRequest(page), + Query: opts.Query, + Attributes: attrs, + }), token, orgID)) + if err != nil { + return CIListVariableVariantsResult{}, err + } + + result.Variables = append(result.Variables, variableGroupsFromProto(resp.Msg.GetVariables())...) + if !resp.Msg.GetPage().GetHasMore() { + return result, nil + } + } +} + +func CIGetVariableVariantGroup(ctx context.Context, token, orgID, name string) (CIVariableGroup, error) { + client := newCIVariableServiceV3Beta2Client() + resp, err := client.GetVariable(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.GetVariableRequest{ + Lookup: &civ3beta2.GetVariableRequest_Name{Name: name}, + }), token, orgID)) + if err != nil { + return CIVariableGroup{}, err + } + return variableGroupFromProto(resp.Msg.GetVariable()), nil +} + +func CISetVariableVariant(ctx context.Context, token, orgID string, opts CISetVariableVariantOptions) (CISetVariableVariantResult, error) { + client := newCIVariableServiceV3Beta2Client() + req := &civ3beta2.SetVariableVariantRequest{ + VariableName: opts.Name, + VariantName: ciVariantName(opts.Variant), + Value: opts.Value, + Attributes: ciAttributes(opts.Repo, opts.Environment, opts.Branch, opts.Workflow), + } + if opts.Description != "" { + req.Description = &opts.Description + } + + resp, err := client.SetVariableVariant(ctx, WithAuthenticationAndOrg(connect.NewRequest(req), token, orgID)) + if err != nil { + return CISetVariableVariantResult{}, err + } + + return CISetVariableVariantResult{ + Variable: variableGroupFromProto(resp.Msg.GetVariable()), + Variant: variableVariantFromProto(resp.Msg.GetVariant()), + CreatedVariable: resp.Msg.GetCreatedVariable(), + CreatedVariant: resp.Msg.GetCreatedVariant(), + }, nil +} + +func CIDeleteVariableVariant(ctx context.Context, token, orgID, variantID string) (bool, error) { + client := newCIVariableServiceV3Beta2Client() + resp, err := client.DeleteVariableVariant(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.DeleteVariableVariantRequest{VariantId: variantID}), token, orgID)) + if err != nil { + return false, err + } + return resp.Msg.GetDeletedVariable(), nil +} + +func CIDeleteVariableGroup(ctx context.Context, token, orgID, name string) error { + client := newCIVariableServiceV3Beta2Client() + _, err := client.DeleteVariable(ctx, WithAuthenticationAndOrg(connect.NewRequest(&civ3beta2.DeleteVariableRequest{ + Lookup: &civ3beta2.DeleteVariableRequest_Name{Name: name}, + }), token, orgID)) + return err +} + +func ciVariantName(name string) string { + if name == "" { + return ciDefaultVariantName + } + return name +} + +func ciPageRequest(page uint32) *civ3beta2.PageRequest { + if page == 0 { + page = ciDefaultPage + } + return &civ3beta2.PageRequest{Page: page, PageSize: ciMaxPageSize} +} + +func ciAttributes(repos, environments, branches, workflows []string) []*civ3beta2.Attribute { + attrs := make([]*civ3beta2.Attribute, 0, len(repos)+len(environments)+len(branches)+len(workflows)) + for _, repo := range repos { + if repo != "" { + attrs = append(attrs, &civ3beta2.Attribute{Key: "repository", Value: repo}) + } + } + for _, environment := range environments { + if environment != "" { + attrs = append(attrs, &civ3beta2.Attribute{Key: "environment", Value: environment}) + } + } + for _, branch := range branches { + if branch != "" { + attrs = append(attrs, &civ3beta2.Attribute{Key: "branch", Value: branch}) + } + } + for _, workflow := range workflows { + if workflow != "" { + attrs = append(attrs, &civ3beta2.Attribute{Key: "workflow", Value: workflow}) + } + } + return attrs +} + +func ciAttributesFromProto(attrs []*civ3beta2.Attribute) []CIVariantAttribute { + result := make([]CIVariantAttribute, 0, len(attrs)) + for _, attr := range attrs { + result = append(result, CIVariantAttribute{Key: attr.GetKey(), Value: attr.GetValue()}) + } + return result +} + +func ciTimeString(ts *timestamppb.Timestamp) string { + if ts == nil { + return "" + } + return ts.AsTime().Format(time.RFC3339) +} + +func secretGroupsFromProto(secrets []*civ3beta2.Secret) []CISecretGroup { + result := make([]CISecretGroup, 0, len(secrets)) + for _, secret := range secrets { + result = append(result, secretGroupFromProto(secret)) + } + return result +} + +func secretGroupFromProto(secret *civ3beta2.Secret) CISecretGroup { + if secret == nil { + return CISecretGroup{} + } + return CISecretGroup{ + ID: secret.GetId(), + Name: secret.GetName(), + Variants: secretVariantsFromProto(secret.GetVariants()), + VariantCount: secret.GetVariantCount(), + LastModified: ciTimeString(secret.GetLastModified()), + } +} + +func secretVariantsFromProto(variants []*civ3beta2.SecretVariant) []CISecretVariant { + result := make([]CISecretVariant, 0, len(variants)) + for _, variant := range variants { + result = append(result, secretVariantFromProto(variant)) + } + return result +} + +func secretVariantFromProto(variant *civ3beta2.SecretVariant) CISecretVariant { + if variant == nil { + return CISecretVariant{} + } + return CISecretVariant{ + ID: variant.GetId(), + SecretID: variant.GetSecretId(), + Name: variant.GetName(), + Description: variant.GetDescription(), + Attributes: ciAttributesFromProto(variant.GetAttributes()), + LastModified: ciTimeString(variant.GetLastModified()), + ValueGroupIndex: variant.ValueGroupIndex, + } +} + +func variableGroupsFromProto(variables []*civ3beta2.Variable) []CIVariableGroup { + result := make([]CIVariableGroup, 0, len(variables)) + for _, variable := range variables { + result = append(result, variableGroupFromProto(variable)) + } + return result +} + +func variableGroupFromProto(variable *civ3beta2.Variable) CIVariableGroup { + if variable == nil { + return CIVariableGroup{} + } + return CIVariableGroup{ + ID: variable.GetId(), + Name: variable.GetName(), + Variants: variableVariantsFromProto(variable.GetVariants()), + VariantCount: variable.GetVariantCount(), + LastModified: ciTimeString(variable.GetLastModified()), + } +} + +func variableVariantsFromProto(variants []*civ3beta2.VariableVariant) []CIVariableVariant { + result := make([]CIVariableVariant, 0, len(variants)) + for _, variant := range variants { + result = append(result, variableVariantFromProto(variant)) + } + return result +} + +func variableVariantFromProto(variant *civ3beta2.VariableVariant) CIVariableVariant { + if variant == nil { + return CIVariableVariant{} + } + return CIVariableVariant{ + ID: variant.GetId(), + VariableID: variant.GetVariableId(), + Name: variant.GetName(), + Value: variant.GetValue(), + Description: variant.GetDescription(), + Attributes: ciAttributesFromProto(variant.GetAttributes()), + LastModified: ciTimeString(variant.GetLastModified()), + } +} diff --git a/pkg/api/ci_test.go b/pkg/api/ci_test.go index abddef7a..7dcd2667 100644 --- a/pkg/api/ci_test.go +++ b/pkg/api/ci_test.go @@ -15,6 +15,8 @@ import ( "connectrpc.com/connect" civ1 "github.com/depot/cli/pkg/proto/depot/ci/v1" "github.com/depot/cli/pkg/proto/depot/ci/v1/civ1connect" + civ3beta2 "github.com/depot/cli/pkg/proto/depot/ci/v3beta2" + "github.com/depot/cli/pkg/proto/depot/ci/v3beta2/civ3beta2connect" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" "google.golang.org/protobuf/proto" @@ -260,6 +262,321 @@ func assertAuthAndOrg(t *testing.T, header http.Header) { } } +type secretVariantsRecorder struct { + civ3beta2connect.UnimplementedSecretServiceHandler + t *testing.T + getRequests []*civ3beta2.GetSecretVariantRequest + setRequests []*civ3beta2.SetSecretVariantRequest + listRequests []*civ3beta2.ListSecretsRequest +} + +func (r *secretVariantsRecorder) GetSecretVariant(_ context.Context, req *connect.Request[civ3beta2.GetSecretVariantRequest]) (*connect.Response[civ3beta2.GetSecretVariantResponse], error) { + assertAuthAndOrg(r.t, req.Header()) + r.getRequests = append(r.getRequests, proto.Clone(req.Msg).(*civ3beta2.GetSecretVariantRequest)) + return connect.NewResponse(&civ3beta2.GetSecretVariantResponse{ + Variant: &civ3beta2.SecretVariant{ + Id: req.Msg.GetId(), + SecretId: "secret-1", + Name: "production", + Attributes: []*civ3beta2.Attribute{ + {Key: "repository", Value: "depot/api"}, + {Key: "branch", Value: "main"}, + }, + }, + }), nil +} + +func (r *secretVariantsRecorder) SetSecretVariant(_ context.Context, req *connect.Request[civ3beta2.SetSecretVariantRequest]) (*connect.Response[civ3beta2.SetSecretVariantResponse], error) { + assertAuthAndOrg(r.t, req.Header()) + r.setRequests = append(r.setRequests, proto.Clone(req.Msg).(*civ3beta2.SetSecretVariantRequest)) + return connect.NewResponse(&civ3beta2.SetSecretVariantResponse{ + Secret: &civ3beta2.Secret{ + Id: "secret-1", + Name: req.Msg.GetSecretName(), + }, + Variant: &civ3beta2.SecretVariant{ + Id: "variant-1", + SecretId: "secret-1", + Name: req.Msg.GetVariantName(), + Description: req.Msg.Description, + Attributes: req.Msg.GetAttributes(), + }, + CreatedSecret: true, + CreatedVariant: true, + }), nil +} + +func (r *secretVariantsRecorder) ListSecrets(_ context.Context, req *connect.Request[civ3beta2.ListSecretsRequest]) (*connect.Response[civ3beta2.ListSecretsResponse], error) { + assertAuthAndOrg(r.t, req.Header()) + r.listRequests = append(r.listRequests, proto.Clone(req.Msg).(*civ3beta2.ListSecretsRequest)) + valueGroupIndex := uint32(2) + name := "TOKEN" + if req.Msg.GetPage().GetPage() > 1 { + name = "TOKEN_TWO" + } + return connect.NewResponse(&civ3beta2.ListSecretsResponse{ + Secrets: []*civ3beta2.Secret{ + { + Id: "secret-1", + Name: name, + VariantCount: 1, + Variants: []*civ3beta2.SecretVariant{ + { + Id: "variant-1", + SecretId: "secret-1", + Name: "default", + Attributes: []*civ3beta2.Attribute{{Key: "repository", Value: "depot/api"}}, + ValueGroupIndex: &valueGroupIndex, + }, + }, + }, + }, + Page: &civ3beta2.PageResponse{Page: req.Msg.GetPage().GetPage(), PageSize: 100, HasMore: req.Msg.GetPage().GetPage() == 1}, + }), nil +} + +func TestCISetSecretVariantMapsDefaultVariantAndAttributes(t *testing.T) { + recorder := &secretVariantsRecorder{t: t} + withTestSecretVariantsService(t, recorder, func() { + result, err := CISetSecretVariant(context.Background(), "token-123", "org-123", CISetSecretVariantOptions{ + Name: "TOKEN", + Value: "secret-value", + Description: "deploy token", + Repo: []string{"depot/api"}, + Environment: []string{"production"}, + Branch: []string{"main", "release/*"}, + Workflow: []string{"deploy.yml"}, + }) + if err != nil { + t.Fatalf("CISetSecretVariant returned error: %v", err) + } + if !result.CreatedSecret || !result.CreatedVariant { + t.Fatalf("expected created flags, got %+v", result) + } + if result.Variant.Name != "default" { + t.Fatalf("variant name = %q, want default", result.Variant.Name) + } + }) + + if len(recorder.setRequests) != 1 { + t.Fatalf("expected 1 SetSecretVariant request, got %d", len(recorder.setRequests)) + } + req := recorder.setRequests[0] + if req.GetSecretName() != "TOKEN" || req.GetVariantName() != "default" || req.GetValue() != "secret-value" { + t.Fatalf("unexpected request: %+v", req) + } + if req.GetDescription() != "deploy token" { + t.Fatalf("description = %q, want deploy token", req.GetDescription()) + } + assertProtoAttributes(t, req.GetAttributes(), []CIVariantAttribute{ + {Key: "repository", Value: "depot/api"}, + {Key: "environment", Value: "production"}, + {Key: "branch", Value: "main"}, + {Key: "branch", Value: "release/*"}, + {Key: "workflow", Value: "deploy.yml"}, + }) +} + +func TestCIGetSecretVariantByID(t *testing.T) { + recorder := &secretVariantsRecorder{t: t} + withTestSecretVariantsService(t, recorder, func() { + variant, err := CIGetSecretVariant(context.Background(), "token-123", "org-123", "variant-123") + if err != nil { + t.Fatalf("CIGetSecretVariant returned error: %v", err) + } + if variant.ID != "variant-123" || variant.Name != "production" || len(variant.Attributes) != 2 { + t.Fatalf("unexpected variant: %+v", variant) + } + }) + + if len(recorder.getRequests) != 1 { + t.Fatalf("expected 1 GetSecretVariant request, got %d", len(recorder.getRequests)) + } + if got := recorder.getRequests[0].GetId(); got != "variant-123" { + t.Fatalf("id = %q, want variant-123", got) + } +} + +func TestCIListSecretVariantsFetchesAllPagesAndMapsResponse(t *testing.T) { + recorder := &secretVariantsRecorder{t: t} + withTestSecretVariantsService(t, recorder, func() { + result, err := CIListSecretVariants(context.Background(), "token-123", "org-123", CIListSecretVariantsOptions{ + Repo: []string{"depot/api"}, + }) + if err != nil { + t.Fatalf("CIListSecretVariants returned error: %v", err) + } + if len(result.Secrets) != 2 || result.Secrets[0].Name != "TOKEN" || result.Secrets[1].Name != "TOKEN_TWO" { + t.Fatalf("unexpected secrets: %+v", result.Secrets) + } + if result.Secrets[0].Variants[0].ValueGroupIndex == nil || *result.Secrets[0].Variants[0].ValueGroupIndex != 2 { + t.Fatalf("value group index = %v, want 2", result.Secrets[0].Variants[0].ValueGroupIndex) + } + }) + + if len(recorder.listRequests) != 2 { + t.Fatalf("expected 2 ListSecrets requests, got %d", len(recorder.listRequests)) + } + req := recorder.listRequests[0] + if req.GetPage().GetPage() != 1 || req.GetPage().GetPageSize() != 100 { + t.Fatalf("page request = %+v, want page=1 page_size=100", req.GetPage()) + } + if got := recorder.listRequests[1].GetPage().GetPage(); got != 2 { + t.Fatalf("second page = %d, want 2", got) + } + assertProtoAttributes(t, req.GetAttributes(), []CIVariantAttribute{{Key: "repository", Value: "depot/api"}}) +} + +func withTestSecretVariantsService(t *testing.T, handler civ3beta2connect.SecretServiceHandler, fn func()) { + t.Helper() + + _, httpHandler := civ3beta2connect.NewSecretServiceHandler(handler) + server := httptest.NewServer(h2c.NewHandler(httpHandler, &http2.Server{})) + defer server.Close() + + originalBaseURLFunc := baseURLFunc + baseURLFunc = func() string { return server.URL } + t.Cleanup(func() { baseURLFunc = originalBaseURLFunc }) + + fn() +} + +type variableVariantsRecorder struct { + civ3beta2connect.UnimplementedVariableServiceHandler + t *testing.T + setRequests []*civ3beta2.SetVariableVariantRequest + listRequests []*civ3beta2.ListVariablesRequest +} + +func (r *variableVariantsRecorder) SetVariableVariant(_ context.Context, req *connect.Request[civ3beta2.SetVariableVariantRequest]) (*connect.Response[civ3beta2.SetVariableVariantResponse], error) { + assertAuthAndOrg(r.t, req.Header()) + r.setRequests = append(r.setRequests, proto.Clone(req.Msg).(*civ3beta2.SetVariableVariantRequest)) + return connect.NewResponse(&civ3beta2.SetVariableVariantResponse{ + Variable: &civ3beta2.Variable{ + Id: "variable-1", + Name: req.Msg.GetVariableName(), + }, + Variant: &civ3beta2.VariableVariant{ + Id: "variant-1", + VariableId: "variable-1", + Name: req.Msg.GetVariantName(), + Value: req.Msg.GetValue(), + Attributes: req.Msg.GetAttributes(), + }, + CreatedVariable: true, + CreatedVariant: true, + }), nil +} + +func (r *variableVariantsRecorder) ListVariables(_ context.Context, req *connect.Request[civ3beta2.ListVariablesRequest]) (*connect.Response[civ3beta2.ListVariablesResponse], error) { + assertAuthAndOrg(r.t, req.Header()) + r.listRequests = append(r.listRequests, proto.Clone(req.Msg).(*civ3beta2.ListVariablesRequest)) + name := "REGION" + if req.Msg.GetPage().GetPage() > 1 { + name = "ENV" + } + return connect.NewResponse(&civ3beta2.ListVariablesResponse{ + Variables: []*civ3beta2.Variable{ + { + Id: "variable-1", + Name: name, + VariantCount: 1, + Variants: []*civ3beta2.VariableVariant{ + { + Id: "variant-1", + VariableId: "variable-1", + Name: "default", + Value: "production", + Attributes: []*civ3beta2.Attribute{{Key: "repository", Value: "depot/api"}}, + }, + }, + }, + }, + Page: &civ3beta2.PageResponse{Page: req.Msg.GetPage().GetPage(), PageSize: 100, HasMore: req.Msg.GetPage().GetPage() == 1}, + }), nil +} + +func TestCISetVariableVariantMapsNamedVariantAndAttributes(t *testing.T) { + recorder := &variableVariantsRecorder{t: t} + withTestVariableVariantsService(t, recorder, func() { + result, err := CISetVariableVariant(context.Background(), "token-123", "org-123", CISetVariableVariantOptions{ + Name: "REGION", + Variant: "production", + Value: "us-east-1", + Repo: []string{"depot/api"}, + }) + if err != nil { + t.Fatalf("CISetVariableVariant returned error: %v", err) + } + if result.Variant.Name != "production" || result.Variant.Value != "us-east-1" { + t.Fatalf("unexpected variant: %+v", result.Variant) + } + }) + + if len(recorder.setRequests) != 1 { + t.Fatalf("expected 1 SetVariableVariant request, got %d", len(recorder.setRequests)) + } + req := recorder.setRequests[0] + if req.GetVariableName() != "REGION" || req.GetVariantName() != "production" || req.GetValue() != "us-east-1" { + t.Fatalf("unexpected request: %+v", req) + } + assertProtoAttributes(t, req.GetAttributes(), []CIVariantAttribute{{Key: "repository", Value: "depot/api"}}) +} + +func TestCIListVariableVariantsFetchesAllPagesAndMapsResponse(t *testing.T) { + recorder := &variableVariantsRecorder{t: t} + withTestVariableVariantsService(t, recorder, func() { + result, err := CIListVariableVariants(context.Background(), "token-123", "org-123", CIListVariableVariantsOptions{ + Repo: []string{"depot/api"}, + }) + if err != nil { + t.Fatalf("CIListVariableVariants returned error: %v", err) + } + if len(result.Variables) != 2 || result.Variables[0].Name != "REGION" || result.Variables[1].Name != "ENV" { + t.Fatalf("unexpected variables: %+v", result.Variables) + } + }) + + if len(recorder.listRequests) != 2 { + t.Fatalf("expected 2 ListVariables requests, got %d", len(recorder.listRequests)) + } + first := recorder.listRequests[0] + if first.GetPage().GetPage() != 1 || first.GetPage().GetPageSize() != 100 { + t.Fatalf("first page request = %+v, want page=1 page_size=100", first.GetPage()) + } + if got := recorder.listRequests[1].GetPage().GetPage(); got != 2 { + t.Fatalf("second page = %d, want 2", got) + } + assertProtoAttributes(t, first.GetAttributes(), []CIVariantAttribute{{Key: "repository", Value: "depot/api"}}) +} + +func withTestVariableVariantsService(t *testing.T, handler civ3beta2connect.VariableServiceHandler, fn func()) { + t.Helper() + + _, httpHandler := civ3beta2connect.NewVariableServiceHandler(handler) + server := httptest.NewServer(h2c.NewHandler(httpHandler, &http2.Server{})) + defer server.Close() + + originalBaseURLFunc := baseURLFunc + baseURLFunc = func() string { return server.URL } + t.Cleanup(func() { baseURLFunc = originalBaseURLFunc }) + + fn() +} + +func assertProtoAttributes(t *testing.T, got []*civ3beta2.Attribute, want []CIVariantAttribute) { + t.Helper() + + if len(got) != len(want) { + t.Fatalf("attributes length = %d, want %d: %+v", len(got), len(want), got) + } + for i := range want { + if got[i].GetKey() != want[i].Key || got[i].GetValue() != want[i].Value { + t.Fatalf("attribute %d = %s=%s, want %s=%s", i, got[i].GetKey(), got[i].GetValue(), want[i].Key, want[i].Value) + } + } +} + type listRunsRecorder struct { civ1connect.UnimplementedCIServiceHandler requests []*civ1.ListRunsRequest diff --git a/pkg/cmd/ci/ci_test.go b/pkg/cmd/ci/ci_test.go index 9d20e30a..d988fb7b 100644 --- a/pkg/cmd/ci/ci_test.go +++ b/pkg/cmd/ci/ci_test.go @@ -1,7 +1,12 @@ package ci import ( + "strings" "testing" + + "github.com/depot/cli/pkg/api" + "github.com/spf13/cobra" + "github.com/spf13/pflag" ) // TestCICommandRegistration guards `depot ci`'s subcommand surface so a future @@ -40,3 +45,235 @@ func TestCICommandRegistration(t *testing.T) { } } } + +func TestSecretsAddKeepsHiddenValueFlagForCompatibility(t *testing.T) { + cmd := NewCmdSecretsAdd() + + valueFlag := cmd.Flags().Lookup("value") + if valueFlag == nil { + t.Fatal("expected hidden --value compatibility flag") + } + if !valueFlag.Hidden { + t.Fatal("expected --value to stay hidden from help") + } +} + +func TestSecretsSetRequiresExplicitStdinInNonInteractiveMode(t *testing.T) { + cmd := NewCmdSecretsSet() + cmd.SilenceUsage = true + cmd.SilenceErrors = true + cmd.SetArgs([]string{"MY_SECRET"}) + + err := cmd.Execute() + if err == nil { + t.Fatal("expected error") + } + if !strings.Contains(err.Error(), "pass --from-stdin") { + t.Fatalf("error = %q", err) + } +} + +func TestVarsSetRequiresValueInNonInteractiveMode(t *testing.T) { + cmd := NewCmdVarsSet() + cmd.SilenceUsage = true + cmd.SilenceErrors = true + cmd.SetArgs([]string{"MY_VAR"}) + + err := cmd.Execute() + if err == nil { + t.Fatal("expected error") + } + if !strings.Contains(err.Error(), "pass --value") { + t.Fatalf("error = %q", err) + } +} + +func TestVariantSelectorFlagsAreRepeatable(t *testing.T) { + for name, cmd := range map[string]commandWithFlags{ + "secrets set": {flags: NewCmdSecretsSet().Flags()}, + "secrets add": {flags: NewCmdSecretsAdd().Flags()}, + "secrets bulk": {flags: NewCmdSecretsBulk().Flags()}, + "secrets get": {flags: NewCmdSecretsGet().Flags()}, + "secrets list": {flags: NewCmdSecretsList().Flags()}, + "secrets remove": {flags: NewCmdSecretsRemove().Flags()}, + "vars set": {flags: NewCmdVarsSet().Flags()}, + "vars add": {flags: NewCmdVarsAdd().Flags()}, + "vars list": {flags: NewCmdVarsList().Flags()}, + "vars remove": {flags: NewCmdVarsRemove().Flags()}, + } { + t.Run(name, func(t *testing.T) { + repo := cmd.flags.Lookup("repo") + if repo == nil { + t.Fatal("expected --repo flag") + } + if repo.Value.Type() != "stringArray" { + t.Fatalf("--repo type = %q, want stringArray", repo.Value.Type()) + } + }) + } +} + +func TestVariantNameIsPositionalNotFlag(t *testing.T) { + for name, cmd := range map[string]commandWithFlags{ + "secrets set": {flags: NewCmdSecretsSet().Flags()}, + "secrets add": {flags: NewCmdSecretsAdd().Flags()}, + "secrets bulk": {flags: NewCmdSecretsBulk().Flags()}, + "secrets get": {flags: NewCmdSecretsGet().Flags()}, + "vars set": {flags: NewCmdVarsSet().Flags()}, + "vars add": {flags: NewCmdVarsAdd().Flags()}, + } { + t.Run(name, func(t *testing.T) { + if flag := cmd.flags.Lookup("variant"); flag != nil { + t.Fatalf("did not expect --variant flag: %#v", flag) + } + }) + } +} + +func TestRemoveCommandsUseVariantFlagForVariantDeletion(t *testing.T) { + for name, cmd := range map[string]commandWithFlags{ + "secrets remove": {flags: NewCmdSecretsRemove().Flags()}, + "vars remove": {flags: NewCmdVarsRemove().Flags()}, + } { + t.Run(name, func(t *testing.T) { + if flag := cmd.flags.Lookup("variant"); flag == nil { + t.Fatal("expected --variant flag") + } + }) + } +} + +func TestRemoveCommandsKeepLegacyMultiNameUse(t *testing.T) { + for name, tc := range map[string]struct { + use string + want string + }{ + "secrets remove": {use: NewCmdSecretsRemove().Use, want: "remove [...]"}, + "vars remove": {use: NewCmdVarsRemove().Use, want: "remove [...]"}, + } { + t.Run(name, func(t *testing.T) { + if tc.use != tc.want { + t.Fatalf("Use = %q, want %q", tc.use, tc.want) + } + }) + } +} + +func TestRemoveAllRejectsVariantSelectors(t *testing.T) { + for name, cmd := range map[string]*cobra.Command{ + "secrets remove": NewCmdSecretsRemove(), + "vars remove": NewCmdVarsRemove(), + } { + t.Run(name, func(t *testing.T) { + cmd.SilenceUsage = true + cmd.SilenceErrors = true + cmd.SetArgs([]string{"NAME", "--all", "--repo", "owner/repo", "--force"}) + + err := cmd.Execute() + if err == nil { + t.Fatal("expected error") + } + if !strings.Contains(err.Error(), "--all cannot be used with --variant, --repo, --env, --branch, or --workflow") { + t.Fatalf("error = %q", err) + } + }) + } +} + +func TestLegacyListRepoSelectorOnlyAcceptsLegacySelectors(t *testing.T) { + if repo, ok := legacyListRepoSelector([]string{"owner/repo"}, nil, nil, nil); !ok || repo != "owner/repo" { + t.Fatalf("legacyListRepoSelector() = %q, %v; want owner/repo, true", repo, ok) + } + if _, ok := legacyListRepoSelector([]string{"one", "two"}, nil, nil, nil); ok { + t.Fatal("expected multiple repos to use variant JSON") + } + if _, ok := legacyListRepoSelector([]string{"owner/repo"}, []string{"prod"}, nil, nil); ok { + t.Fatal("expected new selectors to use variant JSON") + } +} + +func TestListFilteringIncludesUnscopedVariantsForRepo(t *testing.T) { + group := api.CISecretGroup{ + Name: "TOKEN", + Variants: []api.CISecretVariant{ + {Name: "default"}, + {Name: "matching", Attributes: []api.CIVariantAttribute{{Key: "repository", Value: "Owner/Repo"}}}, + {Name: "other", Attributes: []api.CIVariantAttribute{{Key: "repository", Value: "other/repo"}}}, + }, + } + + filtered := filterSecretVariantsForList(group, []string{"owner/repo"}, nil, nil, nil) + + if len(filtered.Variants) != 2 { + t.Fatalf("len(filtered.Variants) = %d, want 2: %#v", len(filtered.Variants), filtered.Variants) + } + if filtered.Variants[0].Name != "default" || filtered.Variants[1].Name != "matching" { + t.Fatalf("filtered variants = %#v", filtered.Variants) + } +} + +func TestStrictVariantMatchingStillRequiresRepoAttribute(t *testing.T) { + group := api.CISecretGroup{ + Name: "TOKEN", + Variants: []api.CISecretVariant{ + {Name: "default"}, + {Name: "matching", Attributes: []api.CIVariantAttribute{{Key: "repository", Value: "owner/repo"}}}, + }, + } + + matches, err := resolveSecretVariant(group, "", []string{"owner/repo"}, nil, nil, nil) + if err != nil { + t.Fatal(err) + } + if len(matches) != 1 || matches[0].Name != "matching" { + t.Fatalf("matches = %#v, want only matching", matches) + } +} + +func TestSecretsBulkUsesFileFlagAndPositionalVariant(t *testing.T) { + cmd := NewCmdSecretsBulk() + + if cmd.Use != "bulk [variant]" { + t.Fatalf("Use = %q, want %q", cmd.Use, "bulk [variant]") + } + if flag := cmd.Flags().Lookup("file"); flag == nil { + t.Fatal("expected --file flag") + } + if flag := cmd.Flags().Lookup("variant"); flag != nil { + t.Fatalf("did not expect --variant flag: %#v", flag) + } +} + +func TestParseSecretBulkEnv(t *testing.T) { + secrets, err := parseSecretBulkEnv([]byte(` +# comment +PLAIN=value +QUOTED="two words" +EMPTY= +`)) + if err != nil { + t.Fatal(err) + } + + want := []secretInput{ + {name: "EMPTY", value: ""}, + {name: "PLAIN", value: "value"}, + {name: "QUOTED", value: "two words"}, + } + if len(secrets) != len(want) { + t.Fatalf("len(secrets) = %d, want %d: %#v", len(secrets), len(want), secrets) + } + for i := range want { + if secrets[i] != want[i] { + t.Fatalf("secrets[%d] = %#v, want %#v", i, secrets[i], want[i]) + } + } +} + +type commandWithFlags struct { + flags flagSet +} + +type flagSet interface { + Lookup(string) *pflag.Flag +} diff --git a/pkg/cmd/ci/secrets.go b/pkg/cmd/ci/secrets.go index e3f7b8c5..e4552f9e 100644 --- a/pkg/cmd/ci/secrets.go +++ b/pkg/cmd/ci/secrets.go @@ -1,15 +1,16 @@ package ci import ( - "encoding/json" "fmt" + "io" "os" + "sort" "strings" + "github.com/compose-spec/compose-go/v2/dotenv" "github.com/depot/cli/pkg/api" "github.com/depot/cli/pkg/config" "github.com/depot/cli/pkg/helpers" - civ2 "github.com/depot/cli/pkg/proto/depot/ci/v2" "github.com/spf13/cobra" ) @@ -20,13 +21,19 @@ func NewCmdSecrets() *cobra.Command { Long: "Manage secrets for Depot CI workflows.", Example: ` # Add a new secret depot ci secrets add GITHUB_TOKEN - depot ci secrets add MY_API_KEY --value "secret-value" + printf '%s' "$MY_API_KEY" | depot ci secrets add MY_API_KEY - # Add multiple secrets at once + # Set a named secret variant + printf '%s' "$MY_API_KEY" | depot ci secrets set MY_API_KEY production --from-stdin --repo owner/repo --env production + + # Add multiple secrets at once (legacy syntax) depot ci secrets add FOO=bar BAZ=qux - # Add a repo-specific secret - depot ci secrets add MY_API_KEY --repo owner/repo --value "secret-value" + # Import secrets from a .env file + depot ci secrets bulk --file .env --repo owner/repo + + # Add a repo-specific secret from piped input + printf '%s' "$MY_API_KEY" | depot ci secrets add MY_API_KEY --repo owner/repo # List all secrets depot ci secrets list @@ -41,46 +48,168 @@ func NewCmdSecrets() *cobra.Command { }, } + cmd.AddCommand(NewCmdSecretsSet()) cmd.AddCommand(NewCmdSecretsAdd()) + cmd.AddCommand(NewCmdSecretsBulk()) + cmd.AddCommand(NewCmdSecretsGet()) cmd.AddCommand(NewCmdSecretsList()) cmd.AddCommand(NewCmdSecretsRemove()) return cmd } +func NewCmdSecretsSet() *cobra.Command { + var ( + orgID string + token string + description string + repo []string + environment []string + branch []string + workflow []string + fromStdin bool + ) + + cmd := &cobra.Command{ + Use: "set [variant]", + Short: "Create or update a CI secret variant", + Long: `Create or update a CI secret variant. + +Variants let one secret name have different values for matching repositories, +environments, branches, or workflows. When variant is omitted, the variant is +named "default".`, + Example: ` # Set the default variant + depot ci secrets set MY_API_KEY + + # Set a named variant from stdin + printf '%s' "$MY_API_KEY" | depot ci secrets set MY_API_KEY production --from-stdin + + # Set a variant that only applies to matching workflow runs from stdin + printf '%s' "$MY_API_KEY" | depot ci secrets set MY_API_KEY production --from-stdin --repo owner/repo --env production --branch main --workflow deploy.yml + + # Set a variant that applies to multiple branches + printf '%s' "$MY_API_KEY" | depot ci secrets set MY_API_KEY release --from-stdin --repo owner/repo --branch main --branch 'release/*'`, + Args: cobra.RangeArgs(1, 2), + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + if orgID == "" { + orgID = config.GetCurrentOrganization() + } + + if fromStdin && helpers.IsStdinTerminal() { + return fmt.Errorf("--from-stdin requires piped stdin") + } + if !fromStdin && !helpers.IsStdinTerminal() { + return fmt.Errorf("cannot prompt for a secret value in non-interactive mode; pass --from-stdin to read the value from stdin") + } + + tokenVal, err := helpers.ResolveProjectAuth(ctx, token) + if err != nil { + return err + } + if tokenVal == "" { + return fmt.Errorf("missing API token, please run `depot login`") + } + + secretName, variant := args[0], "" + if len(args) == 2 { + variant = args[1] + } + if secretName == "" { + return fmt.Errorf("secret name cannot be empty") + } + + var secretValue string + if fromStdin { + var err error + secretValue, err = helpers.SecretValueFromStdin() + if err != nil { + return fmt.Errorf("failed to read secret value: %w", err) + } + } else { + var err error + secretValue, err = helpers.PromptForSecret(fmt.Sprintf("Enter value for secret '%s': ", secretName)) + if err != nil { + return fmt.Errorf("failed to read secret value: %w", err) + } + } + + result, err := api.CISetSecretVariant(ctx, tokenVal, orgID, api.CISetSecretVariantOptions{ + Name: secretName, + Variant: variant, + Value: secretValue, + Description: description, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) + if err != nil { + return fmt.Errorf("failed to set secret variant: %w", err) + } + + fmt.Printf("Successfully set CI secret '%s' variant '%s'\n", secretName, displayVariantName(result.Variant.Name)) + return nil + }, + } + + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") + cmd.Flags().StringVar(&token, "token", "", "Depot API token") + cmd.Flags().StringVar(&description, "description", "", "Description of the secret variant") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Apply variant to a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Apply variant to an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Apply variant to a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Apply variant to a workflow file (repeatable)") + cmd.Flags().BoolVar(&fromStdin, "from-stdin", false, "Read secret value from stdin") + + return cmd +} + +type secretInput struct { + name string + value string +} + func NewCmdSecretsAdd() *cobra.Command { var ( orgID string token string value string description string - repo string + repo []string + environment []string + branch []string + workflow []string ) cmd := &cobra.Command{ - Use: "add [SECRET_NAME | KEY=VALUE ...]", + Use: "add [SECRET_NAME [variant] | KEY=VALUE ...]", Short: "Add one or more CI secrets", Long: `Add secrets that can be used in Depot CI workflows. Supports three modes: - 1. Single secret with --value flag: depot ci secrets add SECRET_NAME --value "val" - 2. Single secret with interactive prompt: depot ci secrets add SECRET_NAME + 1. Single secret with interactive prompt: depot ci secrets add SECRET_NAME + 2. Single secret from stdin: printf '%s' "$SECRET_VALUE" | depot ci secrets add SECRET_NAME 3. Bulk KEY=VALUE pairs: depot ci secrets add FOO=bar BAZ=qux -The --value and --description flags cannot be used with KEY=VALUE pairs. -Use --repo to scope secrets to a specific repository. Without --repo, secrets -apply to all repositories in the organization.`, +The --description flag cannot be used with KEY=VALUE pairs. +Use --repo, --env, --branch, and --workflow to choose where the variant applies. +Without match flags, the variant applies to all workflow runs in the organization.`, Example: ` # Add an org-wide secret with interactive prompt depot ci secrets add GITHUB_TOKEN - # Add an org-wide secret with value from command line - depot ci secrets add MY_API_KEY --value "secret-value" + # Add a secret from piped input + printf '%s' "$MY_API_KEY" | depot ci secrets add MY_API_KEY - # Add multiple secrets at once + # Add a named variant from piped input + printf '%s' "$MY_API_KEY" | depot ci secrets add MY_API_KEY production + + # Add multiple secrets at once (legacy syntax) depot ci secrets add FOO=bar BAZ=qux - # Add a repo-specific secret - depot ci secrets add DATABASE_URL --repo owner/repo --value "prod-db-url" + # Add a repo-specific secret from piped input + printf '%s' "$DATABASE_URL" | depot ci secrets add DATABASE_URL --repo owner/repo # Add a secret with description depot ci secrets add DATABASE_URL --description "Production database connection string"`, @@ -101,10 +230,8 @@ apply to all repositories in the organization.`, return fmt.Errorf("missing API token, please run `depot login`") } - scope := "org-wide" - if repo != "" { - scope = repo - } + scope := variantScope(repo) + variant := "" // Detect KEY=VALUE pairs hasKVPairs := false @@ -124,85 +251,394 @@ apply to all repositories in the organization.`, return fmt.Errorf("cannot use --description with KEY=VALUE arguments") } - var secrets []*civ2.SecretInput + var secrets []secretInput for _, arg := range args { parts := strings.SplitN(arg, "=", 2) if len(parts) != 2 || parts[0] == "" { - return fmt.Errorf("invalid argument %q — expected KEY=VALUE format", arg) + return fmt.Errorf("invalid argument %q - expected KEY=VALUE format", arg) } - secrets = append(secrets, &civ2.SecretInput{Name: parts[0], Value: parts[1]}) + secrets = append(secrets, secretInput{name: parts[0], value: parts[1]}) } - err := api.CIBatchAddSecrets(ctx, tokenVal, orgID, secrets, repo) - if err != nil { - return fmt.Errorf("failed to add secrets: %w", err) + for _, secret := range secrets { + _, err := api.CISetSecretVariant(ctx, tokenVal, orgID, api.CISetSecretVariantOptions{ + Name: secret.name, + Variant: variant, + Value: secret.value, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) + if err != nil { + return fmt.Errorf("failed to add secret '%s': %w", secret.name, err) + } } for _, s := range secrets { - fmt.Printf("Successfully added CI secret '%s' (%s)\n", s.Name, scope) + printSecretAddSuccess(s.name, variant, scope) } return nil } - // Single mode: first arg is secret name - if len(args) > 1 { - return fmt.Errorf("too many arguments — did you mean to use KEY=VALUE format?") + // Single mode: first arg is secret name, second optional arg is variant. + if len(args) > 2 { + return fmt.Errorf("too many arguments - did you mean to use KEY=VALUE format?") } secretName := args[0] + if len(args) == 2 { + variant = args[1] + } if secretName == "" { return fmt.Errorf("secret name cannot be empty") } secretValue := value if secretValue == "" { - secretValue, err = helpers.PromptForSecret(fmt.Sprintf("Enter value for secret '%s': ", secretName)) + secretValue, err = helpers.SecretValueFromInput(fmt.Sprintf("Enter value for secret '%s': ", secretName)) if err != nil { return fmt.Errorf("failed to read secret value: %w", err) } } - err = api.CIAddSecretWithDescription(ctx, tokenVal, orgID, secretName, secretValue, description, repo) + _, err = api.CISetSecretVariant(ctx, tokenVal, orgID, api.CISetSecretVariantOptions{ + Name: secretName, + Variant: variant, + Value: secretValue, + Description: description, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) if err != nil { return fmt.Errorf("failed to add secret: %w", err) } - fmt.Printf("Successfully added CI secret '%s' (%s)\n", secretName, scope) + printSecretAddSuccess(secretName, variant, scope) return nil }, } cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") cmd.Flags().StringVar(&token, "token", "", "Depot API token") - cmd.Flags().StringVar(&value, "value", "", "Secret value (will prompt if not provided)") - cmd.Flags().StringVar(&description, "description", "", "Description of the secret") - cmd.Flags().StringVar(&repo, "repo", "", "Scope secret to a specific repository (e.g. owner/repo)") + cmd.Flags().StringVar(&value, "value", "", "Secret value (deprecated; prefer stdin)") + cmd.Flags().StringVar(&description, "description", "", "Description of the secret variant") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Apply variant to a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Apply variant to an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Apply variant to a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Apply variant to a workflow file (repeatable)") + _ = cmd.Flags().MarkHidden("value") return cmd } +func NewCmdSecretsBulk() *cobra.Command { + var ( + orgID string + token string + file string + repo []string + environment []string + branch []string + workflow []string + fromStdin bool + ) + + cmd := &cobra.Command{ + Use: "bulk [variant]", + Short: "Import CI secrets from a dotenv file or stdin", + Long: `Import CI secrets from a dotenv file or stdin. + +Input is parsed as dotenv KEY=VALUE entries. Blank lines and comments are +ignored by the dotenv parser. The same variant and match flags apply to every +secret in the input.`, + Example: ` # Import secrets from a .env file + depot ci secrets bulk --file .env --repo owner/repo + + # Import secrets from stdin + cat .env | depot ci secrets bulk --from-stdin --repo owner/repo + + # Import a production variant with multiple branch matches + depot ci secrets bulk production --file .env --repo owner/repo --branch main --branch 'release/*'`, + Args: cobra.MaximumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + var variant string + if len(args) == 1 { + variant = args[0] + } + if file != "" && fromStdin { + return fmt.Errorf("--file and --from-stdin are mutually exclusive") + } + if file == "" && !fromStdin { + return fmt.Errorf("missing input source; pass --file or --from-stdin") + } + + if orgID == "" { + orgID = config.GetCurrentOrganization() + } + + tokenVal, err := helpers.ResolveProjectAuth(ctx, token) + if err != nil { + return err + } + if tokenVal == "" { + return fmt.Errorf("missing API token, please run `depot login`") + } + + var content []byte + if fromStdin { + content, err = io.ReadAll(os.Stdin) + } else { + content, err = os.ReadFile(file) + } + if err != nil { + return fmt.Errorf("failed to read secrets input: %w", err) + } + + secrets, err := parseSecretBulkEnv(content) + if err != nil { + return err + } + if len(secrets) == 0 { + return fmt.Errorf("no secrets found in input") + } + + for _, secret := range secrets { + _, err := api.CISetSecretVariant(ctx, tokenVal, orgID, api.CISetSecretVariantOptions{ + Name: secret.name, + Variant: variant, + Value: secret.value, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) + if err != nil { + return fmt.Errorf("failed to import secret '%s': %w", secret.name, err) + } + } + + scope := variantScope(repo) + for _, secret := range secrets { + printSecretAddSuccess(secret.name, variant, scope) + } + return nil + }, + } + + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") + cmd.Flags().StringVar(&token, "token", "", "Depot API token") + cmd.Flags().StringVar(&file, "file", "", "Read dotenv input from file") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Apply variant to a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Apply variant to an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Apply variant to a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Apply variant to a workflow file (repeatable)") + cmd.Flags().BoolVar(&fromStdin, "from-stdin", false, "Read dotenv input from stdin") + + return cmd +} + +func parseSecretBulkEnv(content []byte) ([]secretInput, error) { + envs, err := dotenv.UnmarshalBytesWithLookup(content, nil) + if err != nil { + return nil, fmt.Errorf("failed to parse dotenv input: %w", err) + } + + names := make([]string, 0, len(envs)) + for name := range envs { + names = append(names, name) + } + sort.Strings(names) + + secrets := make([]secretInput, 0, len(names)) + for _, name := range names { + secrets = append(secrets, secretInput{name: name, value: envs[name]}) + } + return secrets, nil +} + +func printSecretAddSuccess(name, variant, scope string) { + if variant == "" { + fmt.Printf("Successfully added CI secret '%s' (%s)\n", name, scope) + return + } + fmt.Printf("Successfully added CI secret '%s' variant '%s' (%s)\n", name, displayVariantName(variant), scope) +} + +func NewCmdSecretsGet() *cobra.Command { + var ( + orgID string + token string + output string + variantID string + repo []string + environment []string + branch []string + workflow []string + ) + + cmd := &cobra.Command{ + Use: "get [ [variant]]", + Short: "Show one CI secret variant", + Long: `Show one CI secret variant with full, untruncated attributes. + +Use --variant-id to fetch a specific variant directly, or pass a secret name +with an optional variant and match flags to resolve one variant.`, + Example: ` # Show a variant by secret and variant name + depot ci secrets get MY_API_KEY production + + # Disambiguate variants with match flags + depot ci secrets get MY_API_KEY production --repo owner/repo --branch main + + # Show a variant by ID + depot ci secrets get --variant-id variant-id + + # Show JSON + depot ci secrets get MY_API_KEY production --output json`, + Args: cobra.MaximumNArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + if orgID == "" { + orgID = config.GetCurrentOrganization() + } + + tokenVal, err := helpers.ResolveOrgAuth(ctx, token) + if err != nil { + return err + } + if tokenVal == "" { + return fmt.Errorf("missing API token, please run `depot login`") + } + switch output { + case "", "json": + default: + return fmt.Errorf("unsupported output %q (valid: json)", output) + } + + var secretName string + var resolved api.CISecretVariant + if variantID != "" { + if len(args) > 0 { + return fmt.Errorf("cannot pass a secret name with --variant-id") + } + resolved, err = api.CIGetSecretVariant(ctx, tokenVal, orgID, variantID) + if err != nil { + return fmt.Errorf("failed to get secret variant: %w", err) + } + } else { + if len(args) == 0 { + return fmt.Errorf("missing secret name or --variant-id") + } + secretName = args[0] + variant := "" + if len(args) == 2 { + variant = args[1] + } + group, err := api.CIGetSecretVariantGroup(ctx, tokenVal, orgID, secretName) + if err != nil { + return fmt.Errorf("failed to get secret: %w", err) + } + + matches, err := resolveSecretVariant(group, variant, repo, environment, branch, workflow) + if err != nil { + return err + } + if len(matches) == 0 { + return fmt.Errorf("no matching variant found for secret '%s'", secretName) + } + if len(matches) > 1 { + return fmt.Errorf("secret '%s' has multiple matching variants; use --variant-id or add match flags", secretName) + } + resolved = matches[0] + } + + if output == "json" { + return writeJSON(resolved) + } + + printSecretVariantDetail(secretName, resolved) + return nil + }, + } + + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") + cmd.Flags().StringVar(&token, "token", "", "Depot API token") + cmd.Flags().StringVar(&output, "output", "", "Output format (json)") + cmd.Flags().StringVar(&variantID, "variant-id", "", "Secret variant ID") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Select variant matching a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Select variant matching an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Select variant matching a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Select variant matching a workflow file (repeatable)") + + return cmd +} + +func printSecretVariantDetail(secretName string, variant api.CISecretVariant) { + if secretName == "" { + secretName = variant.SecretID + } + fmt.Printf("Name: %s\n", secretName) + fmt.Printf("Variant: %s\n", displayVariantName(variant.Name)) + fmt.Printf("ID: %s\n", variant.ID) + if variant.SecretID != "" { + fmt.Printf("Secret ID: %s\n", variant.SecretID) + } + if variant.Description != "" { + fmt.Printf("Description: %s\n", variant.Description) + } + if variant.LastModified != "" { + fmt.Printf("Updated: %s\n", variant.LastModified) + } + if variant.ValueGroupIndex != nil { + fmt.Printf("Value Group: %d\n", *variant.ValueGroupIndex) + } + fmt.Println() + fmt.Println("Attributes:") + if len(variant.Attributes) == 0 { + fmt.Println(" all") + return + } + for _, attr := range variant.Attributes { + fmt.Printf(" %s=%s\n", attr.Key, attr.Value) + } +} + func NewCmdSecretsList() *cobra.Command { var ( - orgID string - token string - output string - repo string + orgID string + token string + output string + repo []string + environment []string + branch []string + workflow []string ) cmd := &cobra.Command{ - Use: "list", + Use: "list []", Short: "List all CI secrets", - Long: `List all secrets available for Depot CI workflows in your organization. -Use --repo to also show repo-specific secrets that override org-wide values.`, + Long: `List CI secrets and their variants. + +Use --repo, --env, --branch, and --workflow to filter variants by matching +attributes. Passing a secret name lists one grouped secret.`, Example: ` # List org-wide secrets depot ci secrets list - # List org-wide and repo-specific secrets - depot ci secrets list --repo owner/repo + # List variants matching repositories or branches + depot ci secrets list --repo owner/repo --repo owner/other --branch main + + # List one secret with its variants + depot ci secrets list MY_API_KEY # List secrets in JSON format depot ci secrets list --output json`, Aliases: []string{"ls"}, + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() @@ -217,54 +653,72 @@ Use --repo to also show repo-specific secrets that override org-wide values.`, if tokenVal == "" { return fmt.Errorf("missing API token, please run `depot login`") } + switch output { + case "", "json": + default: + return fmt.Errorf("unsupported output %q (valid: json)", output) + } + if output == "json" && len(args) == 0 { + if legacyRepo, ok := legacyListRepoSelector(repo, environment, branch, workflow); ok { + secrets, err := api.CIListSecrets(ctx, tokenVal, orgID, legacyRepo) + if err != nil { + return fmt.Errorf("failed to list secrets: %w", err) + } + return writeJSON(secrets) + } + } - secrets, err := api.CIListSecrets(ctx, tokenVal, orgID, repo) - if err != nil { - return fmt.Errorf("failed to list secrets: %w", err) + var result api.CIListSecretVariantsResult + if len(args) == 1 { + secret, err := api.CIGetSecretVariantGroup(ctx, tokenVal, orgID, args[0]) + if err != nil { + return fmt.Errorf("failed to get secret: %w", err) + } + result.Secrets = []api.CISecretGroup{filterSecretVariantsForList(secret, repo, environment, branch, workflow)} + } else { + var err error + result, err = api.CIListSecretVariants(ctx, tokenVal, orgID, api.CIListSecretVariantsOptions{ + Repo: nil, + Environment: nil, + Branch: nil, + Workflow: nil, + }) + if err != nil { + return fmt.Errorf("failed to list secrets: %w", err) + } + filtered := result.Secrets[:0] + for i := range result.Secrets { + result.Secrets[i] = filterSecretVariantsForList(result.Secrets[i], repo, environment, branch, workflow) + if len(result.Secrets[i].Variants) > 0 { + filtered = append(filtered, result.Secrets[i]) + } + } + result.Secrets = filtered } if output == "json" { - enc := json.NewEncoder(os.Stdout) - enc.SetIndent("", " ") - return enc.Encode(secrets) + return writeJSON(result) } - if len(secrets) == 0 { + if len(result.Secrets) == 0 { fmt.Println("No secrets found.") return nil } - if repo != "" { - fmt.Printf("%-30s %-20s %-40s %s\n", "NAME", "SCOPE", "DESCRIPTION", "CREATED") - fmt.Printf("%-30s %-20s %-40s %s\n", strings.Repeat("-", 30), strings.Repeat("-", 20), strings.Repeat("-", 40), strings.Repeat("-", 20)) - } else { - fmt.Printf("%-30s %-50s %s\n", "NAME", "DESCRIPTION", "CREATED") - fmt.Printf("%-30s %-50s %s\n", strings.Repeat("-", 30), strings.Repeat("-", 50), strings.Repeat("-", 20)) - } - - for _, secret := range secrets { - name := secret.Name - if len(name) > 30 { - name = name[:27] + "..." + fmt.Printf("%-30s %-18s %-38s %s\n", "NAME", "VARIANT", "DESCRIPTION", "UPDATED") + fmt.Printf("%-30s %-18s %-38s %s\n", strings.Repeat("-", 30), strings.Repeat("-", 18), strings.Repeat("-", 38), strings.Repeat("-", 20)) + for _, secret := range result.Secrets { + if len(secret.Variants) == 0 { + fmt.Printf("%-30s %-18s %-38s %s\n", truncateForTable(secret.Name, 30), "-", "-", secret.LastModified) + continue } - - description := secret.Description - created := secret.CreatedAt - - if repo != "" { - if len(description) > 40 { - description = description[:37] + "..." - } - scope := secret.Scope - if len(scope) > 20 { - scope = scope[:17] + "..." - } - fmt.Printf("%-30s %-20s %-40s %s\n", name, scope, description, created) - } else { - if len(description) > 50 { - description = description[:47] + "..." - } - fmt.Printf("%-30s %-50s %s\n", name, description, created) + for _, variant := range secret.Variants { + fmt.Printf("%-30s %-18s %-38s %s\n", + truncateForTable(secret.Name, 30), + truncateForTable(displayVariantName(variant.Name), 18), + truncateForTable(variant.Description, 38), + variant.LastModified, + ) } } @@ -275,30 +729,48 @@ Use --repo to also show repo-specific secrets that override org-wide values.`, cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") cmd.Flags().StringVar(&token, "token", "", "Depot API token") cmd.Flags().StringVar(&output, "output", "", "Output format (json)") - cmd.Flags().StringVar(&repo, "repo", "", "Also show repo-specific secrets for this repository (e.g. owner/repo)") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Filter variants by repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Filter variants by environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Filter variants by branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Filter variants by workflow file (repeatable)") return cmd } func NewCmdSecretsRemove() *cobra.Command { var ( - orgID string - token string - force bool - repo string + orgID string + token string + force bool + repo []string + environment []string + branch []string + workflow []string + variant string + all bool ) cmd := &cobra.Command{ - Use: "remove SECRET_NAME [SECRET_NAME...]", + Use: "remove [...]", Short: "Remove one or more CI secrets", - Long: `Remove one or more CI secrets from your organization. -Use --repo to remove repo-specific secrets instead of org-wide ones.`, + Long: `Remove one or more CI secrets. + +By default, positional arguments are treated as secret names and the command +removes the whole secret with every variant under it. Use selector flags or +--variant to remove one matching variant. --all makes whole-secret removal +explicit and cannot be combined with selector flags or --variant.`, Example: ` # Remove an org-wide secret depot ci secrets remove GITHUB_TOKEN - # Remove a repo-specific secret + # Remove a repo-specific variant depot ci secrets remove GITHUB_TOKEN --repo owner/repo + # Remove a named variant + depot ci secrets remove GITHUB_TOKEN --variant production + + # Remove every variant for a secret + depot ci secrets remove GITHUB_TOKEN --all + # Remove multiple secrets without confirmation prompt depot ci secrets remove GITHUB_TOKEN MY_API_KEY --force`, Aliases: []string{"rm"}, @@ -310,6 +782,13 @@ Use --repo to remove repo-specific secrets instead of org-wide ones.`, orgID = config.GetCurrentOrganization() } + names := args + selectsVariant := variant != "" || hasVariantSelectors(repo, environment, branch, workflow) + if all && selectsVariant { + return fmt.Errorf("--all cannot be used with --variant, --repo, --env, --branch, or --workflow") + } + removeGroups := all || !selectsVariant + tokenVal, err := helpers.ResolveOrgAuth(ctx, token) if err != nil { return err @@ -318,14 +797,17 @@ Use --repo to remove repo-specific secrets instead of org-wide ones.`, return fmt.Errorf("missing API token, please run `depot login`") } - scope := "org-wide" - if repo != "" { - scope = repo - } - if !force { - names := strings.Join(args, ", ") - prompt := fmt.Sprintf("Are you sure you want to remove %s CI secret(s) %s? (y/N): ", scope, names) + namesLabel := strings.Join(names, ", ") + var target string + if removeGroups { + target = "CI secret(s) and all variants" + } else if variant != "" { + target = fmt.Sprintf("variant %q for CI secret(s)", variant) + } else { + target = "selected CI secret variant(s)" + } + prompt := fmt.Sprintf("Are you sure you want to remove %s %s? (y/N): ", target, namesLabel) y, err := helpers.PromptForYN(prompt) if err != nil { return fmt.Errorf("failed to read confirmation: %w", err) @@ -334,12 +816,35 @@ Use --repo to remove repo-specific secrets instead of org-wide ones.`, } } - for _, secretName := range args { - err := api.CIDeleteSecret(ctx, tokenVal, orgID, secretName, repo) + for _, secretName := range names { + if removeGroups { + if err := api.CIDeleteSecretGroup(ctx, tokenVal, orgID, secretName); err != nil { + return fmt.Errorf("failed to remove secret '%s': %w", secretName, err) + } + fmt.Printf("Successfully removed CI secret '%s' and all variants\n", secretName) + continue + } + + group, err := api.CIGetSecretVariantGroup(ctx, tokenVal, orgID, secretName) if err != nil { - return fmt.Errorf("failed to remove secret '%s': %w", secretName, err) + return fmt.Errorf("failed to get secret '%s': %w", secretName, err) + } + + matches, err := resolveSecretVariant(group, variant, repo, environment, branch, workflow) + if err != nil { + return err + } + if len(matches) == 0 { + return fmt.Errorf("no matching variant found for secret '%s'", secretName) + } + if len(matches) > 1 { + return fmt.Errorf("secret '%s' has multiple matching variants; pass --variant or add selector flags", secretName) + } + + if _, err := api.CIDeleteSecretVariant(ctx, tokenVal, orgID, matches[0].ID); err != nil { + return fmt.Errorf("failed to remove secret '%s' variant '%s': %w", secretName, matches[0].Name, err) } - fmt.Printf("Successfully removed CI secret '%s' (%s)\n", secretName, scope) + fmt.Printf("Successfully removed CI secret '%s' variant '%s'\n", secretName, displayVariantName(matches[0].Name)) } return nil @@ -349,7 +854,12 @@ Use --repo to remove repo-specific secrets instead of org-wide ones.`, cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") cmd.Flags().StringVar(&token, "token", "", "Depot API token") cmd.Flags().BoolVar(&force, "force", false, "Skip confirmation prompt") - cmd.Flags().StringVar(&repo, "repo", "", "Remove repo-specific secret instead of org-wide (e.g. owner/repo)") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Select variant matching a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Select variant matching an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Select variant matching a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Select variant matching a workflow file (repeatable)") + cmd.Flags().StringVar(&variant, "variant", "", "Select variant by name") + cmd.Flags().BoolVar(&all, "all", false, "Remove the secret and all variants") return cmd } diff --git a/pkg/cmd/ci/variants.go b/pkg/cmd/ci/variants.go new file mode 100644 index 00000000..39759982 --- /dev/null +++ b/pkg/cmd/ci/variants.go @@ -0,0 +1,219 @@ +package ci + +import ( + "fmt" + "strings" + + "github.com/depot/cli/pkg/api" +) + +const defaultVariantName = "default" + +func displayVariantName(name string) string { + if name == "" { + return defaultVariantName + } + return name +} + +func formatVariantAttributes(attrs []api.CIVariantAttribute) string { + if len(attrs) == 0 { + return "all" + } + + parts := make([]string, 0, len(attrs)) + for _, attr := range attrs { + parts = append(parts, fmt.Sprintf("%s=%s", attr.Key, attr.Value)) + } + return strings.Join(parts, ",") +} + +func truncateForTable(value string, width int) string { + if len(value) <= width { + return value + } + if width <= 3 { + return value[:width] + } + return value[:width-3] + "..." +} + +func variantScope(repos []string) string { + if len(repos) == 0 { + return "org-wide" + } + return strings.Join(repos, ",") +} + +func filterSecretVariantsForList(secret api.CISecretGroup, repo, environment, branch, workflow []string) api.CISecretGroup { + if len(repo) == 0 && len(environment) == 0 && len(branch) == 0 && len(workflow) == 0 { + return secret + } + filtered := secret + filtered.Variants = nil + for _, variant := range secret.Variants { + if variantAppliesToListFilter(variant.Attributes, repo, environment, branch, workflow) { + filtered.Variants = append(filtered.Variants, variant) + } + } + filtered.VariantCount = uint32(len(filtered.Variants)) + return filtered +} + +func resolveSecretVariant(group api.CISecretGroup, variant string, repo, environment, branch, workflow []string) ([]api.CISecretVariant, error) { + matches := make([]api.CISecretVariant, 0, len(group.Variants)) + for _, candidate := range group.Variants { + if variant != "" && candidate.Name != variant { + continue + } + if !variantAttributesMatch(candidate.Attributes, repo, environment, branch, workflow) { + continue + } + matches = append(matches, candidate) + } + return matches, nil +} + +func resolveVariableVariant(group api.CIVariableGroup, variant string, repo, environment, branch, workflow []string) ([]api.CIVariableVariant, error) { + matches := make([]api.CIVariableVariant, 0, len(group.Variants)) + for _, candidate := range group.Variants { + if variant != "" && candidate.Name != variant { + continue + } + if !variantAttributesMatch(candidate.Attributes, repo, environment, branch, workflow) { + continue + } + matches = append(matches, candidate) + } + return matches, nil +} + +func filterVariableVariantsForList(variable api.CIVariableGroup, repo, environment, branch, workflow []string) api.CIVariableGroup { + if len(repo) == 0 && len(environment) == 0 && len(branch) == 0 && len(workflow) == 0 { + return variable + } + filtered := variable + filtered.Variants = nil + for _, variant := range variable.Variants { + if variantAppliesToListFilter(variant.Attributes, repo, environment, branch, workflow) { + filtered.Variants = append(filtered.Variants, variant) + } + } + filtered.VariantCount = uint32(len(filtered.Variants)) + return filtered +} + +func hasVariantSelectors(repo, environment, branch, workflow []string) bool { + return hasNonEmpty(repo) || hasNonEmpty(environment) || hasNonEmpty(branch) || hasNonEmpty(workflow) +} + +func hasNonEmpty(values []string) bool { + for _, value := range values { + if value != "" { + return true + } + } + return false +} + +func legacyListRepoSelector(repo, environment, branch, workflow []string) (string, bool) { + if hasNonEmpty(environment) || hasNonEmpty(branch) || hasNonEmpty(workflow) { + return "", false + } + nonEmptyRepos := nonEmptyValues(repo) + if len(nonEmptyRepos) > 1 { + return "", false + } + if len(nonEmptyRepos) == 1 { + return nonEmptyRepos[0], true + } + return "", true +} + +func nonEmptyValues(values []string) []string { + nonEmpty := make([]string, 0, len(values)) + for _, value := range values { + if value != "" { + nonEmpty = append(nonEmpty, value) + } + } + return nonEmpty +} + +func variantAppliesToListFilter(attrs []api.CIVariantAttribute, repos, environments, branches, workflows []string) bool { + expected := map[string][]string{} + addExpected := func(key string, values []string) { + for _, value := range values { + if value != "" { + expected[key] = append(expected[key], value) + } + } + } + addExpected("repository", repos) + addExpected("environment", environments) + addExpected("branch", branches) + addExpected("workflow", workflows) + if len(expected) == 0 || len(attrs) == 0 { + return true + } + + attributesByKey := map[string][]string{} + for _, attr := range attrs { + attributesByKey[attr.Key] = append(attributesByKey[attr.Key], attr.Value) + } + + for key, wants := range expected { + values, ok := attributesByKey[key] + if !ok { + continue + } + if !anyAttributeValueMatches(key, values, wants) { + return false + } + } + return true +} + +func variantAttributesMatch(attrs []api.CIVariantAttribute, repos, environments, branches, workflows []string) bool { + expected := map[string][]string{} + addExpected := func(key string, values []string) { + for _, value := range values { + if value != "" { + expected[key] = append(expected[key], value) + } + } + } + addExpected("repository", repos) + addExpected("environment", environments) + addExpected("branch", branches) + addExpected("workflow", workflows) + if len(expected) == 0 { + return true + } + + matched := map[string]bool{} + for _, attr := range attrs { + wants, ok := expected[attr.Key] + if !ok { + continue + } + if anyAttributeValueMatches(attr.Key, []string{attr.Value}, wants) { + matched[attr.Key] = true + } + } + return len(matched) == len(expected) +} + +func anyAttributeValueMatches(key string, values, wants []string) bool { + for _, value := range values { + for _, want := range wants { + if key == "repository" && strings.EqualFold(want, value) { + return true + } + if key != "repository" && want == value { + return true + } + } + } + return false +} diff --git a/pkg/cmd/ci/vars.go b/pkg/cmd/ci/vars.go index 00a7eecc..ee9d2d6c 100644 --- a/pkg/cmd/ci/vars.go +++ b/pkg/cmd/ci/vars.go @@ -1,15 +1,12 @@ package ci import ( - "encoding/json" "fmt" - "os" "strings" "github.com/depot/cli/pkg/api" "github.com/depot/cli/pkg/config" "github.com/depot/cli/pkg/helpers" - civ2 "github.com/depot/cli/pkg/proto/depot/ci/v2" "github.com/spf13/cobra" ) @@ -22,6 +19,9 @@ func NewCmdVars() *cobra.Command { depot ci vars add GITHUB_REPO depot ci vars add MY_SERVICE_NAME --value "my_service" + # Set a named variable variant + depot ci vars set DEPLOY_ENV production --repo owner/repo --value "production" + # Add multiple variables at once depot ci vars add REGION=us-east-1 ENV=prod @@ -40,22 +40,124 @@ func NewCmdVars() *cobra.Command { return cmd.Help() }, } + cmd.AddCommand(NewCmdVarsSet()) cmd.AddCommand(NewCmdVarsAdd()) cmd.AddCommand(NewCmdVarsList()) cmd.AddCommand(NewCmdVarsRemove()) return cmd } +func NewCmdVarsSet() *cobra.Command { + var ( + orgID string + token string + value string + description string + repo []string + environment []string + branch []string + workflow []string + ) + + cmd := &cobra.Command{ + Use: "set [variant]", + Short: "Create or update a CI variable variant", + Long: `Create or update a CI variable variant. + +Variants let one variable name have different values for matching repositories, +environments, branches, or workflows. When variant is omitted, the variant is +named "default".`, + Example: ` # Set the default variant + depot ci vars set DEPLOY_ENV --value "staging" + + # Set a named variant + depot ci vars set DEPLOY_ENV production --value "production" + + # Set a variant that only applies to matching workflow runs + depot ci vars set DEPLOY_ENV production --repo owner/repo --env production --branch main --workflow deploy.yml --value "production" + + # Set a variant that applies to multiple branches + depot ci vars set DEPLOY_ENV release --repo owner/repo --branch main --branch 'release/*' --value "release"`, + Args: cobra.RangeArgs(1, 2), + RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + + if orgID == "" { + orgID = config.GetCurrentOrganization() + } + + if value == "" && !helpers.IsStdinTerminal() { + return fmt.Errorf("cannot prompt for a variable value in non-interactive mode; pass --value") + } + + tokenVal, err := helpers.ResolveProjectAuth(ctx, token) + if err != nil { + return err + } + if tokenVal == "" { + return fmt.Errorf("missing API token, please run `depot login`") + } + + varName, variant := args[0], "" + if len(args) == 2 { + variant = args[1] + } + if varName == "" { + return fmt.Errorf("variable name cannot be empty") + } + + varValue := value + if varValue == "" { + varValue, err = helpers.PromptForValue(fmt.Sprintf("Enter value for variable '%s': ", varName)) + if err != nil { + return fmt.Errorf("failed to read variable value: %w", err) + } + } + + result, err := api.CISetVariableVariant(ctx, tokenVal, orgID, api.CISetVariableVariantOptions{ + Name: varName, + Variant: variant, + Value: varValue, + Description: description, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) + if err != nil { + return fmt.Errorf("failed to set CI variable variant: %w", err) + } + + fmt.Printf("Successfully set CI variable '%s' variant '%s'\n", varName, displayVariantName(result.Variant.Name)) + return nil + }, + } + + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") + cmd.Flags().StringVar(&token, "token", "", "Depot API token") + cmd.Flags().StringVar(&value, "value", "", "Variable value (will prompt if not provided)") + cmd.Flags().StringVar(&description, "description", "", "Description of the variable variant") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Apply variant to a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Apply variant to an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Apply variant to a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Apply variant to a workflow file (repeatable)") + + return cmd +} + func NewCmdVarsAdd() *cobra.Command { var ( - orgID string - token string - value string - repo string + orgID string + token string + value string + repo []string + environment []string + branch []string + workflow []string ) cmd := &cobra.Command{ - Use: "add [VAR_NAME | KEY=VALUE ...]", + Use: "add [VAR_NAME [variant] | KEY=VALUE ...]", Short: "Add one or more CI variables", Long: `Add variables that can be used in Depot CI workflows. @@ -65,14 +167,17 @@ Supports three modes: 3. Bulk KEY=VALUE pairs: depot ci vars add FOO=bar BAZ=qux The --value flag cannot be used with KEY=VALUE pairs. -Use --repo to scope variables to a specific repository. Without --repo, variables -apply to all repositories in the organization.`, +Use --repo, --env, --branch, and --workflow to choose where the variant applies. +Without match flags, the variant applies to all workflow runs in the organization.`, Example: ` # Add an org-wide variable with interactive prompt depot ci vars add GITHUB_REPO # Add an org-wide variable with value from command line depot ci vars add MY_SERVICE_NAME --value "my_service" + # Add a named variable variant + depot ci vars add DEPLOY_ENV production --value "production" + # Add multiple variables at once depot ci vars add REGION=us-east-1 ENV=prod @@ -95,10 +200,8 @@ apply to all repositories in the organization.`, return fmt.Errorf("missing API token, please run `depot login`") } - scope := "org-wide" - if repo != "" { - scope = repo - } + scope := variantScope(repo) + variant := "" // Detect KEY=VALUE pairs hasKVPairs := false @@ -115,32 +218,50 @@ apply to all repositories in the organization.`, return fmt.Errorf("cannot use --value with KEY=VALUE arguments") } - var variables []*civ2.VariableInput + type variableInput struct { + name string + value string + } + + var variables []variableInput for _, arg := range args { parts := strings.SplitN(arg, "=", 2) if len(parts) != 2 || parts[0] == "" { - return fmt.Errorf("invalid argument %q — expected KEY=VALUE format", arg) + return fmt.Errorf("invalid argument %q - expected KEY=VALUE format", arg) } - variables = append(variables, &civ2.VariableInput{Name: parts[0], Value: parts[1]}) + variables = append(variables, variableInput{name: parts[0], value: parts[1]}) } - err := api.CIBatchAddVariables(ctx, tokenVal, orgID, variables, repo) - if err != nil { - return fmt.Errorf("failed to add variables: %w", err) + for _, variable := range variables { + _, err := api.CISetVariableVariant(ctx, tokenVal, orgID, api.CISetVariableVariantOptions{ + Name: variable.name, + Variant: variant, + Value: variable.value, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) + if err != nil { + return fmt.Errorf("failed to add CI variable '%s': %w", variable.name, err) + } } for _, v := range variables { - fmt.Printf("Successfully added CI variable '%s' (%s)\n", v.Name, scope) + fmt.Printf("Successfully added CI variable '%s' variant '%s' (%s)\n", v.name, displayVariantName(variant), scope) } return nil } - // Single mode: first arg is variable name - if len(args) > 1 { - return fmt.Errorf("too many arguments — did you mean to use KEY=VALUE format?") + // Single mode: first arg is variable name, second optional arg is variant. + if len(args) > 2 { + return fmt.Errorf("too many arguments - did you mean to use KEY=VALUE format?") } varName := args[0] + if len(args) == 2 { + variant = args[1] + } if varName == "" { return fmt.Errorf("variable name cannot be empty") } @@ -153,38 +274,55 @@ apply to all repositories in the organization.`, } } - err = api.CIAddVariable(ctx, tokenVal, orgID, varName, varValue, repo) + _, err = api.CISetVariableVariant(ctx, tokenVal, orgID, api.CISetVariableVariantOptions{ + Name: varName, + Variant: variant, + Value: varValue, + Repo: repo, + Environment: environment, + Branch: branch, + Workflow: workflow, + }) if err != nil { return fmt.Errorf("failed to add CI variable: %w", err) } - fmt.Printf("Successfully added CI variable '%s' (%s)\n", varName, scope) + fmt.Printf("Successfully added CI variable '%s' variant '%s' (%s)\n", varName, displayVariantName(variant), scope) return nil }, } - cmd.Flags().StringVar(&orgID, "org", "", "Organization ID") + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") cmd.Flags().StringVar(&token, "token", "", "Depot API token") cmd.Flags().StringVar(&value, "value", "", "Variable value (will prompt if not provided)") - cmd.Flags().StringVar(&repo, "repo", "", "Scope variable to a specific repository (e.g. owner/repo)") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Apply variant to a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Apply variant to an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Apply variant to a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Apply variant to a workflow file (repeatable)") return cmd } func NewCmdVarsList() *cobra.Command { var ( - orgID string - token string - output string - repo string + orgID string + token string + output string + repo []string + environment []string + branch []string + workflow []string ) cmd := &cobra.Command{ - Use: "list", + Use: "list []", Short: "List all CI variables", - Long: `List all CI variables for your organization. -Use --repo to also show repo-specific variables that override org-wide values.`, + Long: `List CI variables and their variants. + +Use --repo, --env, --branch, and --workflow to filter variants by matching +attributes. Passing a variable name lists one grouped variable.`, Aliases: []string{"ls"}, + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() @@ -199,54 +337,74 @@ Use --repo to also show repo-specific variables that override org-wide values.`, if tokenVal == "" { return fmt.Errorf("missing API token, please run `depot login`") } + switch output { + case "", "json": + default: + return fmt.Errorf("unsupported output %q (valid: json)", output) + } + if output == "json" && len(args) == 0 { + if legacyRepo, ok := legacyListRepoSelector(repo, environment, branch, workflow); ok { + variables, err := api.CIListVariables(ctx, tokenVal, orgID, legacyRepo) + if err != nil { + return fmt.Errorf("failed to list CI variables: %w", err) + } + return writeJSON(variables) + } + } - variables, err := api.CIListVariables(ctx, tokenVal, orgID, repo) - if err != nil { - return fmt.Errorf("failed to list CI variables: %w", err) + var result api.CIListVariableVariantsResult + if len(args) == 1 { + variable, err := api.CIGetVariableVariantGroup(ctx, tokenVal, orgID, args[0]) + if err != nil { + return fmt.Errorf("failed to get CI variable: %w", err) + } + result.Variables = []api.CIVariableGroup{filterVariableVariantsForList(variable, repo, environment, branch, workflow)} + } else { + var err error + result, err = api.CIListVariableVariants(ctx, tokenVal, orgID, api.CIListVariableVariantsOptions{ + Repo: nil, + Environment: nil, + Branch: nil, + Workflow: nil, + }) + if err != nil { + return fmt.Errorf("failed to list CI variables: %w", err) + } + filtered := result.Variables[:0] + for i := range result.Variables { + result.Variables[i] = filterVariableVariantsForList(result.Variables[i], repo, environment, branch, workflow) + if len(result.Variables[i].Variants) > 0 { + filtered = append(filtered, result.Variables[i]) + } + } + result.Variables = filtered } if output == "json" { - enc := json.NewEncoder(os.Stdout) - enc.SetIndent("", " ") - return enc.Encode(variables) + return writeJSON(result) } - if len(variables) == 0 { + if len(result.Variables) == 0 { fmt.Println("No CI variables found.") return nil } - if repo != "" { - fmt.Printf("%-30s %-20s %-40s %s\n", "NAME", "SCOPE", "DESCRIPTION", "CREATED") - fmt.Printf("%-30s %-20s %-40s %s\n", strings.Repeat("-", 30), strings.Repeat("-", 20), strings.Repeat("-", 40), strings.Repeat("-", 20)) - } else { - fmt.Printf("%-30s %-50s %s\n", "NAME", "DESCRIPTION", "CREATED") - fmt.Printf("%-30s %-50s %s\n", strings.Repeat("-", 30), strings.Repeat("-", 50), strings.Repeat("-", 20)) - } - - for _, v := range variables { - name := v.Name - if len(name) > 30 { - name = name[:27] + "..." + fmt.Printf("%-30s %-18s %-32s %-42s %-30s %s\n", "NAME", "VARIANT", "VALUE", "ATTRIBUTES", "DESCRIPTION", "UPDATED") + fmt.Printf("%-30s %-18s %-32s %-42s %-30s %s\n", strings.Repeat("-", 30), strings.Repeat("-", 18), strings.Repeat("-", 32), strings.Repeat("-", 42), strings.Repeat("-", 30), strings.Repeat("-", 20)) + for _, variable := range result.Variables { + if len(variable.Variants) == 0 { + fmt.Printf("%-30s %-18s %-32s %-42s %-30s %s\n", truncateForTable(variable.Name, 30), "-", "-", "-", "-", variable.LastModified) + continue } - - description := v.Description - created := v.CreatedAt - - if repo != "" { - if len(description) > 40 { - description = description[:37] + "..." - } - scope := v.Scope - if len(scope) > 20 { - scope = scope[:17] + "..." - } - fmt.Printf("%-30s %-20s %-40s %s\n", name, scope, description, created) - } else { - if len(description) > 50 { - description = description[:47] + "..." - } - fmt.Printf("%-30s %-50s %s\n", name, description, created) + for _, variant := range variable.Variants { + fmt.Printf("%-30s %-18s %-32s %-42s %-30s %s\n", + truncateForTable(variable.Name, 30), + truncateForTable(displayVariantName(variant.Name), 18), + truncateForTable(variant.Value, 32), + truncateForTable(formatVariantAttributes(variant.Attributes), 42), + truncateForTable(variant.Description, 30), + variant.LastModified, + ) } } @@ -254,33 +412,51 @@ Use --repo to also show repo-specific variables that override org-wide values.`, }, } - cmd.Flags().StringVar(&orgID, "org", "", "Organization ID") + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") cmd.Flags().StringVar(&token, "token", "", "Depot API token") cmd.Flags().StringVar(&output, "output", "", "Output format (json)") - cmd.Flags().StringVar(&repo, "repo", "", "Also show repo-specific variables for this repository (e.g. owner/repo)") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Filter variants by repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Filter variants by environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Filter variants by branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Filter variants by workflow file (repeatable)") return cmd } func NewCmdVarsRemove() *cobra.Command { var ( - orgID string - token string - force bool - repo string + orgID string + token string + force bool + repo []string + environment []string + branch []string + workflow []string + variant string + all bool ) cmd := &cobra.Command{ - Use: "remove VAR_NAME [VAR_NAME...]", + Use: "remove [...]", Short: "Remove one or more CI variables", - Long: `Remove one or more CI variables from your organization. -Use --repo to remove repo-specific variables instead of org-wide ones.`, + Long: `Remove one or more CI variables. + +By default, positional arguments are treated as variable names and the command +removes the whole variable with every variant under it. Use selector flags or +--variant to remove one matching variant. --all makes whole-variable removal +explicit and cannot be combined with selector flags or --variant.`, Example: ` # Remove an org-wide variable depot ci vars remove GITHUB_REPO - # Remove a repo-specific variable + # Remove a repo-specific variant depot ci vars remove GITHUB_REPO --repo owner/repo + # Remove a named variant + depot ci vars remove GITHUB_REPO --variant production + + # Remove every variant for a variable + depot ci vars remove GITHUB_REPO --all + # Remove variables without confirmation prompt depot ci vars remove GITHUB_REPO MY_SERVICE_NAME --force`, Aliases: []string{"rm"}, @@ -292,6 +468,13 @@ Use --repo to remove repo-specific variables instead of org-wide ones.`, orgID = config.GetCurrentOrganization() } + names := args + selectsVariant := variant != "" || hasVariantSelectors(repo, environment, branch, workflow) + if all && selectsVariant { + return fmt.Errorf("--all cannot be used with --variant, --repo, --env, --branch, or --workflow") + } + removeGroups := all || !selectsVariant + tokenVal, err := helpers.ResolveOrgAuth(ctx, token) if err != nil { return err @@ -300,14 +483,17 @@ Use --repo to remove repo-specific variables instead of org-wide ones.`, return fmt.Errorf("missing API token, please run `depot login`") } - scope := "org-wide" - if repo != "" { - scope = repo - } - if !force { - names := strings.Join(args, ", ") - prompt := fmt.Sprintf("Are you sure you want to remove %s CI variable(s) %s? (y/N): ", scope, names) + namesLabel := strings.Join(names, ", ") + var target string + if removeGroups { + target = "CI variable(s) and all variants" + } else if variant != "" { + target = fmt.Sprintf("variant %q for CI variable(s)", variant) + } else { + target = "selected CI variable variant(s)" + } + prompt := fmt.Sprintf("Are you sure you want to remove %s %s? (y/N): ", target, namesLabel) y, err := helpers.PromptForYN(prompt) if err != nil { return fmt.Errorf("failed to read confirmation: %w", err) @@ -316,22 +502,50 @@ Use --repo to remove repo-specific variables instead of org-wide ones.`, } } - for _, varName := range args { - err := api.CIDeleteVariable(ctx, tokenVal, orgID, varName, repo) + for _, varName := range names { + if removeGroups { + if err := api.CIDeleteVariableGroup(ctx, tokenVal, orgID, varName); err != nil { + return fmt.Errorf("failed to remove CI variable '%s': %w", varName, err) + } + fmt.Printf("Successfully removed CI variable '%s' and all variants\n", varName) + continue + } + + group, err := api.CIGetVariableVariantGroup(ctx, tokenVal, orgID, varName) + if err != nil { + return fmt.Errorf("failed to get CI variable '%s': %w", varName, err) + } + + matches, err := resolveVariableVariant(group, variant, repo, environment, branch, workflow) if err != nil { - return fmt.Errorf("failed to remove CI variable '%s': %w", varName, err) + return err + } + if len(matches) == 0 { + return fmt.Errorf("no matching variant found for CI variable '%s'", varName) + } + if len(matches) > 1 { + return fmt.Errorf("CI variable '%s' has multiple matching variants; pass --variant or add selector flags", varName) + } + + if _, err := api.CIDeleteVariableVariant(ctx, tokenVal, orgID, matches[0].ID); err != nil { + return fmt.Errorf("failed to remove CI variable '%s' variant '%s': %w", varName, matches[0].Name, err) } - fmt.Printf("Successfully removed CI variable '%s' (%s)\n", varName, scope) + fmt.Printf("Successfully removed CI variable '%s' variant '%s'\n", varName, displayVariantName(matches[0].Name)) } return nil }, } - cmd.Flags().StringVar(&orgID, "org", "", "Organization ID") + cmd.Flags().StringVar(&orgID, "org", "", "Organization ID (required when user is a member of multiple organizations)") cmd.Flags().StringVar(&token, "token", "", "Depot API token") cmd.Flags().BoolVar(&force, "force", false, "Skip confirmation prompt") - cmd.Flags().StringVar(&repo, "repo", "", "Remove repo-specific variable instead of org-wide (e.g. owner/repo)") + cmd.Flags().StringArrayVar(&repo, "repo", nil, "Select variant matching a repository (repeatable, e.g. owner/repo)") + cmd.Flags().StringArrayVar(&environment, "env", nil, "Select variant matching an environment (repeatable)") + cmd.Flags().StringArrayVar(&branch, "branch", nil, "Select variant matching a branch (repeatable)") + cmd.Flags().StringArrayVar(&workflow, "workflow", nil, "Select variant matching a workflow file (repeatable)") + cmd.Flags().StringVar(&variant, "variant", "", "Select variant by name") + cmd.Flags().BoolVar(&all, "all", false, "Remove the variable and all variants") return cmd } diff --git a/pkg/helpers/cli_prompt.go b/pkg/helpers/cli_prompt.go index 85cb2849..93c653c2 100644 --- a/pkg/helpers/cli_prompt.go +++ b/pkg/helpers/cli_prompt.go @@ -3,6 +3,7 @@ package helpers import ( "bufio" "fmt" + "io" "os" "regexp" "strings" @@ -24,6 +25,31 @@ func PromptForSecret(prompt string) (string, error) { return password, nil } +func SecretValueFromInput(prompt string) (string, error) { + if !IsStdinTerminal() { + return SecretValueFromStdin() + } + return PromptForSecret(prompt) +} + +func SecretValueFromStdin() (string, error) { + input, err := io.ReadAll(os.Stdin) + if err != nil { + return "", err + } + if len(input) == 0 { + return "", fmt.Errorf("no secret value provided on stdin") + } + return stripANSI(trimOneTrailingNewline(string(input))), nil +} + +func trimOneTrailingNewline(s string) string { + if strings.HasSuffix(s, "\r\n") { + return strings.TrimSuffix(s, "\r\n") + } + return strings.TrimSuffix(s, "\n") +} + func stripANSI(s string) string { // Matches ESC followed by bracket and any sequence of characters ending in a letter ansiRegex := regexp.MustCompile(`\x1b\[[0-9;]*[a-zA-Z]`) diff --git a/pkg/helpers/cli_prompt_test.go b/pkg/helpers/cli_prompt_test.go new file mode 100644 index 00000000..7db18325 --- /dev/null +++ b/pkg/helpers/cli_prompt_test.go @@ -0,0 +1,57 @@ +package helpers + +import ( + "os" + "strings" + "testing" +) + +func TestSecretValueFromInputRejectsEmptyNonTerminalStdin(t *testing.T) { + oldStdin := os.Stdin + t.Cleanup(func() { + os.Stdin = oldStdin + }) + + file, err := os.CreateTemp(t.TempDir(), "empty-stdin") + if err != nil { + t.Fatal(err) + } + defer file.Close() + os.Stdin = file + + _, err = SecretValueFromInput("Enter secret: ") + if err == nil { + t.Fatal("expected error for empty stdin") + } + if !strings.Contains(err.Error(), "no secret value provided on stdin") { + t.Fatalf("error = %q", err) + } +} + +func TestSecretValueFromInputReadsNonTerminalStdin(t *testing.T) { + oldStdin := os.Stdin + t.Cleanup(func() { + os.Stdin = oldStdin + }) + + file, err := os.CreateTemp(t.TempDir(), "stdin") + if err != nil { + t.Fatal(err) + } + defer file.Close() + if _, err := file.WriteString("secret\n"); err != nil { + t.Fatal(err) + } + if _, err := file.Seek(0, 0); err != nil { + t.Fatal(err) + } + os.Stdin = file + + got, err := SecretValueFromInput("Enter secret: ") + if err != nil { + t.Fatal(err) + } + if got != "secret" { + t.Fatalf("SecretValueFromInput() = %q, want %q", got, "secret") + } +} diff --git a/pkg/helpers/tty.go b/pkg/helpers/tty.go index 7f314870..17723ac0 100644 --- a/pkg/helpers/tty.go +++ b/pkg/helpers/tty.go @@ -12,6 +12,11 @@ func IsTerminal() bool { return !isCI && isTerminal(os.Stdout) && isTerminal(os.Stderr) } +func IsStdinTerminal() bool { + _, isCI := ci.Provider() + return !isCI && isTerminal(os.Stdin) +} + func isTerminal(f *os.File) bool { return isatty.IsTerminal(f.Fd()) || isatty.IsCygwinTerminal(f.Fd()) } diff --git a/pkg/proto/depot/ci/v3beta2/civ3beta2connect/secrets.connect.go b/pkg/proto/depot/ci/v3beta2/civ3beta2connect/secrets.connect.go new file mode 100644 index 00000000..2bd36da0 --- /dev/null +++ b/pkg/proto/depot/ci/v3beta2/civ3beta2connect/secrets.connect.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: depot/ci/v3beta2/secrets.proto + +package civ3beta2connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v3beta2 "github.com/depot/cli/pkg/proto/depot/ci/v3beta2" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // SecretServiceName is the fully-qualified name of the SecretService service. + SecretServiceName = "depot.ci.v3beta2.SecretService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // SecretServiceListSecretsProcedure is the fully-qualified name of the SecretService's ListSecrets + // RPC. + SecretServiceListSecretsProcedure = "/depot.ci.v3beta2.SecretService/ListSecrets" + // SecretServiceGetSecretProcedure is the fully-qualified name of the SecretService's GetSecret RPC. + SecretServiceGetSecretProcedure = "/depot.ci.v3beta2.SecretService/GetSecret" + // SecretServiceGetSecretVariantProcedure is the fully-qualified name of the SecretService's + // GetSecretVariant RPC. + SecretServiceGetSecretVariantProcedure = "/depot.ci.v3beta2.SecretService/GetSecretVariant" + // SecretServiceCreateSecretVariantProcedure is the fully-qualified name of the SecretService's + // CreateSecretVariant RPC. + SecretServiceCreateSecretVariantProcedure = "/depot.ci.v3beta2.SecretService/CreateSecretVariant" + // SecretServiceSetSecretVariantProcedure is the fully-qualified name of the SecretService's + // SetSecretVariant RPC. + SecretServiceSetSecretVariantProcedure = "/depot.ci.v3beta2.SecretService/SetSecretVariant" + // SecretServiceUpdateSecretVariantMetadataProcedure is the fully-qualified name of the + // SecretService's UpdateSecretVariantMetadata RPC. + SecretServiceUpdateSecretVariantMetadataProcedure = "/depot.ci.v3beta2.SecretService/UpdateSecretVariantMetadata" + // SecretServiceUpdateSecretVariantValueProcedure is the fully-qualified name of the SecretService's + // UpdateSecretVariantValue RPC. + SecretServiceUpdateSecretVariantValueProcedure = "/depot.ci.v3beta2.SecretService/UpdateSecretVariantValue" + // SecretServiceDeleteSecretVariantProcedure is the fully-qualified name of the SecretService's + // DeleteSecretVariant RPC. + SecretServiceDeleteSecretVariantProcedure = "/depot.ci.v3beta2.SecretService/DeleteSecretVariant" + // SecretServiceDeleteSecretProcedure is the fully-qualified name of the SecretService's + // DeleteSecret RPC. + SecretServiceDeleteSecretProcedure = "/depot.ci.v3beta2.SecretService/DeleteSecret" +) + +// SecretServiceClient is a client for the depot.ci.v3beta2.SecretService service. +type SecretServiceClient interface { + ListSecrets(context.Context, *connect.Request[v3beta2.ListSecretsRequest]) (*connect.Response[v3beta2.ListSecretsResponse], error) + GetSecret(context.Context, *connect.Request[v3beta2.GetSecretRequest]) (*connect.Response[v3beta2.GetSecretResponse], error) + GetSecretVariant(context.Context, *connect.Request[v3beta2.GetSecretVariantRequest]) (*connect.Response[v3beta2.GetSecretVariantResponse], error) + CreateSecretVariant(context.Context, *connect.Request[v3beta2.CreateSecretVariantRequest]) (*connect.Response[v3beta2.CreateSecretVariantResponse], error) + SetSecretVariant(context.Context, *connect.Request[v3beta2.SetSecretVariantRequest]) (*connect.Response[v3beta2.SetSecretVariantResponse], error) + UpdateSecretVariantMetadata(context.Context, *connect.Request[v3beta2.UpdateSecretVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateSecretVariantMetadataResponse], error) + UpdateSecretVariantValue(context.Context, *connect.Request[v3beta2.UpdateSecretVariantValueRequest]) (*connect.Response[v3beta2.UpdateSecretVariantValueResponse], error) + DeleteSecretVariant(context.Context, *connect.Request[v3beta2.DeleteSecretVariantRequest]) (*connect.Response[v3beta2.DeleteSecretVariantResponse], error) + DeleteSecret(context.Context, *connect.Request[v3beta2.DeleteSecretRequest]) (*connect.Response[v3beta2.DeleteSecretResponse], error) +} + +// NewSecretServiceClient constructs a client for the depot.ci.v3beta2.SecretService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewSecretServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SecretServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &secretServiceClient{ + listSecrets: connect.NewClient[v3beta2.ListSecretsRequest, v3beta2.ListSecretsResponse]( + httpClient, + baseURL+SecretServiceListSecretsProcedure, + opts..., + ), + getSecret: connect.NewClient[v3beta2.GetSecretRequest, v3beta2.GetSecretResponse]( + httpClient, + baseURL+SecretServiceGetSecretProcedure, + opts..., + ), + getSecretVariant: connect.NewClient[v3beta2.GetSecretVariantRequest, v3beta2.GetSecretVariantResponse]( + httpClient, + baseURL+SecretServiceGetSecretVariantProcedure, + opts..., + ), + createSecretVariant: connect.NewClient[v3beta2.CreateSecretVariantRequest, v3beta2.CreateSecretVariantResponse]( + httpClient, + baseURL+SecretServiceCreateSecretVariantProcedure, + opts..., + ), + setSecretVariant: connect.NewClient[v3beta2.SetSecretVariantRequest, v3beta2.SetSecretVariantResponse]( + httpClient, + baseURL+SecretServiceSetSecretVariantProcedure, + opts..., + ), + updateSecretVariantMetadata: connect.NewClient[v3beta2.UpdateSecretVariantMetadataRequest, v3beta2.UpdateSecretVariantMetadataResponse]( + httpClient, + baseURL+SecretServiceUpdateSecretVariantMetadataProcedure, + opts..., + ), + updateSecretVariantValue: connect.NewClient[v3beta2.UpdateSecretVariantValueRequest, v3beta2.UpdateSecretVariantValueResponse]( + httpClient, + baseURL+SecretServiceUpdateSecretVariantValueProcedure, + opts..., + ), + deleteSecretVariant: connect.NewClient[v3beta2.DeleteSecretVariantRequest, v3beta2.DeleteSecretVariantResponse]( + httpClient, + baseURL+SecretServiceDeleteSecretVariantProcedure, + opts..., + ), + deleteSecret: connect.NewClient[v3beta2.DeleteSecretRequest, v3beta2.DeleteSecretResponse]( + httpClient, + baseURL+SecretServiceDeleteSecretProcedure, + opts..., + ), + } +} + +// secretServiceClient implements SecretServiceClient. +type secretServiceClient struct { + listSecrets *connect.Client[v3beta2.ListSecretsRequest, v3beta2.ListSecretsResponse] + getSecret *connect.Client[v3beta2.GetSecretRequest, v3beta2.GetSecretResponse] + getSecretVariant *connect.Client[v3beta2.GetSecretVariantRequest, v3beta2.GetSecretVariantResponse] + createSecretVariant *connect.Client[v3beta2.CreateSecretVariantRequest, v3beta2.CreateSecretVariantResponse] + setSecretVariant *connect.Client[v3beta2.SetSecretVariantRequest, v3beta2.SetSecretVariantResponse] + updateSecretVariantMetadata *connect.Client[v3beta2.UpdateSecretVariantMetadataRequest, v3beta2.UpdateSecretVariantMetadataResponse] + updateSecretVariantValue *connect.Client[v3beta2.UpdateSecretVariantValueRequest, v3beta2.UpdateSecretVariantValueResponse] + deleteSecretVariant *connect.Client[v3beta2.DeleteSecretVariantRequest, v3beta2.DeleteSecretVariantResponse] + deleteSecret *connect.Client[v3beta2.DeleteSecretRequest, v3beta2.DeleteSecretResponse] +} + +// ListSecrets calls depot.ci.v3beta2.SecretService.ListSecrets. +func (c *secretServiceClient) ListSecrets(ctx context.Context, req *connect.Request[v3beta2.ListSecretsRequest]) (*connect.Response[v3beta2.ListSecretsResponse], error) { + return c.listSecrets.CallUnary(ctx, req) +} + +// GetSecret calls depot.ci.v3beta2.SecretService.GetSecret. +func (c *secretServiceClient) GetSecret(ctx context.Context, req *connect.Request[v3beta2.GetSecretRequest]) (*connect.Response[v3beta2.GetSecretResponse], error) { + return c.getSecret.CallUnary(ctx, req) +} + +// GetSecretVariant calls depot.ci.v3beta2.SecretService.GetSecretVariant. +func (c *secretServiceClient) GetSecretVariant(ctx context.Context, req *connect.Request[v3beta2.GetSecretVariantRequest]) (*connect.Response[v3beta2.GetSecretVariantResponse], error) { + return c.getSecretVariant.CallUnary(ctx, req) +} + +// CreateSecretVariant calls depot.ci.v3beta2.SecretService.CreateSecretVariant. +func (c *secretServiceClient) CreateSecretVariant(ctx context.Context, req *connect.Request[v3beta2.CreateSecretVariantRequest]) (*connect.Response[v3beta2.CreateSecretVariantResponse], error) { + return c.createSecretVariant.CallUnary(ctx, req) +} + +// SetSecretVariant calls depot.ci.v3beta2.SecretService.SetSecretVariant. +func (c *secretServiceClient) SetSecretVariant(ctx context.Context, req *connect.Request[v3beta2.SetSecretVariantRequest]) (*connect.Response[v3beta2.SetSecretVariantResponse], error) { + return c.setSecretVariant.CallUnary(ctx, req) +} + +// UpdateSecretVariantMetadata calls depot.ci.v3beta2.SecretService.UpdateSecretVariantMetadata. +func (c *secretServiceClient) UpdateSecretVariantMetadata(ctx context.Context, req *connect.Request[v3beta2.UpdateSecretVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateSecretVariantMetadataResponse], error) { + return c.updateSecretVariantMetadata.CallUnary(ctx, req) +} + +// UpdateSecretVariantValue calls depot.ci.v3beta2.SecretService.UpdateSecretVariantValue. +func (c *secretServiceClient) UpdateSecretVariantValue(ctx context.Context, req *connect.Request[v3beta2.UpdateSecretVariantValueRequest]) (*connect.Response[v3beta2.UpdateSecretVariantValueResponse], error) { + return c.updateSecretVariantValue.CallUnary(ctx, req) +} + +// DeleteSecretVariant calls depot.ci.v3beta2.SecretService.DeleteSecretVariant. +func (c *secretServiceClient) DeleteSecretVariant(ctx context.Context, req *connect.Request[v3beta2.DeleteSecretVariantRequest]) (*connect.Response[v3beta2.DeleteSecretVariantResponse], error) { + return c.deleteSecretVariant.CallUnary(ctx, req) +} + +// DeleteSecret calls depot.ci.v3beta2.SecretService.DeleteSecret. +func (c *secretServiceClient) DeleteSecret(ctx context.Context, req *connect.Request[v3beta2.DeleteSecretRequest]) (*connect.Response[v3beta2.DeleteSecretResponse], error) { + return c.deleteSecret.CallUnary(ctx, req) +} + +// SecretServiceHandler is an implementation of the depot.ci.v3beta2.SecretService service. +type SecretServiceHandler interface { + ListSecrets(context.Context, *connect.Request[v3beta2.ListSecretsRequest]) (*connect.Response[v3beta2.ListSecretsResponse], error) + GetSecret(context.Context, *connect.Request[v3beta2.GetSecretRequest]) (*connect.Response[v3beta2.GetSecretResponse], error) + GetSecretVariant(context.Context, *connect.Request[v3beta2.GetSecretVariantRequest]) (*connect.Response[v3beta2.GetSecretVariantResponse], error) + CreateSecretVariant(context.Context, *connect.Request[v3beta2.CreateSecretVariantRequest]) (*connect.Response[v3beta2.CreateSecretVariantResponse], error) + SetSecretVariant(context.Context, *connect.Request[v3beta2.SetSecretVariantRequest]) (*connect.Response[v3beta2.SetSecretVariantResponse], error) + UpdateSecretVariantMetadata(context.Context, *connect.Request[v3beta2.UpdateSecretVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateSecretVariantMetadataResponse], error) + UpdateSecretVariantValue(context.Context, *connect.Request[v3beta2.UpdateSecretVariantValueRequest]) (*connect.Response[v3beta2.UpdateSecretVariantValueResponse], error) + DeleteSecretVariant(context.Context, *connect.Request[v3beta2.DeleteSecretVariantRequest]) (*connect.Response[v3beta2.DeleteSecretVariantResponse], error) + DeleteSecret(context.Context, *connect.Request[v3beta2.DeleteSecretRequest]) (*connect.Response[v3beta2.DeleteSecretResponse], error) +} + +// NewSecretServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewSecretServiceHandler(svc SecretServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + secretServiceListSecretsHandler := connect.NewUnaryHandler( + SecretServiceListSecretsProcedure, + svc.ListSecrets, + opts..., + ) + secretServiceGetSecretHandler := connect.NewUnaryHandler( + SecretServiceGetSecretProcedure, + svc.GetSecret, + opts..., + ) + secretServiceGetSecretVariantHandler := connect.NewUnaryHandler( + SecretServiceGetSecretVariantProcedure, + svc.GetSecretVariant, + opts..., + ) + secretServiceCreateSecretVariantHandler := connect.NewUnaryHandler( + SecretServiceCreateSecretVariantProcedure, + svc.CreateSecretVariant, + opts..., + ) + secretServiceSetSecretVariantHandler := connect.NewUnaryHandler( + SecretServiceSetSecretVariantProcedure, + svc.SetSecretVariant, + opts..., + ) + secretServiceUpdateSecretVariantMetadataHandler := connect.NewUnaryHandler( + SecretServiceUpdateSecretVariantMetadataProcedure, + svc.UpdateSecretVariantMetadata, + opts..., + ) + secretServiceUpdateSecretVariantValueHandler := connect.NewUnaryHandler( + SecretServiceUpdateSecretVariantValueProcedure, + svc.UpdateSecretVariantValue, + opts..., + ) + secretServiceDeleteSecretVariantHandler := connect.NewUnaryHandler( + SecretServiceDeleteSecretVariantProcedure, + svc.DeleteSecretVariant, + opts..., + ) + secretServiceDeleteSecretHandler := connect.NewUnaryHandler( + SecretServiceDeleteSecretProcedure, + svc.DeleteSecret, + opts..., + ) + return "/depot.ci.v3beta2.SecretService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case SecretServiceListSecretsProcedure: + secretServiceListSecretsHandler.ServeHTTP(w, r) + case SecretServiceGetSecretProcedure: + secretServiceGetSecretHandler.ServeHTTP(w, r) + case SecretServiceGetSecretVariantProcedure: + secretServiceGetSecretVariantHandler.ServeHTTP(w, r) + case SecretServiceCreateSecretVariantProcedure: + secretServiceCreateSecretVariantHandler.ServeHTTP(w, r) + case SecretServiceSetSecretVariantProcedure: + secretServiceSetSecretVariantHandler.ServeHTTP(w, r) + case SecretServiceUpdateSecretVariantMetadataProcedure: + secretServiceUpdateSecretVariantMetadataHandler.ServeHTTP(w, r) + case SecretServiceUpdateSecretVariantValueProcedure: + secretServiceUpdateSecretVariantValueHandler.ServeHTTP(w, r) + case SecretServiceDeleteSecretVariantProcedure: + secretServiceDeleteSecretVariantHandler.ServeHTTP(w, r) + case SecretServiceDeleteSecretProcedure: + secretServiceDeleteSecretHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedSecretServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedSecretServiceHandler struct{} + +func (UnimplementedSecretServiceHandler) ListSecrets(context.Context, *connect.Request[v3beta2.ListSecretsRequest]) (*connect.Response[v3beta2.ListSecretsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.ListSecrets is not implemented")) +} + +func (UnimplementedSecretServiceHandler) GetSecret(context.Context, *connect.Request[v3beta2.GetSecretRequest]) (*connect.Response[v3beta2.GetSecretResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.GetSecret is not implemented")) +} + +func (UnimplementedSecretServiceHandler) GetSecretVariant(context.Context, *connect.Request[v3beta2.GetSecretVariantRequest]) (*connect.Response[v3beta2.GetSecretVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.GetSecretVariant is not implemented")) +} + +func (UnimplementedSecretServiceHandler) CreateSecretVariant(context.Context, *connect.Request[v3beta2.CreateSecretVariantRequest]) (*connect.Response[v3beta2.CreateSecretVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.CreateSecretVariant is not implemented")) +} + +func (UnimplementedSecretServiceHandler) SetSecretVariant(context.Context, *connect.Request[v3beta2.SetSecretVariantRequest]) (*connect.Response[v3beta2.SetSecretVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.SetSecretVariant is not implemented")) +} + +func (UnimplementedSecretServiceHandler) UpdateSecretVariantMetadata(context.Context, *connect.Request[v3beta2.UpdateSecretVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateSecretVariantMetadataResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.UpdateSecretVariantMetadata is not implemented")) +} + +func (UnimplementedSecretServiceHandler) UpdateSecretVariantValue(context.Context, *connect.Request[v3beta2.UpdateSecretVariantValueRequest]) (*connect.Response[v3beta2.UpdateSecretVariantValueResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.UpdateSecretVariantValue is not implemented")) +} + +func (UnimplementedSecretServiceHandler) DeleteSecretVariant(context.Context, *connect.Request[v3beta2.DeleteSecretVariantRequest]) (*connect.Response[v3beta2.DeleteSecretVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.DeleteSecretVariant is not implemented")) +} + +func (UnimplementedSecretServiceHandler) DeleteSecret(context.Context, *connect.Request[v3beta2.DeleteSecretRequest]) (*connect.Response[v3beta2.DeleteSecretResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.SecretService.DeleteSecret is not implemented")) +} diff --git a/pkg/proto/depot/ci/v3beta2/civ3beta2connect/variables.connect.go b/pkg/proto/depot/ci/v3beta2/civ3beta2connect/variables.connect.go new file mode 100644 index 00000000..432f441e --- /dev/null +++ b/pkg/proto/depot/ci/v3beta2/civ3beta2connect/variables.connect.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: depot/ci/v3beta2/variables.proto + +package civ3beta2connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v3beta2 "github.com/depot/cli/pkg/proto/depot/ci/v3beta2" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion0_1_0 + +const ( + // VariableServiceName is the fully-qualified name of the VariableService service. + VariableServiceName = "depot.ci.v3beta2.VariableService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // VariableServiceListVariablesProcedure is the fully-qualified name of the VariableService's + // ListVariables RPC. + VariableServiceListVariablesProcedure = "/depot.ci.v3beta2.VariableService/ListVariables" + // VariableServiceGetVariableProcedure is the fully-qualified name of the VariableService's + // GetVariable RPC. + VariableServiceGetVariableProcedure = "/depot.ci.v3beta2.VariableService/GetVariable" + // VariableServiceGetVariableVariantProcedure is the fully-qualified name of the VariableService's + // GetVariableVariant RPC. + VariableServiceGetVariableVariantProcedure = "/depot.ci.v3beta2.VariableService/GetVariableVariant" + // VariableServiceCreateVariableVariantProcedure is the fully-qualified name of the + // VariableService's CreateVariableVariant RPC. + VariableServiceCreateVariableVariantProcedure = "/depot.ci.v3beta2.VariableService/CreateVariableVariant" + // VariableServiceSetVariableVariantProcedure is the fully-qualified name of the VariableService's + // SetVariableVariant RPC. + VariableServiceSetVariableVariantProcedure = "/depot.ci.v3beta2.VariableService/SetVariableVariant" + // VariableServiceUpdateVariableVariantValueProcedure is the fully-qualified name of the + // VariableService's UpdateVariableVariantValue RPC. + VariableServiceUpdateVariableVariantValueProcedure = "/depot.ci.v3beta2.VariableService/UpdateVariableVariantValue" + // VariableServiceUpdateVariableVariantMetadataProcedure is the fully-qualified name of the + // VariableService's UpdateVariableVariantMetadata RPC. + VariableServiceUpdateVariableVariantMetadataProcedure = "/depot.ci.v3beta2.VariableService/UpdateVariableVariantMetadata" + // VariableServiceDeleteVariableVariantProcedure is the fully-qualified name of the + // VariableService's DeleteVariableVariant RPC. + VariableServiceDeleteVariableVariantProcedure = "/depot.ci.v3beta2.VariableService/DeleteVariableVariant" + // VariableServiceDeleteVariableProcedure is the fully-qualified name of the VariableService's + // DeleteVariable RPC. + VariableServiceDeleteVariableProcedure = "/depot.ci.v3beta2.VariableService/DeleteVariable" +) + +// VariableServiceClient is a client for the depot.ci.v3beta2.VariableService service. +type VariableServiceClient interface { + ListVariables(context.Context, *connect.Request[v3beta2.ListVariablesRequest]) (*connect.Response[v3beta2.ListVariablesResponse], error) + GetVariable(context.Context, *connect.Request[v3beta2.GetVariableRequest]) (*connect.Response[v3beta2.GetVariableResponse], error) + GetVariableVariant(context.Context, *connect.Request[v3beta2.GetVariableVariantRequest]) (*connect.Response[v3beta2.GetVariableVariantResponse], error) + CreateVariableVariant(context.Context, *connect.Request[v3beta2.CreateVariableVariantRequest]) (*connect.Response[v3beta2.CreateVariableVariantResponse], error) + SetVariableVariant(context.Context, *connect.Request[v3beta2.SetVariableVariantRequest]) (*connect.Response[v3beta2.SetVariableVariantResponse], error) + UpdateVariableVariantValue(context.Context, *connect.Request[v3beta2.UpdateVariableVariantValueRequest]) (*connect.Response[v3beta2.UpdateVariableVariantValueResponse], error) + UpdateVariableVariantMetadata(context.Context, *connect.Request[v3beta2.UpdateVariableVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateVariableVariantMetadataResponse], error) + DeleteVariableVariant(context.Context, *connect.Request[v3beta2.DeleteVariableVariantRequest]) (*connect.Response[v3beta2.DeleteVariableVariantResponse], error) + DeleteVariable(context.Context, *connect.Request[v3beta2.DeleteVariableRequest]) (*connect.Response[v3beta2.DeleteVariableResponse], error) +} + +// NewVariableServiceClient constructs a client for the depot.ci.v3beta2.VariableService service. By +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewVariableServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VariableServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &variableServiceClient{ + listVariables: connect.NewClient[v3beta2.ListVariablesRequest, v3beta2.ListVariablesResponse]( + httpClient, + baseURL+VariableServiceListVariablesProcedure, + opts..., + ), + getVariable: connect.NewClient[v3beta2.GetVariableRequest, v3beta2.GetVariableResponse]( + httpClient, + baseURL+VariableServiceGetVariableProcedure, + opts..., + ), + getVariableVariant: connect.NewClient[v3beta2.GetVariableVariantRequest, v3beta2.GetVariableVariantResponse]( + httpClient, + baseURL+VariableServiceGetVariableVariantProcedure, + opts..., + ), + createVariableVariant: connect.NewClient[v3beta2.CreateVariableVariantRequest, v3beta2.CreateVariableVariantResponse]( + httpClient, + baseURL+VariableServiceCreateVariableVariantProcedure, + opts..., + ), + setVariableVariant: connect.NewClient[v3beta2.SetVariableVariantRequest, v3beta2.SetVariableVariantResponse]( + httpClient, + baseURL+VariableServiceSetVariableVariantProcedure, + opts..., + ), + updateVariableVariantValue: connect.NewClient[v3beta2.UpdateVariableVariantValueRequest, v3beta2.UpdateVariableVariantValueResponse]( + httpClient, + baseURL+VariableServiceUpdateVariableVariantValueProcedure, + opts..., + ), + updateVariableVariantMetadata: connect.NewClient[v3beta2.UpdateVariableVariantMetadataRequest, v3beta2.UpdateVariableVariantMetadataResponse]( + httpClient, + baseURL+VariableServiceUpdateVariableVariantMetadataProcedure, + opts..., + ), + deleteVariableVariant: connect.NewClient[v3beta2.DeleteVariableVariantRequest, v3beta2.DeleteVariableVariantResponse]( + httpClient, + baseURL+VariableServiceDeleteVariableVariantProcedure, + opts..., + ), + deleteVariable: connect.NewClient[v3beta2.DeleteVariableRequest, v3beta2.DeleteVariableResponse]( + httpClient, + baseURL+VariableServiceDeleteVariableProcedure, + opts..., + ), + } +} + +// variableServiceClient implements VariableServiceClient. +type variableServiceClient struct { + listVariables *connect.Client[v3beta2.ListVariablesRequest, v3beta2.ListVariablesResponse] + getVariable *connect.Client[v3beta2.GetVariableRequest, v3beta2.GetVariableResponse] + getVariableVariant *connect.Client[v3beta2.GetVariableVariantRequest, v3beta2.GetVariableVariantResponse] + createVariableVariant *connect.Client[v3beta2.CreateVariableVariantRequest, v3beta2.CreateVariableVariantResponse] + setVariableVariant *connect.Client[v3beta2.SetVariableVariantRequest, v3beta2.SetVariableVariantResponse] + updateVariableVariantValue *connect.Client[v3beta2.UpdateVariableVariantValueRequest, v3beta2.UpdateVariableVariantValueResponse] + updateVariableVariantMetadata *connect.Client[v3beta2.UpdateVariableVariantMetadataRequest, v3beta2.UpdateVariableVariantMetadataResponse] + deleteVariableVariant *connect.Client[v3beta2.DeleteVariableVariantRequest, v3beta2.DeleteVariableVariantResponse] + deleteVariable *connect.Client[v3beta2.DeleteVariableRequest, v3beta2.DeleteVariableResponse] +} + +// ListVariables calls depot.ci.v3beta2.VariableService.ListVariables. +func (c *variableServiceClient) ListVariables(ctx context.Context, req *connect.Request[v3beta2.ListVariablesRequest]) (*connect.Response[v3beta2.ListVariablesResponse], error) { + return c.listVariables.CallUnary(ctx, req) +} + +// GetVariable calls depot.ci.v3beta2.VariableService.GetVariable. +func (c *variableServiceClient) GetVariable(ctx context.Context, req *connect.Request[v3beta2.GetVariableRequest]) (*connect.Response[v3beta2.GetVariableResponse], error) { + return c.getVariable.CallUnary(ctx, req) +} + +// GetVariableVariant calls depot.ci.v3beta2.VariableService.GetVariableVariant. +func (c *variableServiceClient) GetVariableVariant(ctx context.Context, req *connect.Request[v3beta2.GetVariableVariantRequest]) (*connect.Response[v3beta2.GetVariableVariantResponse], error) { + return c.getVariableVariant.CallUnary(ctx, req) +} + +// CreateVariableVariant calls depot.ci.v3beta2.VariableService.CreateVariableVariant. +func (c *variableServiceClient) CreateVariableVariant(ctx context.Context, req *connect.Request[v3beta2.CreateVariableVariantRequest]) (*connect.Response[v3beta2.CreateVariableVariantResponse], error) { + return c.createVariableVariant.CallUnary(ctx, req) +} + +// SetVariableVariant calls depot.ci.v3beta2.VariableService.SetVariableVariant. +func (c *variableServiceClient) SetVariableVariant(ctx context.Context, req *connect.Request[v3beta2.SetVariableVariantRequest]) (*connect.Response[v3beta2.SetVariableVariantResponse], error) { + return c.setVariableVariant.CallUnary(ctx, req) +} + +// UpdateVariableVariantValue calls depot.ci.v3beta2.VariableService.UpdateVariableVariantValue. +func (c *variableServiceClient) UpdateVariableVariantValue(ctx context.Context, req *connect.Request[v3beta2.UpdateVariableVariantValueRequest]) (*connect.Response[v3beta2.UpdateVariableVariantValueResponse], error) { + return c.updateVariableVariantValue.CallUnary(ctx, req) +} + +// UpdateVariableVariantMetadata calls +// depot.ci.v3beta2.VariableService.UpdateVariableVariantMetadata. +func (c *variableServiceClient) UpdateVariableVariantMetadata(ctx context.Context, req *connect.Request[v3beta2.UpdateVariableVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateVariableVariantMetadataResponse], error) { + return c.updateVariableVariantMetadata.CallUnary(ctx, req) +} + +// DeleteVariableVariant calls depot.ci.v3beta2.VariableService.DeleteVariableVariant. +func (c *variableServiceClient) DeleteVariableVariant(ctx context.Context, req *connect.Request[v3beta2.DeleteVariableVariantRequest]) (*connect.Response[v3beta2.DeleteVariableVariantResponse], error) { + return c.deleteVariableVariant.CallUnary(ctx, req) +} + +// DeleteVariable calls depot.ci.v3beta2.VariableService.DeleteVariable. +func (c *variableServiceClient) DeleteVariable(ctx context.Context, req *connect.Request[v3beta2.DeleteVariableRequest]) (*connect.Response[v3beta2.DeleteVariableResponse], error) { + return c.deleteVariable.CallUnary(ctx, req) +} + +// VariableServiceHandler is an implementation of the depot.ci.v3beta2.VariableService service. +type VariableServiceHandler interface { + ListVariables(context.Context, *connect.Request[v3beta2.ListVariablesRequest]) (*connect.Response[v3beta2.ListVariablesResponse], error) + GetVariable(context.Context, *connect.Request[v3beta2.GetVariableRequest]) (*connect.Response[v3beta2.GetVariableResponse], error) + GetVariableVariant(context.Context, *connect.Request[v3beta2.GetVariableVariantRequest]) (*connect.Response[v3beta2.GetVariableVariantResponse], error) + CreateVariableVariant(context.Context, *connect.Request[v3beta2.CreateVariableVariantRequest]) (*connect.Response[v3beta2.CreateVariableVariantResponse], error) + SetVariableVariant(context.Context, *connect.Request[v3beta2.SetVariableVariantRequest]) (*connect.Response[v3beta2.SetVariableVariantResponse], error) + UpdateVariableVariantValue(context.Context, *connect.Request[v3beta2.UpdateVariableVariantValueRequest]) (*connect.Response[v3beta2.UpdateVariableVariantValueResponse], error) + UpdateVariableVariantMetadata(context.Context, *connect.Request[v3beta2.UpdateVariableVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateVariableVariantMetadataResponse], error) + DeleteVariableVariant(context.Context, *connect.Request[v3beta2.DeleteVariableVariantRequest]) (*connect.Response[v3beta2.DeleteVariableVariantResponse], error) + DeleteVariable(context.Context, *connect.Request[v3beta2.DeleteVariableRequest]) (*connect.Response[v3beta2.DeleteVariableResponse], error) +} + +// NewVariableServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewVariableServiceHandler(svc VariableServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + variableServiceListVariablesHandler := connect.NewUnaryHandler( + VariableServiceListVariablesProcedure, + svc.ListVariables, + opts..., + ) + variableServiceGetVariableHandler := connect.NewUnaryHandler( + VariableServiceGetVariableProcedure, + svc.GetVariable, + opts..., + ) + variableServiceGetVariableVariantHandler := connect.NewUnaryHandler( + VariableServiceGetVariableVariantProcedure, + svc.GetVariableVariant, + opts..., + ) + variableServiceCreateVariableVariantHandler := connect.NewUnaryHandler( + VariableServiceCreateVariableVariantProcedure, + svc.CreateVariableVariant, + opts..., + ) + variableServiceSetVariableVariantHandler := connect.NewUnaryHandler( + VariableServiceSetVariableVariantProcedure, + svc.SetVariableVariant, + opts..., + ) + variableServiceUpdateVariableVariantValueHandler := connect.NewUnaryHandler( + VariableServiceUpdateVariableVariantValueProcedure, + svc.UpdateVariableVariantValue, + opts..., + ) + variableServiceUpdateVariableVariantMetadataHandler := connect.NewUnaryHandler( + VariableServiceUpdateVariableVariantMetadataProcedure, + svc.UpdateVariableVariantMetadata, + opts..., + ) + variableServiceDeleteVariableVariantHandler := connect.NewUnaryHandler( + VariableServiceDeleteVariableVariantProcedure, + svc.DeleteVariableVariant, + opts..., + ) + variableServiceDeleteVariableHandler := connect.NewUnaryHandler( + VariableServiceDeleteVariableProcedure, + svc.DeleteVariable, + opts..., + ) + return "/depot.ci.v3beta2.VariableService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case VariableServiceListVariablesProcedure: + variableServiceListVariablesHandler.ServeHTTP(w, r) + case VariableServiceGetVariableProcedure: + variableServiceGetVariableHandler.ServeHTTP(w, r) + case VariableServiceGetVariableVariantProcedure: + variableServiceGetVariableVariantHandler.ServeHTTP(w, r) + case VariableServiceCreateVariableVariantProcedure: + variableServiceCreateVariableVariantHandler.ServeHTTP(w, r) + case VariableServiceSetVariableVariantProcedure: + variableServiceSetVariableVariantHandler.ServeHTTP(w, r) + case VariableServiceUpdateVariableVariantValueProcedure: + variableServiceUpdateVariableVariantValueHandler.ServeHTTP(w, r) + case VariableServiceUpdateVariableVariantMetadataProcedure: + variableServiceUpdateVariableVariantMetadataHandler.ServeHTTP(w, r) + case VariableServiceDeleteVariableVariantProcedure: + variableServiceDeleteVariableVariantHandler.ServeHTTP(w, r) + case VariableServiceDeleteVariableProcedure: + variableServiceDeleteVariableHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedVariableServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedVariableServiceHandler struct{} + +func (UnimplementedVariableServiceHandler) ListVariables(context.Context, *connect.Request[v3beta2.ListVariablesRequest]) (*connect.Response[v3beta2.ListVariablesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.ListVariables is not implemented")) +} + +func (UnimplementedVariableServiceHandler) GetVariable(context.Context, *connect.Request[v3beta2.GetVariableRequest]) (*connect.Response[v3beta2.GetVariableResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.GetVariable is not implemented")) +} + +func (UnimplementedVariableServiceHandler) GetVariableVariant(context.Context, *connect.Request[v3beta2.GetVariableVariantRequest]) (*connect.Response[v3beta2.GetVariableVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.GetVariableVariant is not implemented")) +} + +func (UnimplementedVariableServiceHandler) CreateVariableVariant(context.Context, *connect.Request[v3beta2.CreateVariableVariantRequest]) (*connect.Response[v3beta2.CreateVariableVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.CreateVariableVariant is not implemented")) +} + +func (UnimplementedVariableServiceHandler) SetVariableVariant(context.Context, *connect.Request[v3beta2.SetVariableVariantRequest]) (*connect.Response[v3beta2.SetVariableVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.SetVariableVariant is not implemented")) +} + +func (UnimplementedVariableServiceHandler) UpdateVariableVariantValue(context.Context, *connect.Request[v3beta2.UpdateVariableVariantValueRequest]) (*connect.Response[v3beta2.UpdateVariableVariantValueResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.UpdateVariableVariantValue is not implemented")) +} + +func (UnimplementedVariableServiceHandler) UpdateVariableVariantMetadata(context.Context, *connect.Request[v3beta2.UpdateVariableVariantMetadataRequest]) (*connect.Response[v3beta2.UpdateVariableVariantMetadataResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.UpdateVariableVariantMetadata is not implemented")) +} + +func (UnimplementedVariableServiceHandler) DeleteVariableVariant(context.Context, *connect.Request[v3beta2.DeleteVariableVariantRequest]) (*connect.Response[v3beta2.DeleteVariableVariantResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.DeleteVariableVariant is not implemented")) +} + +func (UnimplementedVariableServiceHandler) DeleteVariable(context.Context, *connect.Request[v3beta2.DeleteVariableRequest]) (*connect.Response[v3beta2.DeleteVariableResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("depot.ci.v3beta2.VariableService.DeleteVariable is not implemented")) +} diff --git a/pkg/proto/depot/ci/v3beta2/secrets.pb.go b/pkg/proto/depot/ci/v3beta2/secrets.pb.go new file mode 100644 index 00000000..4003a33f --- /dev/null +++ b/pkg/proto/depot/ci/v3beta2/secrets.pb.go @@ -0,0 +1,1905 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/ci/v3beta2/secrets.proto + +package civ3beta2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Secret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Variants []*SecretVariant `protobuf:"bytes,3,rep,name=variants,proto3" json:"variants,omitempty"` + VariantCount uint32 `protobuf:"varint,4,opt,name=variant_count,json=variantCount,proto3" json:"variant_count,omitempty"` + LastModified *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` +} + +func (x *Secret) Reset() { + *x = Secret{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Secret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Secret) ProtoMessage() {} + +func (x *Secret) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{0} +} + +func (x *Secret) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Secret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Secret) GetVariants() []*SecretVariant { + if x != nil { + return x.Variants + } + return nil +} + +func (x *Secret) GetVariantCount() uint32 { + if x != nil { + return x.VariantCount + } + return 0 +} + +func (x *Secret) GetLastModified() *timestamppb.Timestamp { + if x != nil { + return x.LastModified + } + return nil +} + +type SecretVariant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SecretId string `protobuf:"bytes,2,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Attributes describe the job context this variant matches against. + // A variant with no attributes matches all jobs. + Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` + LastModified *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` + // Server-computed: variants under the same secret sharing the same value get the same index. + ValueGroupIndex *uint32 `protobuf:"varint,7,opt,name=value_group_index,json=valueGroupIndex,proto3,oneof" json:"value_group_index,omitempty"` +} + +func (x *SecretVariant) Reset() { + *x = SecretVariant{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretVariant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretVariant) ProtoMessage() {} + +func (x *SecretVariant) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 SecretVariant.ProtoReflect.Descriptor instead. +func (*SecretVariant) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{1} +} + +func (x *SecretVariant) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SecretVariant) GetSecretId() string { + if x != nil { + return x.SecretId + } + return "" +} + +func (x *SecretVariant) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecretVariant) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *SecretVariant) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *SecretVariant) GetLastModified() *timestamppb.Timestamp { + if x != nil { + return x.LastModified + } + return nil +} + +func (x *SecretVariant) GetValueGroupIndex() uint32 { + if x != nil && x.ValueGroupIndex != nil { + return *x.ValueGroupIndex + } + return 0 +} + +type ListSecretsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page *PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + // Optional name search/prefix/filter depending on product behavior. + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + // Optional filter for variants matching these attributes. + Attributes []*Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *ListSecretsRequest) Reset() { + *x = ListSecretsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecretsRequest) ProtoMessage() {} + +func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 ListSecretsRequest.ProtoReflect.Descriptor instead. +func (*ListSecretsRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{2} +} + +func (x *ListSecretsRequest) GetPage() *PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *ListSecretsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *ListSecretsRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type ListSecretsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` + Page *PageResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *ListSecretsResponse) Reset() { + *x = ListSecretsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSecretsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSecretsResponse) ProtoMessage() {} + +func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 ListSecretsResponse.ProtoReflect.Descriptor instead. +func (*ListSecretsResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{3} +} + +func (x *ListSecretsResponse) GetSecrets() []*Secret { + if x != nil { + return x.Secrets + } + return nil +} + +func (x *ListSecretsResponse) GetPage() *PageResponse { + if x != nil { + return x.Page + } + return nil +} + +type GetSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Lookup: + // + // *GetSecretRequest_Id + // *GetSecretRequest_Name + Lookup isGetSecretRequest_Lookup `protobuf_oneof:"lookup"` +} + +func (x *GetSecretRequest) Reset() { + *x = GetSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecretRequest) ProtoMessage() {} + +func (x *GetSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 GetSecretRequest.ProtoReflect.Descriptor instead. +func (*GetSecretRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{4} +} + +func (m *GetSecretRequest) GetLookup() isGetSecretRequest_Lookup { + if m != nil { + return m.Lookup + } + return nil +} + +func (x *GetSecretRequest) GetId() string { + if x, ok := x.GetLookup().(*GetSecretRequest_Id); ok { + return x.Id + } + return "" +} + +func (x *GetSecretRequest) GetName() string { + if x, ok := x.GetLookup().(*GetSecretRequest_Name); ok { + return x.Name + } + return "" +} + +type isGetSecretRequest_Lookup interface { + isGetSecretRequest_Lookup() +} + +type GetSecretRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type GetSecretRequest_Name struct { + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +func (*GetSecretRequest_Id) isGetSecretRequest_Lookup() {} + +func (*GetSecretRequest_Name) isGetSecretRequest_Lookup() {} + +type GetSecretResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *GetSecretResponse) Reset() { + *x = GetSecretResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecretResponse) ProtoMessage() {} + +func (x *GetSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 GetSecretResponse.ProtoReflect.Descriptor instead. +func (*GetSecretResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{5} +} + +func (x *GetSecretResponse) GetSecret() *Secret { + if x != nil { + return x.Secret + } + return nil +} + +type GetSecretVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetSecretVariantRequest) Reset() { + *x = GetSecretVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSecretVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecretVariantRequest) ProtoMessage() {} + +func (x *GetSecretVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_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 GetSecretVariantRequest.ProtoReflect.Descriptor instead. +func (*GetSecretVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{6} +} + +func (x *GetSecretVariantRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetSecretVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variant *SecretVariant `protobuf:"bytes,1,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *GetSecretVariantResponse) Reset() { + *x = GetSecretVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSecretVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSecretVariantResponse) ProtoMessage() {} + +func (x *GetSecretVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSecretVariantResponse.ProtoReflect.Descriptor instead. +func (*GetSecretVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{7} +} + +func (x *GetSecretVariantResponse) GetVariant() *SecretVariant { + if x != nil { + return x.Variant + } + return nil +} + +type SetSecretVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + // Defaults to "default" when empty. + VariantName string `protobuf:"bytes,2,opt,name=variant_name,json=variantName,proto3" json:"variant_name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Attributes describe the job context this variant matches against. + // Empty attributes means the variant is available everywhere. + Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *SetSecretVariantRequest) Reset() { + *x = SetSecretVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSecretVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSecretVariantRequest) ProtoMessage() {} + +func (x *SetSecretVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSecretVariantRequest.ProtoReflect.Descriptor instead. +func (*SetSecretVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{8} +} + +func (x *SetSecretVariantRequest) GetSecretName() string { + if x != nil { + return x.SecretName + } + return "" +} + +func (x *SetSecretVariantRequest) GetVariantName() string { + if x != nil { + return x.VariantName + } + return "" +} + +func (x *SetSecretVariantRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *SetSecretVariantRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *SetSecretVariantRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type SetSecretVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` + Variant *SecretVariant `protobuf:"bytes,2,opt,name=variant,proto3" json:"variant,omitempty"` + CreatedSecret bool `protobuf:"varint,3,opt,name=created_secret,json=createdSecret,proto3" json:"created_secret,omitempty"` + CreatedVariant bool `protobuf:"varint,4,opt,name=created_variant,json=createdVariant,proto3" json:"created_variant,omitempty"` +} + +func (x *SetSecretVariantResponse) Reset() { + *x = SetSecretVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetSecretVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetSecretVariantResponse) ProtoMessage() {} + +func (x *SetSecretVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetSecretVariantResponse.ProtoReflect.Descriptor instead. +func (*SetSecretVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{9} +} + +func (x *SetSecretVariantResponse) GetSecret() *Secret { + if x != nil { + return x.Secret + } + return nil +} + +func (x *SetSecretVariantResponse) GetVariant() *SecretVariant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *SetSecretVariantResponse) GetCreatedSecret() bool { + if x != nil { + return x.CreatedSecret + } + return false +} + +func (x *SetSecretVariantResponse) GetCreatedVariant() bool { + if x != nil { + return x.CreatedVariant + } + return false +} + +type CreateSecretVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` + // Defaults to "default" when empty. + VariantName string `protobuf:"bytes,2,opt,name=variant_name,json=variantName,proto3" json:"variant_name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + // Attributes describe the job context this variant matches against. + // Empty attributes means the variant is available everywhere. + Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *CreateSecretVariantRequest) Reset() { + *x = CreateSecretVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSecretVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSecretVariantRequest) ProtoMessage() {} + +func (x *CreateSecretVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSecretVariantRequest.ProtoReflect.Descriptor instead. +func (*CreateSecretVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateSecretVariantRequest) GetSecretName() string { + if x != nil { + return x.SecretName + } + return "" +} + +func (x *CreateSecretVariantRequest) GetVariantName() string { + if x != nil { + return x.VariantName + } + return "" +} + +func (x *CreateSecretVariantRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *CreateSecretVariantRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *CreateSecretVariantRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type CreateSecretVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` + Variant *SecretVariant `protobuf:"bytes,2,opt,name=variant,proto3" json:"variant,omitempty"` + CreatedSecret bool `protobuf:"varint,3,opt,name=created_secret,json=createdSecret,proto3" json:"created_secret,omitempty"` + CreatedVariant bool `protobuf:"varint,4,opt,name=created_variant,json=createdVariant,proto3" json:"created_variant,omitempty"` +} + +func (x *CreateSecretVariantResponse) Reset() { + *x = CreateSecretVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSecretVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSecretVariantResponse) ProtoMessage() {} + +func (x *CreateSecretVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSecretVariantResponse.ProtoReflect.Descriptor instead. +func (*CreateSecretVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateSecretVariantResponse) GetSecret() *Secret { + if x != nil { + return x.Secret + } + return nil +} + +func (x *CreateSecretVariantResponse) GetVariant() *SecretVariant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *CreateSecretVariantResponse) GetCreatedSecret() bool { + if x != nil { + return x.CreatedSecret + } + return false +} + +func (x *CreateSecretVariantResponse) GetCreatedVariant() bool { + if x != nil { + return x.CreatedVariant + } + return false +} + +type UpdateSecretVariantMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariantId string `protobuf:"bytes,1,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` + // Allows renaming a variant, e.g. default -> production. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Attributes []*Attribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *UpdateSecretVariantMetadataRequest) Reset() { + *x = UpdateSecretVariantMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecretVariantMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecretVariantMetadataRequest) ProtoMessage() {} + +func (x *UpdateSecretVariantMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSecretVariantMetadataRequest.ProtoReflect.Descriptor instead. +func (*UpdateSecretVariantMetadataRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateSecretVariantMetadataRequest) GetVariantId() string { + if x != nil { + return x.VariantId + } + return "" +} + +func (x *UpdateSecretVariantMetadataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateSecretVariantMetadataRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdateSecretVariantMetadataRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type UpdateSecretVariantMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variant *SecretVariant `protobuf:"bytes,1,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *UpdateSecretVariantMetadataResponse) Reset() { + *x = UpdateSecretVariantMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecretVariantMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecretVariantMetadataResponse) ProtoMessage() {} + +func (x *UpdateSecretVariantMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSecretVariantMetadataResponse.ProtoReflect.Descriptor instead. +func (*UpdateSecretVariantMetadataResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{13} +} + +func (x *UpdateSecretVariantMetadataResponse) GetVariant() *SecretVariant { + if x != nil { + return x.Variant + } + return nil +} + +type UpdateSecretVariantValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariantId string `protobuf:"bytes,1,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *UpdateSecretVariantValueRequest) Reset() { + *x = UpdateSecretVariantValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecretVariantValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecretVariantValueRequest) ProtoMessage() {} + +func (x *UpdateSecretVariantValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSecretVariantValueRequest.ProtoReflect.Descriptor instead. +func (*UpdateSecretVariantValueRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{14} +} + +func (x *UpdateSecretVariantValueRequest) GetVariantId() string { + if x != nil { + return x.VariantId + } + return "" +} + +func (x *UpdateSecretVariantValueRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type UpdateSecretVariantValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variant *SecretVariant `protobuf:"bytes,1,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *UpdateSecretVariantValueResponse) Reset() { + *x = UpdateSecretVariantValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSecretVariantValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSecretVariantValueResponse) ProtoMessage() {} + +func (x *UpdateSecretVariantValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSecretVariantValueResponse.ProtoReflect.Descriptor instead. +func (*UpdateSecretVariantValueResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{15} +} + +func (x *UpdateSecretVariantValueResponse) GetVariant() *SecretVariant { + if x != nil { + return x.Variant + } + return nil +} + +type DeleteSecretVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariantId string `protobuf:"bytes,1,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` +} + +func (x *DeleteSecretVariantRequest) Reset() { + *x = DeleteSecretVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretVariantRequest) ProtoMessage() {} + +func (x *DeleteSecretVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSecretVariantRequest.ProtoReflect.Descriptor instead. +func (*DeleteSecretVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{16} +} + +func (x *DeleteSecretVariantRequest) GetVariantId() string { + if x != nil { + return x.VariantId + } + return "" +} + +type DeleteSecretVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DeletedSecret bool `protobuf:"varint,1,opt,name=deleted_secret,json=deletedSecret,proto3" json:"deleted_secret,omitempty"` +} + +func (x *DeleteSecretVariantResponse) Reset() { + *x = DeleteSecretVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretVariantResponse) ProtoMessage() {} + +func (x *DeleteSecretVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSecretVariantResponse.ProtoReflect.Descriptor instead. +func (*DeleteSecretVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{17} +} + +func (x *DeleteSecretVariantResponse) GetDeletedSecret() bool { + if x != nil { + return x.DeletedSecret + } + return false +} + +type DeleteSecretRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Lookup: + // + // *DeleteSecretRequest_Id + // *DeleteSecretRequest_Name + Lookup isDeleteSecretRequest_Lookup `protobuf_oneof:"lookup"` +} + +func (x *DeleteSecretRequest) Reset() { + *x = DeleteSecretRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretRequest) ProtoMessage() {} + +func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSecretRequest.ProtoReflect.Descriptor instead. +func (*DeleteSecretRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{18} +} + +func (m *DeleteSecretRequest) GetLookup() isDeleteSecretRequest_Lookup { + if m != nil { + return m.Lookup + } + return nil +} + +func (x *DeleteSecretRequest) GetId() string { + if x, ok := x.GetLookup().(*DeleteSecretRequest_Id); ok { + return x.Id + } + return "" +} + +func (x *DeleteSecretRequest) GetName() string { + if x, ok := x.GetLookup().(*DeleteSecretRequest_Name); ok { + return x.Name + } + return "" +} + +type isDeleteSecretRequest_Lookup interface { + isDeleteSecretRequest_Lookup() +} + +type DeleteSecretRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type DeleteSecretRequest_Name struct { + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +func (*DeleteSecretRequest_Id) isDeleteSecretRequest_Lookup() {} + +func (*DeleteSecretRequest_Name) isDeleteSecretRequest_Lookup() {} + +type DeleteSecretResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteSecretResponse) Reset() { + *x = DeleteSecretResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSecretResponse) ProtoMessage() {} + +func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_secrets_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSecretResponse.ProtoReflect.Descriptor instead. +func (*DeleteSecretResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_secrets_proto_rawDescGZIP(), []int{19} +} + +var File_depot_ci_v3beta2_secrets_proto protoreflect.FileDescriptor + +var file_depot_ci_v3beta2_secrets_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x69, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x1a, 0x1c, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x69, 0x2f, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xe6, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x3b, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0xe3, 0x02, 0x0a, 0x0d, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0d, 0x48, 0x02, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x9a, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7d, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, + 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0x44, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x6c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x22, 0x45, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0xe7, 0x01, 0x0a, 0x17, + 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, + 0xea, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x01, 0x0a, + 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x39, + 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x22, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x22, 0x60, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5d, 0x0a, 0x20, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x1a, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x47, + 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, + 0x06, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xef, 0x07, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x12, 0x24, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, + 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, + 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8a, 0x01, + 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x18, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, + 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xc1, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x0c, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2f, 0x63, 0x69, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x63, 0x69, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0xa2, 0x02, 0x03, 0x44, 0x43, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x43, 0x69, 0x2e, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, + 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x43, 0x69, 0x5c, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x32, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x43, 0x69, 0x5c, 0x56, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x43, 0x69, 0x3a, 0x3a, 0x56, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_ci_v3beta2_secrets_proto_rawDescOnce sync.Once + file_depot_ci_v3beta2_secrets_proto_rawDescData = file_depot_ci_v3beta2_secrets_proto_rawDesc +) + +func file_depot_ci_v3beta2_secrets_proto_rawDescGZIP() []byte { + file_depot_ci_v3beta2_secrets_proto_rawDescOnce.Do(func() { + file_depot_ci_v3beta2_secrets_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_ci_v3beta2_secrets_proto_rawDescData) + }) + return file_depot_ci_v3beta2_secrets_proto_rawDescData +} + +var file_depot_ci_v3beta2_secrets_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_depot_ci_v3beta2_secrets_proto_goTypes = []interface{}{ + (*Secret)(nil), // 0: depot.ci.v3beta2.Secret + (*SecretVariant)(nil), // 1: depot.ci.v3beta2.SecretVariant + (*ListSecretsRequest)(nil), // 2: depot.ci.v3beta2.ListSecretsRequest + (*ListSecretsResponse)(nil), // 3: depot.ci.v3beta2.ListSecretsResponse + (*GetSecretRequest)(nil), // 4: depot.ci.v3beta2.GetSecretRequest + (*GetSecretResponse)(nil), // 5: depot.ci.v3beta2.GetSecretResponse + (*GetSecretVariantRequest)(nil), // 6: depot.ci.v3beta2.GetSecretVariantRequest + (*GetSecretVariantResponse)(nil), // 7: depot.ci.v3beta2.GetSecretVariantResponse + (*SetSecretVariantRequest)(nil), // 8: depot.ci.v3beta2.SetSecretVariantRequest + (*SetSecretVariantResponse)(nil), // 9: depot.ci.v3beta2.SetSecretVariantResponse + (*CreateSecretVariantRequest)(nil), // 10: depot.ci.v3beta2.CreateSecretVariantRequest + (*CreateSecretVariantResponse)(nil), // 11: depot.ci.v3beta2.CreateSecretVariantResponse + (*UpdateSecretVariantMetadataRequest)(nil), // 12: depot.ci.v3beta2.UpdateSecretVariantMetadataRequest + (*UpdateSecretVariantMetadataResponse)(nil), // 13: depot.ci.v3beta2.UpdateSecretVariantMetadataResponse + (*UpdateSecretVariantValueRequest)(nil), // 14: depot.ci.v3beta2.UpdateSecretVariantValueRequest + (*UpdateSecretVariantValueResponse)(nil), // 15: depot.ci.v3beta2.UpdateSecretVariantValueResponse + (*DeleteSecretVariantRequest)(nil), // 16: depot.ci.v3beta2.DeleteSecretVariantRequest + (*DeleteSecretVariantResponse)(nil), // 17: depot.ci.v3beta2.DeleteSecretVariantResponse + (*DeleteSecretRequest)(nil), // 18: depot.ci.v3beta2.DeleteSecretRequest + (*DeleteSecretResponse)(nil), // 19: depot.ci.v3beta2.DeleteSecretResponse + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*Attribute)(nil), // 21: depot.ci.v3beta2.Attribute + (*PageRequest)(nil), // 22: depot.ci.v3beta2.PageRequest + (*PageResponse)(nil), // 23: depot.ci.v3beta2.PageResponse +} +var file_depot_ci_v3beta2_secrets_proto_depIdxs = []int32{ + 1, // 0: depot.ci.v3beta2.Secret.variants:type_name -> depot.ci.v3beta2.SecretVariant + 20, // 1: depot.ci.v3beta2.Secret.last_modified:type_name -> google.protobuf.Timestamp + 21, // 2: depot.ci.v3beta2.SecretVariant.attributes:type_name -> depot.ci.v3beta2.Attribute + 20, // 3: depot.ci.v3beta2.SecretVariant.last_modified:type_name -> google.protobuf.Timestamp + 22, // 4: depot.ci.v3beta2.ListSecretsRequest.page:type_name -> depot.ci.v3beta2.PageRequest + 21, // 5: depot.ci.v3beta2.ListSecretsRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 0, // 6: depot.ci.v3beta2.ListSecretsResponse.secrets:type_name -> depot.ci.v3beta2.Secret + 23, // 7: depot.ci.v3beta2.ListSecretsResponse.page:type_name -> depot.ci.v3beta2.PageResponse + 0, // 8: depot.ci.v3beta2.GetSecretResponse.secret:type_name -> depot.ci.v3beta2.Secret + 1, // 9: depot.ci.v3beta2.GetSecretVariantResponse.variant:type_name -> depot.ci.v3beta2.SecretVariant + 21, // 10: depot.ci.v3beta2.SetSecretVariantRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 0, // 11: depot.ci.v3beta2.SetSecretVariantResponse.secret:type_name -> depot.ci.v3beta2.Secret + 1, // 12: depot.ci.v3beta2.SetSecretVariantResponse.variant:type_name -> depot.ci.v3beta2.SecretVariant + 21, // 13: depot.ci.v3beta2.CreateSecretVariantRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 0, // 14: depot.ci.v3beta2.CreateSecretVariantResponse.secret:type_name -> depot.ci.v3beta2.Secret + 1, // 15: depot.ci.v3beta2.CreateSecretVariantResponse.variant:type_name -> depot.ci.v3beta2.SecretVariant + 21, // 16: depot.ci.v3beta2.UpdateSecretVariantMetadataRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 1, // 17: depot.ci.v3beta2.UpdateSecretVariantMetadataResponse.variant:type_name -> depot.ci.v3beta2.SecretVariant + 1, // 18: depot.ci.v3beta2.UpdateSecretVariantValueResponse.variant:type_name -> depot.ci.v3beta2.SecretVariant + 2, // 19: depot.ci.v3beta2.SecretService.ListSecrets:input_type -> depot.ci.v3beta2.ListSecretsRequest + 4, // 20: depot.ci.v3beta2.SecretService.GetSecret:input_type -> depot.ci.v3beta2.GetSecretRequest + 6, // 21: depot.ci.v3beta2.SecretService.GetSecretVariant:input_type -> depot.ci.v3beta2.GetSecretVariantRequest + 10, // 22: depot.ci.v3beta2.SecretService.CreateSecretVariant:input_type -> depot.ci.v3beta2.CreateSecretVariantRequest + 8, // 23: depot.ci.v3beta2.SecretService.SetSecretVariant:input_type -> depot.ci.v3beta2.SetSecretVariantRequest + 12, // 24: depot.ci.v3beta2.SecretService.UpdateSecretVariantMetadata:input_type -> depot.ci.v3beta2.UpdateSecretVariantMetadataRequest + 14, // 25: depot.ci.v3beta2.SecretService.UpdateSecretVariantValue:input_type -> depot.ci.v3beta2.UpdateSecretVariantValueRequest + 16, // 26: depot.ci.v3beta2.SecretService.DeleteSecretVariant:input_type -> depot.ci.v3beta2.DeleteSecretVariantRequest + 18, // 27: depot.ci.v3beta2.SecretService.DeleteSecret:input_type -> depot.ci.v3beta2.DeleteSecretRequest + 3, // 28: depot.ci.v3beta2.SecretService.ListSecrets:output_type -> depot.ci.v3beta2.ListSecretsResponse + 5, // 29: depot.ci.v3beta2.SecretService.GetSecret:output_type -> depot.ci.v3beta2.GetSecretResponse + 7, // 30: depot.ci.v3beta2.SecretService.GetSecretVariant:output_type -> depot.ci.v3beta2.GetSecretVariantResponse + 11, // 31: depot.ci.v3beta2.SecretService.CreateSecretVariant:output_type -> depot.ci.v3beta2.CreateSecretVariantResponse + 9, // 32: depot.ci.v3beta2.SecretService.SetSecretVariant:output_type -> depot.ci.v3beta2.SetSecretVariantResponse + 13, // 33: depot.ci.v3beta2.SecretService.UpdateSecretVariantMetadata:output_type -> depot.ci.v3beta2.UpdateSecretVariantMetadataResponse + 15, // 34: depot.ci.v3beta2.SecretService.UpdateSecretVariantValue:output_type -> depot.ci.v3beta2.UpdateSecretVariantValueResponse + 17, // 35: depot.ci.v3beta2.SecretService.DeleteSecretVariant:output_type -> depot.ci.v3beta2.DeleteSecretVariantResponse + 19, // 36: depot.ci.v3beta2.SecretService.DeleteSecret:output_type -> depot.ci.v3beta2.DeleteSecretResponse + 28, // [28:37] is the sub-list for method output_type + 19, // [19:28] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_depot_ci_v3beta2_secrets_proto_init() } +func file_depot_ci_v3beta2_secrets_proto_init() { + if File_depot_ci_v3beta2_secrets_proto != nil { + return + } + file_depot_ci_v3beta2_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_ci_v3beta2_secrets_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Secret); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretVariant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSecretsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSecretsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSecretResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSecretVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSecretVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSecretVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetSecretVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSecretVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSecretVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSecretVariantMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSecretVariantMetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSecretVariantValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSecretVariantValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSecretResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_secrets_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_secrets_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*GetSecretRequest_Id)(nil), + (*GetSecretRequest_Name)(nil), + } + file_depot_ci_v3beta2_secrets_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_secrets_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_secrets_proto_msgTypes[18].OneofWrappers = []interface{}{ + (*DeleteSecretRequest_Id)(nil), + (*DeleteSecretRequest_Name)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_ci_v3beta2_secrets_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_depot_ci_v3beta2_secrets_proto_goTypes, + DependencyIndexes: file_depot_ci_v3beta2_secrets_proto_depIdxs, + MessageInfos: file_depot_ci_v3beta2_secrets_proto_msgTypes, + }.Build() + File_depot_ci_v3beta2_secrets_proto = out.File + file_depot_ci_v3beta2_secrets_proto_rawDesc = nil + file_depot_ci_v3beta2_secrets_proto_goTypes = nil + file_depot_ci_v3beta2_secrets_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/ci/v3beta2/types.pb.go b/pkg/proto/depot/ci/v3beta2/types.pb.go new file mode 100644 index 00000000..95aa1591 --- /dev/null +++ b/pkg/proto/depot/ci/v3beta2/types.pb.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/ci/v3beta2/types.proto + +package civ3beta2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Attribute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // "repository" | "environment" | "branch" | "workflow" + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // exact value or pattern, depending on key +} + +func (x *Attribute) Reset() { + *x = Attribute{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attribute) ProtoMessage() {} + +func (x *Attribute) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_types_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 Attribute.ProtoReflect.Descriptor instead. +func (*Attribute) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Attribute) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Attribute) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type PageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 1-based page number. Defaults to 1. + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Number of parent resources per page. +} + +func (x *PageRequest) Reset() { + *x = PageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageRequest) ProtoMessage() {} + +func (x *PageRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_types_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 PageRequest.ProtoReflect.Descriptor instead. +func (*PageRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_types_proto_rawDescGZIP(), []int{1} +} + +func (x *PageRequest) GetPage() uint32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *PageRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type PageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` +} + +func (x *PageResponse) Reset() { + *x = PageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageResponse) ProtoMessage() {} + +func (x *PageResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_types_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 PageResponse.ProtoReflect.Descriptor instead. +func (*PageResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_types_proto_rawDescGZIP(), []int{2} +} + +func (x *PageResponse) GetPage() uint32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *PageResponse) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *PageResponse) GetHasMore() bool { + if x != nil { + return x.HasMore + } + return false +} + +var File_depot_ci_v3beta2_types_proto protoreflect.FileDescriptor + +var file_depot_ci_v3beta2_types_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x69, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x22, 0x33, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 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, 0x3e, 0x0a, 0x0b, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5a, 0x0a, 0x0c, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6d, 0x6f, + 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, + 0x65, 0x42, 0xbf, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, + 0x69, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x63, 0x69, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x32, 0xa2, 0x02, 0x03, 0x44, 0x43, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x43, 0x69, 0x2e, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, 0x10, 0x44, + 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x43, 0x69, 0x5c, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0xe2, + 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x43, 0x69, 0x5c, 0x56, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x43, 0x69, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_ci_v3beta2_types_proto_rawDescOnce sync.Once + file_depot_ci_v3beta2_types_proto_rawDescData = file_depot_ci_v3beta2_types_proto_rawDesc +) + +func file_depot_ci_v3beta2_types_proto_rawDescGZIP() []byte { + file_depot_ci_v3beta2_types_proto_rawDescOnce.Do(func() { + file_depot_ci_v3beta2_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_ci_v3beta2_types_proto_rawDescData) + }) + return file_depot_ci_v3beta2_types_proto_rawDescData +} + +var file_depot_ci_v3beta2_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_depot_ci_v3beta2_types_proto_goTypes = []interface{}{ + (*Attribute)(nil), // 0: depot.ci.v3beta2.Attribute + (*PageRequest)(nil), // 1: depot.ci.v3beta2.PageRequest + (*PageResponse)(nil), // 2: depot.ci.v3beta2.PageResponse +} +var file_depot_ci_v3beta2_types_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_depot_ci_v3beta2_types_proto_init() } +func file_depot_ci_v3beta2_types_proto_init() { + if File_depot_ci_v3beta2_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_depot_ci_v3beta2_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Attribute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PageResponse); 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_depot_ci_v3beta2_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_depot_ci_v3beta2_types_proto_goTypes, + DependencyIndexes: file_depot_ci_v3beta2_types_proto_depIdxs, + MessageInfos: file_depot_ci_v3beta2_types_proto_msgTypes, + }.Build() + File_depot_ci_v3beta2_types_proto = out.File + file_depot_ci_v3beta2_types_proto_rawDesc = nil + file_depot_ci_v3beta2_types_proto_goTypes = nil + file_depot_ci_v3beta2_types_proto_depIdxs = nil +} diff --git a/pkg/proto/depot/ci/v3beta2/variables.pb.go b/pkg/proto/depot/ci/v3beta2/variables.pb.go new file mode 100644 index 00000000..b336343d --- /dev/null +++ b/pkg/proto/depot/ci/v3beta2/variables.pb.go @@ -0,0 +1,1902 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: depot/ci/v3beta2/variables.proto + +package civ3beta2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Variable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Variants []*VariableVariant `protobuf:"bytes,3,rep,name=variants,proto3" json:"variants,omitempty"` + VariantCount uint32 `protobuf:"varint,4,opt,name=variant_count,json=variantCount,proto3" json:"variant_count,omitempty"` + LastModified *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` +} + +func (x *Variable) Reset() { + *x = Variable{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Variable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Variable) ProtoMessage() {} + +func (x *Variable) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 Variable.ProtoReflect.Descriptor instead. +func (*Variable) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{0} +} + +func (x *Variable) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Variable) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Variable) GetVariants() []*VariableVariant { + if x != nil { + return x.Variants + } + return nil +} + +func (x *Variable) GetVariantCount() uint32 { + if x != nil { + return x.VariantCount + } + return 0 +} + +func (x *Variable) GetLastModified() *timestamppb.Timestamp { + if x != nil { + return x.LastModified + } + return nil +} + +type VariableVariant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + VariableId string `protobuf:"bytes,2,opt,name=variable_id,json=variableId,proto3" json:"variable_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + Description *string `protobuf:"bytes,5,opt,name=description,proto3,oneof" json:"description,omitempty"` + Attributes []*Attribute `protobuf:"bytes,6,rep,name=attributes,proto3" json:"attributes,omitempty"` + LastModified *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_modified,json=lastModified,proto3,oneof" json:"last_modified,omitempty"` +} + +func (x *VariableVariant) Reset() { + *x = VariableVariant{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VariableVariant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VariableVariant) ProtoMessage() {} + +func (x *VariableVariant) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 VariableVariant.ProtoReflect.Descriptor instead. +func (*VariableVariant) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{1} +} + +func (x *VariableVariant) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *VariableVariant) GetVariableId() string { + if x != nil { + return x.VariableId + } + return "" +} + +func (x *VariableVariant) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VariableVariant) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *VariableVariant) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *VariableVariant) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *VariableVariant) GetLastModified() *timestamppb.Timestamp { + if x != nil { + return x.LastModified + } + return nil +} + +type ListVariablesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page *PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Attributes []*Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *ListVariablesRequest) Reset() { + *x = ListVariablesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVariablesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVariablesRequest) ProtoMessage() {} + +func (x *ListVariablesRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 ListVariablesRequest.ProtoReflect.Descriptor instead. +func (*ListVariablesRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{2} +} + +func (x *ListVariablesRequest) GetPage() *PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *ListVariablesRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *ListVariablesRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type ListVariablesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variables []*Variable `protobuf:"bytes,1,rep,name=variables,proto3" json:"variables,omitempty"` + Page *PageResponse `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` +} + +func (x *ListVariablesResponse) Reset() { + *x = ListVariablesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVariablesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVariablesResponse) ProtoMessage() {} + +func (x *ListVariablesResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 ListVariablesResponse.ProtoReflect.Descriptor instead. +func (*ListVariablesResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{3} +} + +func (x *ListVariablesResponse) GetVariables() []*Variable { + if x != nil { + return x.Variables + } + return nil +} + +func (x *ListVariablesResponse) GetPage() *PageResponse { + if x != nil { + return x.Page + } + return nil +} + +type GetVariableRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Lookup: + // + // *GetVariableRequest_Id + // *GetVariableRequest_Name + Lookup isGetVariableRequest_Lookup `protobuf_oneof:"lookup"` +} + +func (x *GetVariableRequest) Reset() { + *x = GetVariableRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVariableRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVariableRequest) ProtoMessage() {} + +func (x *GetVariableRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 GetVariableRequest.ProtoReflect.Descriptor instead. +func (*GetVariableRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{4} +} + +func (m *GetVariableRequest) GetLookup() isGetVariableRequest_Lookup { + if m != nil { + return m.Lookup + } + return nil +} + +func (x *GetVariableRequest) GetId() string { + if x, ok := x.GetLookup().(*GetVariableRequest_Id); ok { + return x.Id + } + return "" +} + +func (x *GetVariableRequest) GetName() string { + if x, ok := x.GetLookup().(*GetVariableRequest_Name); ok { + return x.Name + } + return "" +} + +type isGetVariableRequest_Lookup interface { + isGetVariableRequest_Lookup() +} + +type GetVariableRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type GetVariableRequest_Name struct { + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +func (*GetVariableRequest_Id) isGetVariableRequest_Lookup() {} + +func (*GetVariableRequest_Name) isGetVariableRequest_Lookup() {} + +type GetVariableResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"` +} + +func (x *GetVariableResponse) Reset() { + *x = GetVariableResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVariableResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVariableResponse) ProtoMessage() {} + +func (x *GetVariableResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 GetVariableResponse.ProtoReflect.Descriptor instead. +func (*GetVariableResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{5} +} + +func (x *GetVariableResponse) GetVariable() *Variable { + if x != nil { + return x.Variable + } + return nil +} + +type GetVariableVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetVariableVariantRequest) Reset() { + *x = GetVariableVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVariableVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVariableVariantRequest) ProtoMessage() {} + +func (x *GetVariableVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_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 GetVariableVariantRequest.ProtoReflect.Descriptor instead. +func (*GetVariableVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{6} +} + +func (x *GetVariableVariantRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetVariableVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variant *VariableVariant `protobuf:"bytes,1,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *GetVariableVariantResponse) Reset() { + *x = GetVariableVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVariableVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVariableVariantResponse) ProtoMessage() {} + +func (x *GetVariableVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVariableVariantResponse.ProtoReflect.Descriptor instead. +func (*GetVariableVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{7} +} + +func (x *GetVariableVariantResponse) GetVariant() *VariableVariant { + if x != nil { + return x.Variant + } + return nil +} + +type SetVariableVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariableName string `protobuf:"bytes,1,opt,name=variable_name,json=variableName,proto3" json:"variable_name,omitempty"` + // Defaults to "default" when empty. + VariantName string `protobuf:"bytes,2,opt,name=variant_name,json=variantName,proto3" json:"variant_name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *SetVariableVariantRequest) Reset() { + *x = SetVariableVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetVariableVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetVariableVariantRequest) ProtoMessage() {} + +func (x *SetVariableVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetVariableVariantRequest.ProtoReflect.Descriptor instead. +func (*SetVariableVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{8} +} + +func (x *SetVariableVariantRequest) GetVariableName() string { + if x != nil { + return x.VariableName + } + return "" +} + +func (x *SetVariableVariantRequest) GetVariantName() string { + if x != nil { + return x.VariantName + } + return "" +} + +func (x *SetVariableVariantRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *SetVariableVariantRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *SetVariableVariantRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type SetVariableVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"` + Variant *VariableVariant `protobuf:"bytes,2,opt,name=variant,proto3" json:"variant,omitempty"` + CreatedVariable bool `protobuf:"varint,3,opt,name=created_variable,json=createdVariable,proto3" json:"created_variable,omitempty"` + CreatedVariant bool `protobuf:"varint,4,opt,name=created_variant,json=createdVariant,proto3" json:"created_variant,omitempty"` +} + +func (x *SetVariableVariantResponse) Reset() { + *x = SetVariableVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetVariableVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetVariableVariantResponse) ProtoMessage() {} + +func (x *SetVariableVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetVariableVariantResponse.ProtoReflect.Descriptor instead. +func (*SetVariableVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{9} +} + +func (x *SetVariableVariantResponse) GetVariable() *Variable { + if x != nil { + return x.Variable + } + return nil +} + +func (x *SetVariableVariantResponse) GetVariant() *VariableVariant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *SetVariableVariantResponse) GetCreatedVariable() bool { + if x != nil { + return x.CreatedVariable + } + return false +} + +func (x *SetVariableVariantResponse) GetCreatedVariant() bool { + if x != nil { + return x.CreatedVariant + } + return false +} + +type CreateVariableVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariableName string `protobuf:"bytes,1,opt,name=variable_name,json=variableName,proto3" json:"variable_name,omitempty"` + // Defaults to "default" when empty. + VariantName string `protobuf:"bytes,2,opt,name=variant_name,json=variantName,proto3" json:"variant_name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + Attributes []*Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *CreateVariableVariantRequest) Reset() { + *x = CreateVariableVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateVariableVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateVariableVariantRequest) ProtoMessage() {} + +func (x *CreateVariableVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateVariableVariantRequest.ProtoReflect.Descriptor instead. +func (*CreateVariableVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateVariableVariantRequest) GetVariableName() string { + if x != nil { + return x.VariableName + } + return "" +} + +func (x *CreateVariableVariantRequest) GetVariantName() string { + if x != nil { + return x.VariantName + } + return "" +} + +func (x *CreateVariableVariantRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *CreateVariableVariantRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *CreateVariableVariantRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type CreateVariableVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variable *Variable `protobuf:"bytes,1,opt,name=variable,proto3" json:"variable,omitempty"` + Variant *VariableVariant `protobuf:"bytes,2,opt,name=variant,proto3" json:"variant,omitempty"` + CreatedVariable bool `protobuf:"varint,3,opt,name=created_variable,json=createdVariable,proto3" json:"created_variable,omitempty"` + CreatedVariant bool `protobuf:"varint,4,opt,name=created_variant,json=createdVariant,proto3" json:"created_variant,omitempty"` +} + +func (x *CreateVariableVariantResponse) Reset() { + *x = CreateVariableVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateVariableVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateVariableVariantResponse) ProtoMessage() {} + +func (x *CreateVariableVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateVariableVariantResponse.ProtoReflect.Descriptor instead. +func (*CreateVariableVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateVariableVariantResponse) GetVariable() *Variable { + if x != nil { + return x.Variable + } + return nil +} + +func (x *CreateVariableVariantResponse) GetVariant() *VariableVariant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *CreateVariableVariantResponse) GetCreatedVariable() bool { + if x != nil { + return x.CreatedVariable + } + return false +} + +func (x *CreateVariableVariantResponse) GetCreatedVariant() bool { + if x != nil { + return x.CreatedVariant + } + return false +} + +type UpdateVariableVariantValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariantId string `protobuf:"bytes,1,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *UpdateVariableVariantValueRequest) Reset() { + *x = UpdateVariableVariantValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateVariableVariantValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVariableVariantValueRequest) ProtoMessage() {} + +func (x *UpdateVariableVariantValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateVariableVariantValueRequest.ProtoReflect.Descriptor instead. +func (*UpdateVariableVariantValueRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateVariableVariantValueRequest) GetVariantId() string { + if x != nil { + return x.VariantId + } + return "" +} + +func (x *UpdateVariableVariantValueRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type UpdateVariableVariantValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variant *VariableVariant `protobuf:"bytes,1,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *UpdateVariableVariantValueResponse) Reset() { + *x = UpdateVariableVariantValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateVariableVariantValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVariableVariantValueResponse) ProtoMessage() {} + +func (x *UpdateVariableVariantValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateVariableVariantValueResponse.ProtoReflect.Descriptor instead. +func (*UpdateVariableVariantValueResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{13} +} + +func (x *UpdateVariableVariantValueResponse) GetVariant() *VariableVariant { + if x != nil { + return x.Variant + } + return nil +} + +type UpdateVariableVariantMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariantId string `protobuf:"bytes,1,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Attributes []*Attribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *UpdateVariableVariantMetadataRequest) Reset() { + *x = UpdateVariableVariantMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateVariableVariantMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVariableVariantMetadataRequest) ProtoMessage() {} + +func (x *UpdateVariableVariantMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateVariableVariantMetadataRequest.ProtoReflect.Descriptor instead. +func (*UpdateVariableVariantMetadataRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{14} +} + +func (x *UpdateVariableVariantMetadataRequest) GetVariantId() string { + if x != nil { + return x.VariantId + } + return "" +} + +func (x *UpdateVariableVariantMetadataRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UpdateVariableVariantMetadataRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdateVariableVariantMetadataRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +type UpdateVariableVariantMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Variant *VariableVariant `protobuf:"bytes,1,opt,name=variant,proto3" json:"variant,omitempty"` +} + +func (x *UpdateVariableVariantMetadataResponse) Reset() { + *x = UpdateVariableVariantMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateVariableVariantMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateVariableVariantMetadataResponse) ProtoMessage() {} + +func (x *UpdateVariableVariantMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateVariableVariantMetadataResponse.ProtoReflect.Descriptor instead. +func (*UpdateVariableVariantMetadataResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{15} +} + +func (x *UpdateVariableVariantMetadataResponse) GetVariant() *VariableVariant { + if x != nil { + return x.Variant + } + return nil +} + +type DeleteVariableVariantRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + VariantId string `protobuf:"bytes,1,opt,name=variant_id,json=variantId,proto3" json:"variant_id,omitempty"` +} + +func (x *DeleteVariableVariantRequest) Reset() { + *x = DeleteVariableVariantRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVariableVariantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVariableVariantRequest) ProtoMessage() {} + +func (x *DeleteVariableVariantRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVariableVariantRequest.ProtoReflect.Descriptor instead. +func (*DeleteVariableVariantRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{16} +} + +func (x *DeleteVariableVariantRequest) GetVariantId() string { + if x != nil { + return x.VariantId + } + return "" +} + +type DeleteVariableVariantResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DeletedVariable bool `protobuf:"varint,1,opt,name=deleted_variable,json=deletedVariable,proto3" json:"deleted_variable,omitempty"` +} + +func (x *DeleteVariableVariantResponse) Reset() { + *x = DeleteVariableVariantResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVariableVariantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVariableVariantResponse) ProtoMessage() {} + +func (x *DeleteVariableVariantResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVariableVariantResponse.ProtoReflect.Descriptor instead. +func (*DeleteVariableVariantResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{17} +} + +func (x *DeleteVariableVariantResponse) GetDeletedVariable() bool { + if x != nil { + return x.DeletedVariable + } + return false +} + +type DeleteVariableRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Lookup: + // + // *DeleteVariableRequest_Id + // *DeleteVariableRequest_Name + Lookup isDeleteVariableRequest_Lookup `protobuf_oneof:"lookup"` +} + +func (x *DeleteVariableRequest) Reset() { + *x = DeleteVariableRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVariableRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVariableRequest) ProtoMessage() {} + +func (x *DeleteVariableRequest) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVariableRequest.ProtoReflect.Descriptor instead. +func (*DeleteVariableRequest) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{18} +} + +func (m *DeleteVariableRequest) GetLookup() isDeleteVariableRequest_Lookup { + if m != nil { + return m.Lookup + } + return nil +} + +func (x *DeleteVariableRequest) GetId() string { + if x, ok := x.GetLookup().(*DeleteVariableRequest_Id); ok { + return x.Id + } + return "" +} + +func (x *DeleteVariableRequest) GetName() string { + if x, ok := x.GetLookup().(*DeleteVariableRequest_Name); ok { + return x.Name + } + return "" +} + +type isDeleteVariableRequest_Lookup interface { + isDeleteVariableRequest_Lookup() +} + +type DeleteVariableRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type DeleteVariableRequest_Name struct { + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +func (*DeleteVariableRequest_Id) isDeleteVariableRequest_Lookup() {} + +func (*DeleteVariableRequest_Name) isDeleteVariableRequest_Lookup() {} + +type DeleteVariableResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteVariableResponse) Reset() { + *x = DeleteVariableResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteVariableResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVariableResponse) ProtoMessage() {} + +func (x *DeleteVariableResponse) ProtoReflect() protoreflect.Message { + mi := &file_depot_ci_v3beta2_variables_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVariableResponse.ProtoReflect.Descriptor instead. +func (*DeleteVariableResponse) Descriptor() ([]byte, []int) { + return file_depot_ci_v3beta2_variables_proto_rawDescGZIP(), []int{19} +} + +var File_depot_ci_v3beta2_variables_proto protoreflect.FileDescriptor + +var file_depot_ci_v3beta2_variables_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x69, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x69, 0x2f, + 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xea, 0x01, 0x0a, 0x08, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, + 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0c, 0x6c, + 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x10, + 0x0a, 0x0e, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x22, 0xb8, 0x02, 0x0a, 0x0f, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x01, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x14, + 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x15, 0x4c, + 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x32, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x42, 0x08, 0x0a, 0x06, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x22, 0x4d, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x2b, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x59, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x22, 0xed, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xe5, 0x01, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0xf0, 0x01, 0x0a, 0x1c, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, + 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, + 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x0e, 0x0a, 0x0c, + 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe8, 0x01, 0x0a, + 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, + 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, + 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x58, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x61, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, 0x72, + 0x69, 0x61, 0x6e, 0x74, 0x22, 0xb8, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, + 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, + 0x64, 0x0a, 0x25, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x76, 0x61, + 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x3d, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x49, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x08, 0x0a, 0x06, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa7, 0x08, 0x0a, 0x0f, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, + 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x2b, 0x2e, + 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x65, 0x70, + 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, + 0x74, 0x12, 0x2e, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x2b, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x33, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x90, 0x01, + 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x36, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, + 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, + 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x78, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x2e, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x64, 0x65, 0x70, 0x6f, + 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x2e, 0x64, + 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xc3, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2e, 0x63, 0x69, + 0x2e, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x42, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, 0x2f, 0x63, 0x6c, 0x69, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x74, + 0x2f, 0x63, 0x69, 0x2f, 0x76, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0x3b, 0x63, 0x69, 0x76, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0xa2, 0x02, 0x03, 0x44, 0x43, 0x58, 0xaa, 0x02, 0x10, 0x44, 0x65, + 0x70, 0x6f, 0x74, 0x2e, 0x43, 0x69, 0x2e, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, 0x32, 0xca, 0x02, + 0x10, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x43, 0x69, 0x5c, 0x56, 0x33, 0x62, 0x65, 0x74, 0x61, + 0x32, 0xe2, 0x02, 0x1c, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x5c, 0x43, 0x69, 0x5c, 0x56, 0x33, 0x62, + 0x65, 0x74, 0x61, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x12, 0x44, 0x65, 0x70, 0x6f, 0x74, 0x3a, 0x3a, 0x43, 0x69, 0x3a, 0x3a, 0x56, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_depot_ci_v3beta2_variables_proto_rawDescOnce sync.Once + file_depot_ci_v3beta2_variables_proto_rawDescData = file_depot_ci_v3beta2_variables_proto_rawDesc +) + +func file_depot_ci_v3beta2_variables_proto_rawDescGZIP() []byte { + file_depot_ci_v3beta2_variables_proto_rawDescOnce.Do(func() { + file_depot_ci_v3beta2_variables_proto_rawDescData = protoimpl.X.CompressGZIP(file_depot_ci_v3beta2_variables_proto_rawDescData) + }) + return file_depot_ci_v3beta2_variables_proto_rawDescData +} + +var file_depot_ci_v3beta2_variables_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_depot_ci_v3beta2_variables_proto_goTypes = []interface{}{ + (*Variable)(nil), // 0: depot.ci.v3beta2.Variable + (*VariableVariant)(nil), // 1: depot.ci.v3beta2.VariableVariant + (*ListVariablesRequest)(nil), // 2: depot.ci.v3beta2.ListVariablesRequest + (*ListVariablesResponse)(nil), // 3: depot.ci.v3beta2.ListVariablesResponse + (*GetVariableRequest)(nil), // 4: depot.ci.v3beta2.GetVariableRequest + (*GetVariableResponse)(nil), // 5: depot.ci.v3beta2.GetVariableResponse + (*GetVariableVariantRequest)(nil), // 6: depot.ci.v3beta2.GetVariableVariantRequest + (*GetVariableVariantResponse)(nil), // 7: depot.ci.v3beta2.GetVariableVariantResponse + (*SetVariableVariantRequest)(nil), // 8: depot.ci.v3beta2.SetVariableVariantRequest + (*SetVariableVariantResponse)(nil), // 9: depot.ci.v3beta2.SetVariableVariantResponse + (*CreateVariableVariantRequest)(nil), // 10: depot.ci.v3beta2.CreateVariableVariantRequest + (*CreateVariableVariantResponse)(nil), // 11: depot.ci.v3beta2.CreateVariableVariantResponse + (*UpdateVariableVariantValueRequest)(nil), // 12: depot.ci.v3beta2.UpdateVariableVariantValueRequest + (*UpdateVariableVariantValueResponse)(nil), // 13: depot.ci.v3beta2.UpdateVariableVariantValueResponse + (*UpdateVariableVariantMetadataRequest)(nil), // 14: depot.ci.v3beta2.UpdateVariableVariantMetadataRequest + (*UpdateVariableVariantMetadataResponse)(nil), // 15: depot.ci.v3beta2.UpdateVariableVariantMetadataResponse + (*DeleteVariableVariantRequest)(nil), // 16: depot.ci.v3beta2.DeleteVariableVariantRequest + (*DeleteVariableVariantResponse)(nil), // 17: depot.ci.v3beta2.DeleteVariableVariantResponse + (*DeleteVariableRequest)(nil), // 18: depot.ci.v3beta2.DeleteVariableRequest + (*DeleteVariableResponse)(nil), // 19: depot.ci.v3beta2.DeleteVariableResponse + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*Attribute)(nil), // 21: depot.ci.v3beta2.Attribute + (*PageRequest)(nil), // 22: depot.ci.v3beta2.PageRequest + (*PageResponse)(nil), // 23: depot.ci.v3beta2.PageResponse +} +var file_depot_ci_v3beta2_variables_proto_depIdxs = []int32{ + 1, // 0: depot.ci.v3beta2.Variable.variants:type_name -> depot.ci.v3beta2.VariableVariant + 20, // 1: depot.ci.v3beta2.Variable.last_modified:type_name -> google.protobuf.Timestamp + 21, // 2: depot.ci.v3beta2.VariableVariant.attributes:type_name -> depot.ci.v3beta2.Attribute + 20, // 3: depot.ci.v3beta2.VariableVariant.last_modified:type_name -> google.protobuf.Timestamp + 22, // 4: depot.ci.v3beta2.ListVariablesRequest.page:type_name -> depot.ci.v3beta2.PageRequest + 21, // 5: depot.ci.v3beta2.ListVariablesRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 0, // 6: depot.ci.v3beta2.ListVariablesResponse.variables:type_name -> depot.ci.v3beta2.Variable + 23, // 7: depot.ci.v3beta2.ListVariablesResponse.page:type_name -> depot.ci.v3beta2.PageResponse + 0, // 8: depot.ci.v3beta2.GetVariableResponse.variable:type_name -> depot.ci.v3beta2.Variable + 1, // 9: depot.ci.v3beta2.GetVariableVariantResponse.variant:type_name -> depot.ci.v3beta2.VariableVariant + 21, // 10: depot.ci.v3beta2.SetVariableVariantRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 0, // 11: depot.ci.v3beta2.SetVariableVariantResponse.variable:type_name -> depot.ci.v3beta2.Variable + 1, // 12: depot.ci.v3beta2.SetVariableVariantResponse.variant:type_name -> depot.ci.v3beta2.VariableVariant + 21, // 13: depot.ci.v3beta2.CreateVariableVariantRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 0, // 14: depot.ci.v3beta2.CreateVariableVariantResponse.variable:type_name -> depot.ci.v3beta2.Variable + 1, // 15: depot.ci.v3beta2.CreateVariableVariantResponse.variant:type_name -> depot.ci.v3beta2.VariableVariant + 1, // 16: depot.ci.v3beta2.UpdateVariableVariantValueResponse.variant:type_name -> depot.ci.v3beta2.VariableVariant + 21, // 17: depot.ci.v3beta2.UpdateVariableVariantMetadataRequest.attributes:type_name -> depot.ci.v3beta2.Attribute + 1, // 18: depot.ci.v3beta2.UpdateVariableVariantMetadataResponse.variant:type_name -> depot.ci.v3beta2.VariableVariant + 2, // 19: depot.ci.v3beta2.VariableService.ListVariables:input_type -> depot.ci.v3beta2.ListVariablesRequest + 4, // 20: depot.ci.v3beta2.VariableService.GetVariable:input_type -> depot.ci.v3beta2.GetVariableRequest + 6, // 21: depot.ci.v3beta2.VariableService.GetVariableVariant:input_type -> depot.ci.v3beta2.GetVariableVariantRequest + 10, // 22: depot.ci.v3beta2.VariableService.CreateVariableVariant:input_type -> depot.ci.v3beta2.CreateVariableVariantRequest + 8, // 23: depot.ci.v3beta2.VariableService.SetVariableVariant:input_type -> depot.ci.v3beta2.SetVariableVariantRequest + 12, // 24: depot.ci.v3beta2.VariableService.UpdateVariableVariantValue:input_type -> depot.ci.v3beta2.UpdateVariableVariantValueRequest + 14, // 25: depot.ci.v3beta2.VariableService.UpdateVariableVariantMetadata:input_type -> depot.ci.v3beta2.UpdateVariableVariantMetadataRequest + 16, // 26: depot.ci.v3beta2.VariableService.DeleteVariableVariant:input_type -> depot.ci.v3beta2.DeleteVariableVariantRequest + 18, // 27: depot.ci.v3beta2.VariableService.DeleteVariable:input_type -> depot.ci.v3beta2.DeleteVariableRequest + 3, // 28: depot.ci.v3beta2.VariableService.ListVariables:output_type -> depot.ci.v3beta2.ListVariablesResponse + 5, // 29: depot.ci.v3beta2.VariableService.GetVariable:output_type -> depot.ci.v3beta2.GetVariableResponse + 7, // 30: depot.ci.v3beta2.VariableService.GetVariableVariant:output_type -> depot.ci.v3beta2.GetVariableVariantResponse + 11, // 31: depot.ci.v3beta2.VariableService.CreateVariableVariant:output_type -> depot.ci.v3beta2.CreateVariableVariantResponse + 9, // 32: depot.ci.v3beta2.VariableService.SetVariableVariant:output_type -> depot.ci.v3beta2.SetVariableVariantResponse + 13, // 33: depot.ci.v3beta2.VariableService.UpdateVariableVariantValue:output_type -> depot.ci.v3beta2.UpdateVariableVariantValueResponse + 15, // 34: depot.ci.v3beta2.VariableService.UpdateVariableVariantMetadata:output_type -> depot.ci.v3beta2.UpdateVariableVariantMetadataResponse + 17, // 35: depot.ci.v3beta2.VariableService.DeleteVariableVariant:output_type -> depot.ci.v3beta2.DeleteVariableVariantResponse + 19, // 36: depot.ci.v3beta2.VariableService.DeleteVariable:output_type -> depot.ci.v3beta2.DeleteVariableResponse + 28, // [28:37] is the sub-list for method output_type + 19, // [19:28] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_depot_ci_v3beta2_variables_proto_init() } +func file_depot_ci_v3beta2_variables_proto_init() { + if File_depot_ci_v3beta2_variables_proto != nil { + return + } + file_depot_ci_v3beta2_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_depot_ci_v3beta2_variables_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Variable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VariableVariant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVariablesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVariablesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVariableRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVariableResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVariableVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVariableVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetVariableVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetVariableVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateVariableVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateVariableVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateVariableVariantValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateVariableVariantValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateVariableVariantMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateVariableVariantMetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVariableVariantRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVariableVariantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVariableRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteVariableResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_depot_ci_v3beta2_variables_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_variables_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_variables_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*GetVariableRequest_Id)(nil), + (*GetVariableRequest_Name)(nil), + } + file_depot_ci_v3beta2_variables_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_variables_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_depot_ci_v3beta2_variables_proto_msgTypes[18].OneofWrappers = []interface{}{ + (*DeleteVariableRequest_Id)(nil), + (*DeleteVariableRequest_Name)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_depot_ci_v3beta2_variables_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_depot_ci_v3beta2_variables_proto_goTypes, + DependencyIndexes: file_depot_ci_v3beta2_variables_proto_depIdxs, + MessageInfos: file_depot_ci_v3beta2_variables_proto_msgTypes, + }.Build() + File_depot_ci_v3beta2_variables_proto = out.File + file_depot_ci_v3beta2_variables_proto_rawDesc = nil + file_depot_ci_v3beta2_variables_proto_goTypes = nil + file_depot_ci_v3beta2_variables_proto_depIdxs = nil +} diff --git a/proto/depot/ci/v3beta2/secrets.proto b/proto/depot/ci/v3beta2/secrets.proto new file mode 100644 index 00000000..b1be3c20 --- /dev/null +++ b/proto/depot/ci/v3beta2/secrets.proto @@ -0,0 +1,159 @@ +syntax = "proto3"; + +package depot.ci.v3beta2; + +import "depot/ci/v3beta2/types.proto"; +import "google/protobuf/timestamp.proto"; + +service SecretService { + rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse); + rpc GetSecret(GetSecretRequest) returns (GetSecretResponse); + rpc GetSecretVariant(GetSecretVariantRequest) returns (GetSecretVariantResponse); + + rpc CreateSecretVariant(CreateSecretVariantRequest) returns (CreateSecretVariantResponse); + rpc SetSecretVariant(SetSecretVariantRequest) returns (SetSecretVariantResponse); + rpc UpdateSecretVariantMetadata(UpdateSecretVariantMetadataRequest) returns (UpdateSecretVariantMetadataResponse); + rpc UpdateSecretVariantValue(UpdateSecretVariantValueRequest) returns (UpdateSecretVariantValueResponse); + rpc DeleteSecretVariant(DeleteSecretVariantRequest) returns (DeleteSecretVariantResponse); + rpc DeleteSecret(DeleteSecretRequest) returns (DeleteSecretResponse); +} + +message Secret { + string id = 1; + string name = 2; + repeated SecretVariant variants = 3; + uint32 variant_count = 4; + optional google.protobuf.Timestamp last_modified = 5; +} + +message SecretVariant { + string id = 1; + string secret_id = 2; + string name = 3; + optional string description = 4; + + // Attributes describe the job context this variant matches against. + // A variant with no attributes matches all jobs. + repeated Attribute attributes = 5; + + optional google.protobuf.Timestamp last_modified = 6; + + // Server-computed: variants under the same secret sharing the same value get the same index. + optional uint32 value_group_index = 7; +} + +message ListSecretsRequest { + PageRequest page = 1; + + // Optional name search/prefix/filter depending on product behavior. + string query = 2; + + // Optional filter for variants matching these attributes. + repeated Attribute attributes = 3; +} + +message ListSecretsResponse { + repeated Secret secrets = 1; + PageResponse page = 2; +} + +message GetSecretRequest { + oneof lookup { + string id = 1; + string name = 2; + } +} + +message GetSecretResponse { + Secret secret = 1; +} + +message GetSecretVariantRequest { + string id = 1; +} + +message GetSecretVariantResponse { + SecretVariant variant = 1; +} + +message SetSecretVariantRequest { + string secret_name = 1; + + // Defaults to "default" when empty. + string variant_name = 2; + + string value = 3; + optional string description = 4; + + // Attributes describe the job context this variant matches against. + // Empty attributes means the variant is available everywhere. + repeated Attribute attributes = 5; +} + +message SetSecretVariantResponse { + Secret secret = 1; + SecretVariant variant = 2; + bool created_secret = 3; + bool created_variant = 4; +} + +message CreateSecretVariantRequest { + string secret_name = 1; + + // Defaults to "default" when empty. + string variant_name = 2; + + string value = 3; + optional string description = 4; + + // Attributes describe the job context this variant matches against. + // Empty attributes means the variant is available everywhere. + repeated Attribute attributes = 5; +} + +message CreateSecretVariantResponse { + Secret secret = 1; + SecretVariant variant = 2; + bool created_secret = 3; + bool created_variant = 4; +} + +message UpdateSecretVariantMetadataRequest { + string variant_id = 1; + + // Allows renaming a variant, e.g. default -> production. + string name = 2; + + string description = 3; + repeated Attribute attributes = 4; +} + +message UpdateSecretVariantMetadataResponse { + SecretVariant variant = 1; +} + +message UpdateSecretVariantValueRequest { + string variant_id = 1; + string value = 2; +} + +message UpdateSecretVariantValueResponse { + SecretVariant variant = 1; +} + +message DeleteSecretVariantRequest { + string variant_id = 1; +} + +message DeleteSecretVariantResponse { + bool deleted_secret = 1; +} + +message DeleteSecretRequest { + oneof lookup { + string id = 1; + string name = 2; + } +} + +message DeleteSecretResponse {} diff --git a/proto/depot/ci/v3beta2/types.proto b/proto/depot/ci/v3beta2/types.proto new file mode 100644 index 00000000..9c3f13b9 --- /dev/null +++ b/proto/depot/ci/v3beta2/types.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package depot.ci.v3beta2; + +// Shared types for CI v3beta2 secrets and variables. + +message Attribute { + string key = 1; // "repository" | "environment" | "branch" | "workflow" + string value = 2; // exact value or pattern, depending on key +} + +message PageRequest { + uint32 page = 1; // 1-based page number. Defaults to 1. + uint32 page_size = 2; // Number of parent resources per page. +} + +message PageResponse { + uint32 page = 1; + uint32 page_size = 2; + bool has_more = 3; +} diff --git a/proto/depot/ci/v3beta2/variables.proto b/proto/depot/ci/v3beta2/variables.proto new file mode 100644 index 00000000..94dac9f4 --- /dev/null +++ b/proto/depot/ci/v3beta2/variables.proto @@ -0,0 +1,140 @@ +syntax = "proto3"; + +package depot.ci.v3beta2; + +import "google/protobuf/timestamp.proto"; +import "depot/ci/v3beta2/types.proto"; + +service VariableService { + rpc ListVariables(ListVariablesRequest) returns (ListVariablesResponse); + rpc GetVariable(GetVariableRequest) returns (GetVariableResponse); + rpc GetVariableVariant(GetVariableVariantRequest) returns (GetVariableVariantResponse); + + rpc CreateVariableVariant(CreateVariableVariantRequest) returns (CreateVariableVariantResponse); + rpc SetVariableVariant(SetVariableVariantRequest) returns (SetVariableVariantResponse); + rpc UpdateVariableVariantValue(UpdateVariableVariantValueRequest) returns (UpdateVariableVariantValueResponse); + rpc UpdateVariableVariantMetadata(UpdateVariableVariantMetadataRequest) returns (UpdateVariableVariantMetadataResponse); + rpc DeleteVariableVariant(DeleteVariableVariantRequest) returns (DeleteVariableVariantResponse); + rpc DeleteVariable(DeleteVariableRequest) returns (DeleteVariableResponse); +} + +message Variable { + string id = 1; + string name = 2; + repeated VariableVariant variants = 3; + uint32 variant_count = 4; + optional google.protobuf.Timestamp last_modified = 5; +} + +message VariableVariant { + string id = 1; + string variable_id = 2; + string name = 3; + string value = 4; + optional string description = 5; + repeated Attribute attributes = 6; + optional google.protobuf.Timestamp last_modified = 7; +} + +message ListVariablesRequest { + PageRequest page = 1; + string query = 2; + repeated Attribute attributes = 3; +} + +message ListVariablesResponse { + repeated Variable variables = 1; + PageResponse page = 2; +} + +message GetVariableRequest { + oneof lookup { + string id = 1; + string name = 2; + } +} + +message GetVariableResponse { + Variable variable = 1; +} + +message GetVariableVariantRequest { + string id = 1; +} + +message GetVariableVariantResponse { + VariableVariant variant = 1; +} + +message SetVariableVariantRequest { + string variable_name = 1; + + // Defaults to "default" when empty. + string variant_name = 2; + + string value = 3; + optional string description = 4; + repeated Attribute attributes = 5; +} + +message SetVariableVariantResponse { + Variable variable = 1; + VariableVariant variant = 2; + bool created_variable = 3; + bool created_variant = 4; +} + +message CreateVariableVariantRequest { + string variable_name = 1; + + // Defaults to "default" when empty. + string variant_name = 2; + + string value = 3; + optional string description = 4; + repeated Attribute attributes = 5; +} + +message CreateVariableVariantResponse { + Variable variable = 1; + VariableVariant variant = 2; + bool created_variable = 3; + bool created_variant = 4; +} + +message UpdateVariableVariantValueRequest { + string variant_id = 1; + string value = 2; +} + +message UpdateVariableVariantValueResponse { + VariableVariant variant = 1; +} + +message UpdateVariableVariantMetadataRequest { + string variant_id = 1; + string name = 2; + string description = 3; + repeated Attribute attributes = 4; +} + +message UpdateVariableVariantMetadataResponse { + VariableVariant variant = 1; +} + +message DeleteVariableVariantRequest { + string variant_id = 1; +} + +message DeleteVariableVariantResponse { + bool deleted_variable = 1; +} + +message DeleteVariableRequest { + oneof lookup { + string id = 1; + string name = 2; + } +} + +message DeleteVariableResponse {}